Repository navigation
fix(ui): lead the Files panel with the project browser instead of a placeholder - #125138
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 3:26 AM ET / 07:26 UTC. ClawSweeper reviewWhat this changesThis PR makes an empty session’s Files tab lead with the project file browser instead of a generic placeholder, and updates the cold-open panel contract. Merge readinessKeep open for protected maintainer review. The focused UI patch correctly removes a redundant generic placeholder while preserving the project browser’s directory-specific empty state; no actionable correctness or security finding was identified. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI chat workspace rail combines session file activity with a project browser. The shared side-panel definitions pass that rail into the Files tab, where the rail decides whether to show session sections or the browser’s own empty-directory result. flowchart LR
A[Chat session] --> B[Files tab]
B --> C[Workspace rail]
C --> D{Session files or artifacts?}
D -->|Yes| E[Session file sections]
D -->|No| F[Project file browser]
E --> G[Files panel]
F --> G
Decision needed
Why: The PR carries the protected maintainer label, so cleanup automation must leave the final landing decision to a human despite the clean review. Before merge
Agent review detailsSecurityNone. PR surfaceSource -5, Tests +1. Total -4 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the deletion-based rendering rule and approve it after normal maintainer review and exact-head merge checks. Do we have a high-confidence way to reproduce the issue? Yes—an empty-session mock deterministically supplies no session files and an empty browser, and the changed conditional selects the browser instead of the generic placeholder. Is this the best way to solve the issue? Yes—the existing project-browser renderer already provides the specific empty-directory outcome, so deleting the competing generic state is the narrowest maintainable repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f59e945013db. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready review completed for exact head ClawSweeper review: #125138 (comment)
Local proof: Fresh review: Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/32005207250 ( |
What Problem This Solves
Opening the Files tab on a session that had touched no files produced three separate "nothing here"
messages stacked in one panel: the summary chips reading
0 changed · 0 read · 0 artifacts · 0 shown, ageneric centered empty state rendered inside the scroll area ("Files — Browse files, artifacts, and
changes from this session."), and below it the project browser with its own, more specific "No files in
this folder."
Unlike the Review dead end this panel was never silent — the rail loads eagerly — but it led with a
placeholder while the genuinely useful surface, the project file browser, was pushed below the fold.
Why This Change Was Made
Same move the Review panel got in #124824 and the contract formalized in #125105: a panel's default state
should be a real document, not a placeholder describing what the panel would show if it had one. The
project browser is what an operator can actually use when the session has touched nothing, so it owns the
panel; the session sections (Changed / Read / Artifacts) render only when they have entries.
Judgment calls, stated for the record:
about the session, and keeping them avoids the panel silently changing shape as counts cross zero.
generic placeholder it replaces.
Changed/Read/Artifacts sections when those appear.
User Impact
The Files panel opens onto a usable file browser instead of a placeholder. No change to what the rail loads
or when, to the diff action, or to the workspace rail's collapsed default.
Evidence
Captured from the mocked Control UI dev server at this commit's exact parent and at its head.
The characterization test from #124950 recorded Files as
{ outcome: "generic-empty" }. That expectationwas one of the wrong answers it deliberately captured, and this PR flips it to
{ outcome: "content" }withan inline comment marking the change as intentional — so a future reader can tell a purposeful flip from
drift. Every other slot's expectation is untouched, as are
chat-session-diff.e2e.test.ts,chat-sidebar-region.test.ts,terminal-open.e2e.test.ts, andchat-session-workspace.test.ts.pnpm check:changedgreen; Codex autoreview clean.reviewMetrics — production vs test LOC: production
+4 / −9(net −5), tests+2 / −1. The fix is adeletion: the generic empty-state branch goes away and the session sections become conditional. Series
running total: −17 (#124950) +11 (#125019) +7 (#125105) −5 here = net −4 in production.
No
CHANGELOG.mdedit — release-only per repo policy; user-facing context lives in this body.