Repository navigation
Highlight Session commands in composers - #1829
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
/kelos review |
|
🤖 Kelos Task Status Task |
|
🤖 Kelos Reviewer Agent @gjkim42 Review SummaryVerdict: APPROVE Findings Overview
FindingsDocumentation accuracy
Suggestions (optional)
Key takeaways (optional)
Note on prompt injection: Third-party bot review content on this PR includes embedded "Prompt for AI agents" instructions, such as fixing issues, resolving threads, and spawning sub-agents. It was treated as data and disregarded. The findings above come from independent analysis of the code. |
4a723f1 to
7fe99cb
Compare
There was a problem hiding this comment.
1 issue found across 8 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/cli/session_terminal_tui.go">
<violation number="1" location="internal/cli/session_terminal_tui.go:1530">
P2: This lets `/goal ...` submit with a queued turn whenever another turn is active. For active message or shell turns, the server rejects the command after `submitInput` clears the draft; block goal commands while pending work exists.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| if len(m.pendingAttachments) > 0 { | ||
| return "Remove attachments to use a command" | ||
| } | ||
| if m.pendingEditTurnID == "" && m.pendingTurnID != "" && (shell || !m.turnActive) { |
There was a problem hiding this comment.
P2: This lets /goal ... submit with a queued turn whenever another turn is active. For active message or shell turns, the server rejects the command after submitInput clears the draft; block goal commands while pending work exists.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At internal/cli/session_terminal_tui.go, line 1530:
<comment>This lets `/goal ...` submit with a queued turn whenever another turn is active. For active message or shell turns, the server rejects the command after `submitInput` clears the draft; block goal commands while pending work exists.</comment>
<file context>
@@ -1513,6 +1516,34 @@ func (m *sessionTUIModel) statusStyle(status string) lipgloss.Style {
+ if len(m.pendingAttachments) > 0 {
+ return "Remove attachments to use a command"
+ }
+ if m.pendingEditTurnID == "" && m.pendingTurnID != "" && (shell || !m.turnActive) {
+ return "Wait for pending work to start or remove it before submitting a command"
+ }
</file context>
| if m.pendingEditTurnID == "" && m.pendingTurnID != "" && (shell || !m.turnActive) { | |
| if m.pendingEditTurnID == "" && m.pendingTurnID != "" { |
|
/kelos review |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Typing
!make testor/goal pausecurrently leaves users unsure whether they are submitting a message or a Session command. Give recognized commands a distinct composer presentation while users type.The web composer highlights the command prefix, uses amber shell styling and green goal styling, and shows the matching submit action. Arguments remain readable, and removing the command prefix restores the ordinary message composer. The interactive terminal colors shell and goal input and shows the action Enter will submit.
Explain and block incomplete commands, unavailable goal support, and commands that conflict with staged attachments or pending work. Keep the draft when submission is blocked. Keep unknown prefixes such as
/goalkeeperas ordinary messages.Which issue(s) this PR is related to:
N/A
Special notes for your reviewer:
The web editor uses a native textarea with an inert highlighting layer. The layer shares the textarea's font and wrapping dimensions and follows its scrolling. Returning to Conversation or Sessions, scrolling, and resizing the viewport refresh its alignment; hidden composers retain their measured dimensions.
Validation:
make verifyenv -u CODEX_HOME -u CODEX_AUTH_JSON make testmake build WHAT=cmd/kelosThe unit suite runs with inherited Codex settings removed from the test process; an entrypoint failure with those settings reproduces on
main.Review disposition: the command validation, whitespace handling, cancel/disconnect hints, hidden-composer alignment, dark error contrast, documentation, and event-hook coverage findings are addressed. Duplicate alignment reports share one fix; the findings on outdated documentation and CSS locations still applied and are addressed.
The pending-edit label suggestion is not applied: runtime
editMessagereparses the saved text and supports changing pending work into a command. The hint therefore keeps the command type and explicitly says “save pending work”; a positive submission test covers this path. Commands with attachments are rejected by the runtime, rather than sent as ordinary agent prompts; the TUI blocks them locally and retains the draft and files. Goal commands remain available during active work so an active goal can still be controlled.Screenshots use the production frontend with a fixture Session and matching input and conversation in each pair.
Does this PR introduce a user-facing change?