Repository navigation
fix(ui): preserve thinking completion when selecting argument text - #196507
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR preserves the highlighted slash-command argument when text selection extends beyond the command token. Example: Type
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — suspected predecessor, not a causality claim: source commit Possible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current completion regression in the existing owner, preserves leading-command behavior, and introduces no actionable correctness or security finding. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI composer passes draft text and textarea selection to its slash-menu owner, which chooses command or argument suggestions and commits the selected completion. flowchart LR
A[Textarea draft and selection] --> B[Composer selection handler]
B --> C[Slash menu owner]
D[Command catalog and argument options] --> C
C --> E[Command or argument picker]
E --> F[Completed composer draft]
Technical reviewBest possible solution: Retain this focused selection-boundary repair in the existing slash-menu owner and its extended composer regression. Do we have a high-confidence way to reproduce the issue? The parser, selection handler, and current-main branch condition establish the failure for selection range 6–7 in Is this the best way to solve the issue? The patch restores the existing argument-selection invariant with one local condition, preserves caret-only leading-command completion, and adds no unnecessary machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cdd7ee54ee8d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests +7, Other +1. Total +12 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 10, 2026, 2:50 AM ET / 07:50 UTC. |
|
Merged via squash.
|
What Problem This Solves
Fixes Tab completing
/thinkagain instead of the selected thinking level after the user selects its trailing space. This broke all three viewport cases in scheduled CI run 42769178432.User Impact
Users can keep a thinking level highlighted while selecting text in the argument area, then complete it with Tab and submit it. Leading commands typed before pasted text keep their existing completion behavior.
Why This Change Was Made
The slash-menu owner now distinguishes a caret inside the command token from a selection extending into its arguments. The latter retains the argument picker and its selection. The existing composer regression also checks selection followed by a pending catalog refresh; no new state or timing workaround is introduced.
Evidence
261b24e6bc8e3012687f5b27623b0e26f3defff6: scoped-clean through P2.Related regression:
8aa3ef4425c(leading slash commands before pasted text).