Repository navigation
fix(ui): hide session changes outside Git checkouts - #122152
vyctorbrzezowski merged 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 12:59 PM ET / 16:59 UTC. ClawSweeper reviewWhat this changesThis PR hides Session changes for a workspace explicitly reported as outside Git and refreshes that capability after a matching chat run ends. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The patch is an owner-aligned fix with no actionable correctness findings; the maintainer label requires normal maintainer handling after exact-head CI and the latest ClawSweeper rank-up moves are checked. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI builds chat-header and workspace-rail actions from Gateway workspace facts for the active session. Those facts determine whether opening the session-diff panel is meaningful. flowchart LR
A[Workspace directory] --> B[Gateway Git probe]
B --> C[Session workspace state]
D[Chat run terminal event] --> E[Bounded workspace refresh]
E --> C
C --> F[Session changes action]
F --> G[Diff panel]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +7, Tests +6. Total +13 across 6 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Gate every Session changes entry point on the workspace owner’s explicit false value, refresh that fact once after a matching terminal event, and preserve the fallback for Gateways that omit the field. Do we have a high-confidence way to reproduce the issue? Yes—the current browser E2E produces Is this the best way to solve the issue? Yes—the Gateway owns checkout detection, and a matching terminal chat event is the bounded point at which an agent-created checkout can become available; polling or a static session gate would be weaker. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 82ba647673f9. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
|
Landing gate complete:
Proceeding through the native atomic merge gate. |
|
Merged via squash.
|
Closes #122147
What Problem This Solves
Fixes an issue where users opening a Control UI chat outside a Git checkout would see a disabled Session changes icon that could not provide a useful result.
Why This Change Was Made
In this PR, the workspace capability owner omits every Session changes entry point when the live
sessions.files.listresult saysgitCheckout: false. A terminal chat event refreshes that fact once per completed run, so an agent-created checkout such asgit initmakes the action appear without polling. Gateways that omit the newer field remain fail-open and keep the existing panel fallback.This follows the existing header pattern: terminal, desktop, discussion, tasks, and split actions are conditionally present when their callbacks are available, and the header has no fixed-slot layout contract. It also removes the now-obsolete disabled quick-action seam.
User Impact
Non-Git sessions no longer advertise an unusable diff action. If the same session becomes a Git checkout during a run, Session changes appears after that run completes.
Evidence
Before
The non-Git workspace shows a disabled diff glyph whose tooltip only explains that it cannot work.
After
In this PR, the unusable action is omitted while the rest of the header remains unchanged.
Validation
gitCheckout: false, same-session transition totrueafter a terminal run, and the legacyundefinedfallback.Production delta is +7 lines. The net growth is the bounded terminal-run refresh needed to make the live Git capability reactive; connected disabled-state policy was removed. Tests are +6 net lines.