Repository navigation
fix(ui): disable chat composer when sending is not permitted - #160977
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: blocked before merge. Reviewed September 29, 2026, 2:31 AM ET / 06:31 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch adds recipient-specific send restrictions to Gateway session rows and uses them to disable the web chat composer and hold queued messages when sending is denied. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain Current main still permits composition before the Gateway rejects these sends, and the submitted screenshots show the intended improvement. The PR needs one repair before merge: read-only operators lose an existing way to inspect session capabilities. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway turns session policy and the current operator's permissions into session rows for the Control UI. The browser uses those rows to present chat controls and manage queued sends; the Gateway remains the final authority for delivery. flowchart LR
A[Role and session policy] --> B[Gateway session row]
B --> C[Control UI session state]
C --> D{Send permitted?}
D -->|No| E[Disabled input and held outbox]
D -->|Yes| F[Chat send request]
F --> G[Gateway send admission]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +47, Tests +307, Docs +5, Other +4. Total +363 across 18 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the Gateway's send decision authoritative, disable text and attachment submission for denied sessions, and preserve a separate read-only path into the capability menu with its mutation controls disabled. Do we have a high-confidence way to reproduce the issue? Yes. Current main separates read-only composition from send permission, while the existing Gateway can deny the resulting send; the PR's before images show that mismatch. The introduced menu regression follows directly from the changed access rule and disabled trigger. Is this the best way to solve the issue? Mostly yes. Projecting the existing Gateway decision into the UI is a narrow repair, but using one permission value for both message entry and read-only capability browsing is too broad. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1a0e022cb1e2. LabelsLabel changes: No label changes. Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Codex: confirmed the read-only inspection regression. The prepared fix is commit This PR had already merged at 06:55 UTC before the fix was pushed. The fix is therefore not included in this merge and awaits authorization for a follow-up PR. The merged head |
…w#160977) * fix(ui): disable chat composer when sending is not permitted * fix(protocol): regenerate session send restriction field
What Problem This Solves
Members could compose and submit messages to sessions that their sandbox requirement, shared-session policy, or other send permissions reject.
User Impact
The composer is disabled and grayed out with the reason before sending. Drafts and attachments survive access changes, and composition becomes available again when sending is permitted.
Why This Change Was Made
Session rows carry the current recipient's send restriction from the existing Gateway authorization owners. The UI uses that fact for composition and rechecks it before queued delivery, including agent-scoped global sessions. Server enforcement and independently authorized suggestion submission retain their existing behavior.
Evidence
f4ea8afb7fbe. GitHub records the merge at 2026-09-29 06:55 UTC as3463f4b8e6d9. A late review concern about read-only capability inspection is documented below; its fix is not part of this merge.Original changed-file single-file wall times, measured with
pnpm test <file> --maxWorkers=1:src/gateway/session-row-presentation.test.tsui/src/pages/chat/chat-composer-subagent.test.tsui/src/pages/chat/chat-send-access.test.tsOn the merged head, the browser CI files passed in 20.804 s (capability menu, 13 scenarios) and 4.275 s (skill library, 1 scenario).
Before and after
Prepared follow-up — not included in this merge
The late review correctly identified that disabling the entire plus menu also removed authorized read-only Skills/Connectors inspection. Commit
7dc7f9f3495preserves that inspection while leaving message composition, Send, attachment actions, and capability mutations permission-gated. It was pushed after this PR merged. The authorized follow-up is now #161289, based on current main; its body tracks the current validation and CI results.The candidate passed 71 focused UI tests and all 15 browser scenarios. After the access predicate moved into its existing owner, the affected 26 UI tests and 15 browser scenarios passed again (54.68 s wall; capability-menu execution 19.772 s and skill-library execution 5.368 s). UI/E2E types, scoped lint, formatting, and fresh independent correctness and maintainability reviews passed. Remote CI has not validated this candidate.
The following inspected screenshots show the prepared follow-up, not the merged behavior. Both images render in this PR.