Fix default chat workspace files rail#90380
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 4, 2026, 11:13 AM ET / 15:13 UTC. Summary PR surface: Source +66, Tests +49. Total +115 across 4 files. Reproducibility: yes. Current main source inspection gives a high-confidence path: chat supplies workspaceFiles, renderWorkspaceFileRail renders the rail whenever that prop exists, and the desktop grid reserves the right column. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Mantis proof suggestion Next step before merge
Security Review detailsBest possible solution: Land this narrow UI fix after normal maintainer and CI review; keep broader persisted resize/collapse preferences in #90246 if maintainers want that follow-up. Do we have a high-confidence way to reproduce the issue? Yes. Current main source inspection gives a high-confidence path: chat supplies workspaceFiles, renderWorkspaceFileRail renders the rail whenever that prop exists, and the desktop grid reserves the right column. Is this the best way to solve the issue? Yes. The PR fixes the regression at the owner boundary by making rail visibility explicit state, gating load/render/layout on that state, and preserving file access through a toolbar toggle and close button. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 20c4e9475a7f. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +66, Tests +49. Total +115 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Closed as superseded by #92779. Maintainers chose the collapsed-strip Workspace Files UX instead of the fully hidden-by-default direction from this PR. The landed fix starts the panel collapsed by default and lets users expand it when needed. Final landed SHA: dbf24fe. Thanks @mushuiyu886! |
Summary
Fixes #90359
Real behavior proof
Behavior addressed: WebChat no longer shows or reserves the right-side
Workspace Filesrail by default after the v2026.6.1 regression, while preserving an explicit user path to open and close the rail.Real environment tested: Local Linux checkout with Node v22.22.0, the Control UI Vite dev server, and headless Google Chrome from
/usr/bin/google-chrome. The browser proof used the realopenclaw-appDOM with a connected test state and a fake gateway client only for theagents.files.listresponse.Exact steps or command run after this patch:
Evidence after fix:
{ "before": { "rail": false, "path": null, "file": null, "columns": "1142px", "expanded": "false", "disabled": false }, "opened": { "rail": true, "path": "/workspace", "file": "AGENTS.md ... 2 KB", "columns": "862px 280px", "expanded": "true", "disabled": false }, "closed": { "rail": false, "path": null, "file": null, "columns": "1142px", "expanded": "false", "disabled": false } }Observed result after fix: The initial chat render remains full-width with no
.chat-workspace-railand a single workbench column; clickingWorkspace filesopens the rail, loads and displaysAGENTS.md, and changes the workbench to a two-column layout; clicking the rail close button hides it and restores the single-column layout.What was not tested: I did not test a live OpenClaw daemon or a real workspace on disk; the browser proof injects a fake gateway client response because this change is limited to Control UI rendering and state transitions for the workspace files rail.
Regression Test Plan
ui/src/ui/views/chat.test.ts.workspaceFiles.open === falsekeeps the rail absent and the workbench unmodified, whileworkspaceFiles.open === truerenders the rail and close action.Root Cause
renderWorkspaceFileRail()treated the presence ofworkspaceFilesas an instruction to render the rail, and the workbench CSS always reserved a second grid column.