Skip to content

fix(ui): lead the Files panel with the project browser instead of a placeholder - #125138

Merged
steipete merged 1 commit into
mainfrom
steipete/files-panel-project-browser
Aug 17, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/files-panel-project-browser

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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, a
generic 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:

  • Zero-count chips stay. They are a loaded-state summary, not an empty state — "0 changed" is a fact
    about the session, and keeping them avoids the panel silently changing shape as counts cross zero.
  • "No files in this folder." stays. That message is truthful and specific about a directory, unlike the
    generic placeholder it replaces.
  • "PROJECT FILES" keeps its label, because it still distinguishes project browsing from the session's
    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

Before After
Files panel with three stacked empty messages Files panel led by the project browser

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 expectation
was one of the wrong answers it deliberately captured, and this PR flips it to { outcome: "content" } with
an 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, and chat-session-workspace.test.ts.

 Test Files  3 passed (3)      Tests  13 passed (13)
 Test Files  2 passed (2)      Tests  33 passed (33)

pnpm check:changed green; Codex autoreview clean.

reviewMetrics — production vs test LOC: production +4 / −9 (net −5), tests +2 / −1. The fix is a
deletion: 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.md edit — release-only per repo policy; user-facing context lives in this body.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 17, 2026
@steipete
steipete marked this pull request as ready for review August 17, 2026 07:18
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 3:26 AM ET / 07:26 UTC.

ClawSweeper review

What this changes

This 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 readiness

⚠️ Ready for maintainer review - 2 items remain

Keep 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
Reviewed head: 97c9074fc4045f9c5acae0cacdb48ee2a40ccbe4
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused net-negative UI code, direct before/after evidence, and a targeted boundary contract make this a strong small patch.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.
Evidence reviewed 7 items Rendering owner: The changed conditional omits only the generic panel empty state when there are no session items; the browser section remains rendered immediately afterward.
Usable empty outcome: The browser renderer always produces a searchable browser section and emits the directory-specific no-files message when its entry list is empty.
Caller and panel boundary: Chat-pane rendering supplies the workspace rail as the shared workspace-panel content, and the shared definitions expose it as the Files slot.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Decision needed

Question Recommendation
Should maintainers approve this protected Files-panel usability fix after confirming the exact head remains green? Approve after exact-head checks: Accept the focused browser-first empty-session behavior once normal maintainer merge gates confirm the current head.

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

  • Complete next step (P2) - No repair lane is needed: this maintainer-labeled PR has no identified actionable defect and remains for normal human review.
Agent review details

Security

None.

PR surface

Source -5, Tests +1. Total -4 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 9 -5
Tests 1 2 1 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 6 10 -4

Review metrics

Metric Value Why it matters
Production versus test LOC production +4/-9 (net -5); tests +2/-1 (net +1) The behavior change removes a competing production empty-state branch while adding only a deliberate contract annotation.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a contained Control UI usability fix without evidence of data loss, delivery failure, setup blockage, or availability impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.

Label justifications:

  • P3: This is a contained Control UI usability fix without evidence of data loss, delivery failure, setup blockage, or availability impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR supplies before/after mocked Control UI captures at its parent and head plus focused UI results; attachment retrieval was unavailable in this reviewer environment but does not negate the submitted evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Current history attributes the panel-definition series and this Files-tab follow-up to the same contributor. (role: recent area contributor; confidence: high; commits: 07da6f6d6d4e, 3d1185f1373c, b1e76c4640bc; files: ui/src/pages/chat/components/chat-session-workspace.ts, ui/src/e2e/chat-sidebar-panel-contract.e2e.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready review completed for exact head 97c9074fc4045f9c5acae0cacdb48ee2a40ccbe4.

ClawSweeper review: #125138 (comment)

  • Protected owner decision: satisfied by the maintainer's explicit instruction to land this already-reviewed series commit after exact-head verification.
  • "Complete next step (P2)": satisfied; ClawSweeper found no repair lane necessary, fresh Codex autoreview reported no accepted/actionable findings, and exact-head CI is green.
  • Rank-up moves:: this review format contains no section by that name, so there are no additional moves to apply or skip.

Local proof:

pnpm test ui/src/pages/chat/components/chat-sidebar-region.test.ts ui/src/e2e/chat-sidebar-panel-contract.e2e.test.ts ui/src/e2e/chat-session-diff.e2e.test.ts ui/src/e2e/terminal-open.e2e.test.ts

Test Files  1 passed (1)
Tests  15 passed (15)
Test Files  3 passed (3)
Tests  13 passed (13)

Fresh review:

.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output
autoreview clean: no accepted/actionable findings reported

Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/32005207250 (GREEN). Existing before/after screenshots in the PR body were also inspected directly; no visual-proof gap remains.

@steipete
steipete merged commit 57e3ee6 into main Aug 17, 2026
197 checks passed
@steipete
steipete deleted the steipete/files-panel-project-browser branch August 17, 2026 08:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant