Skip to content

Make workspace files panel collapsible#92757

Closed
sallyom wants to merge 1 commit into
openclaw:mainfrom
sallyom:feat/chat-workspace-files-panel-collapse
Closed

Make workspace files panel collapsible#92757
sallyom wants to merge 1 commit into
openclaw:mainfrom
sallyom:feat/chat-workspace-files-panel-collapse

Conversation

@sallyom

@sallyom sallyom commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a left-nav-style collapse affordance to the Chat Workspace Files panel.

  • Keeps Workspace Files as its own right-side panel instead of moving the toggle into the composer
  • Adds an expanded header collapse control and a narrow collapsed strip with a file icon plus expand control
  • Keeps the panel hidden below the existing 1120px responsive breakpoint, matching the left nav behavior
  • Avoids changing the existing file list data model so follow-up work can make the panel more useful

Fixes #90359.

This is a separate direction from #90380 rather than a replacement branch for that contributor PR.

Real behavior proof

  • Behavior or issue addressed: The Chat Workspace Files panel can now collapse and expand from its own panel control, matching the left navigation collapse experience while preserving the existing desktop breakpoint behavior.
  • Real environment tested: Local OpenClaw Gateway from this branch at http://127.0.0.1:18890/ with token auth, using the Control UI in a browser against the branch commit 00e0be2cee.
  • Exact steps or command run after this patch: Opened Chat, used the Workspace Files panel header control to collapse the panel, confirmed the collapsed right-side strip shows the file icon and expand control, expanded the panel again, then reduced the browser width below 1120px to confirm the files panel hides like the left nav.
  • Evidence after fix: Screen recording uploaded to this PR: https://github.com/user-attachments/assets/266557e1-b31e-4ec6-a6d3-70ffafb3fa5d and Screenshots: Make workspace files panel collapsible #92757 (comment)
  • Observed result after fix: The Workspace Files panel remains a dedicated right-side panel on desktop, collapses into a narrow strip with the file icon, expands back without using the composer toolbar, and disappears below the existing 1120px breakpoint.
  • What was not tested: This PR does not change which files are shown in the Workspace Files panel, and it does not add currently-used-file tracking; that follow-up is intentionally left for later work.
  • Proof limitations or environment constraints: None for the collapse/expand and breakpoint behavior covered by the recording.

Verification

  • node scripts/run-vitest.mjs ui/src/ui/views/chat.test.ts
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/ui/e2e/chat-flow.e2e.test.ts
  • node scripts/run-oxlint.mjs ui/src/ui/views/chat.test.ts ui/src/ui/e2e/chat-flow.e2e.test.ts ui/src/ui/views/chat.ts ui/src/ui/app-render.ts ui/src/ui/icons.ts ui/src/styles/chat/sidebar.css
  • pnpm test:changed - passed 4 Vitest shards
  • node scripts/crabbox-wrapper.mjs run -- --provider aws --idle-timeout 90m --ttl 240m --timing-json -- env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false corepack pnpm check:changed - passed on AWS Crabbox run_b9be0d527f81, lease cbx_30caa59fea82
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main - clean, no accepted/actionable findings

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Jun 13, 2026
@clawsweeper

clawsweeper Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed June 13, 2026, 2:13 PM ET / 18:13 UTC.

Summary
The PR adds a collapsible right-side Chat Workspace Files rail with expand/collapse controls, a collapsed strip, icon styling, and focused UI/E2E coverage.

PR surface: Source +103, Tests +81. Total +184 across 6 files.

Reproducibility: yes. for the linked regression at source level: current Chat passes workspaceFiles, renderWorkspaceFileRail renders the rail whenever that object exists, and desktop CSS reserves the right column. I did not run a live browser session during this read-only review.

Review metrics: 1 noteworthy metric.

  • Closing references: 1 linked issue. The PR would close the open Workspace Files default-rail regression, so the initial Chat behavior matters before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🐚 platinum hermit ✨ media proof bonus
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Choose whether this PR should become the default-hidden regression fix or remove the closing reference and land as a separate collapse affordance.

Risk before merge

Maintainer options:

  1. Make this the regression fix
    Change the initial state to hidden/full-width, load and render files only after explicit user intent, and update the proof/tests to cover default hidden plus open/close behavior.
  2. Land as a separate affordance
    Remove the closing reference and have maintainers explicitly accept the always-present collapsed-strip direction as a separate feature.
  3. Defer to the sibling fix
    Pause or close this branch if maintainers prefer Fix default chat workspace files rail #90380 as the narrower regression repair.

Next step before merge

  • [P2] The protected maintainer label and competing open UX direction make this a maintainer product decision rather than a safe automated repair lane.

Security
Cleared: The diff is limited to Control UI TypeScript, CSS, icons, and tests, with no dependency, workflow, package, secret, or code-execution surface changes.

Review findings

  • [P2] Keep the linked regression hidden by default — ui/src/ui/app-render.ts:704
Review details

Best possible solution:

Either make this branch the default-hidden/full-width regression fix, or remove the closing reference and keep the regression owned by #90380.

Do we have a high-confidence way to reproduce the issue?

Yes for the linked regression at source level: current Chat passes workspaceFiles, renderWorkspaceFileRail renders the rail whenever that object exists, and desktop CSS reserves the right column. I did not run a live browser session during this read-only review.

Is this the best way to solve the issue?

No as the best fix for the linked regression: the branch is a plausible collapse affordance, but it still starts from the expanded rail. It is only the best path if maintainers intentionally choose the right-strip UX and stop treating it as the regression fix.

Full review comments:

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ca2410ab072e.

Label changes

Label changes:

  • add P2: This is a normal-priority Web UI regression/UX fix with limited blast radius but real desktop Chat usability impact.
  • add merge-risk: 🚨 other: Merging the PR as-is could close the linked regression while preserving the reported default expanded rail behavior.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The uploaded recording and screenshots directly show the after-fix expanded panel, collapsed right strip, re-expand path, and responsive hiding behavior.
  • add proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The uploaded recording and screenshots directly show the after-fix expanded panel, collapsed right strip, re-expand path, and responsive hiding behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (recording): The uploaded recording and screenshots directly show the after-fix expanded panel, collapsed right strip, re-expand path, and responsive hiding behavior.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a normal-priority Web UI regression/UX fix with limited blast radius but real desktop Chat usability impact.
  • merge-risk: 🚨 other: Merging the PR as-is could close the linked regression while preserving the reported default expanded rail behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (recording): The uploaded recording and screenshots directly show the after-fix expanded panel, collapsed right strip, re-expand path, and responsive hiding behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The uploaded recording and screenshots directly show the after-fix expanded panel, collapsed right strip, re-expand path, and responsive hiding behavior.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The uploaded recording and screenshots directly show the after-fix expanded panel, collapsed right strip, re-expand path, and responsive hiding behavior.
Evidence reviewed

PR surface:

Source +103, Tests +81. Total +184 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 115 12 +103
Tests 2 82 1 +81
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 197 13 +184

What I checked:

  • Repository policy read: Root AGENTS.md and ui/AGENTS.md were read fully; the UI scoped guide did not add generated-locale concerns, while the root policy required full-surface UI review, proof assessment, and protected-label handling. (AGENTS.md:1, ca2410ab072e)
  • No matching maintainer note: Only .agents/maintainer-notes/telegram.md exists, so there was no matching Control UI maintainer note to apply for this PR.
  • Current main default rail path: Current main always passes a workspaceFiles object into renderChat for Chat, so the workspace rail render path is reachable during normal desktop Chat rendering. (ui/src/ui/app-render.ts:3536, ca2410ab072e)
  • Current main render gate: renderWorkspaceFileRail returns an aside whenever workspaceFiles is present, and the workbench reserves the second rail column on desktop widths. (ui/src/ui/views/chat.ts:1025, ca2410ab072e)
  • PR keeps initial state expanded: The PR adds collapsed state but initializes it to false and only skips loading while collapsed, so first Chat render still loads and shows the expanded rail. (ui/src/ui/app-render.ts:704, fdc23670e09c)
  • PR test locks expanded default: The added E2E test waits for the 'Collapse workspace files' button and AGENTS.md immediately after opening Chat, confirming the branch expects the expanded rail by default. (ui/src/ui/e2e/chat-flow.e2e.test.ts:242, fdc23670e09c)

Likely related people:

  • vincentkoc: Local blame for the current workspace rail render, auto-load, and desktop grid lines points to Vincent Koc in the current-main snapshot, and GitHub path history shows several recent Chat/app-render commits by this handle. (role: recent area contributor; confidence: high; commits: 2d2c1e63f0da, 439d2a9404ca, b3c946999d71; files: ui/src/ui/views/chat.ts, ui/src/ui/app-render.ts, ui/src/styles/chat/sidebar.css)
  • BunsDev: GitHub commit search for chat-workspace-rail points to the dashboard-v2 refactor by BunsDev/Val Alexander, which introduced the broader Chat view and rail styling surface this PR changes. (role: introduced chat rail surface; confidence: high; commits: f76a3c5225bb; files: ui/src/ui/views/chat.ts, ui/src/ui/app-render.ts, ui/src/styles/chat/sidebar.css)
  • steipete: Recent GitHub path history shows composer and Control UI chat work by steipete near the same Chat/app-render surface used by the proposed affordance. (role: adjacent UI contributor; confidence: medium; commits: 2b30951b8090, d328a0d7a0da, 12a56d4d46dd; files: ui/src/ui/views/chat.ts, ui/src/ui/app-render.ts, ui/src/styles/chat/sidebar.css)
  • sallyom: The PR author also appears in prior merged Chat history for the composer clear-on-send behavior, so they are relevant beyond only proposing this branch. (role: recent adjacent contributor; confidence: medium; commits: c1ce51546e5f; files: ui/src/ui/views/chat.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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

@sallyom
sallyom marked this pull request as ready for review June 13, 2026 17:53
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 13, 2026
@sallyom

sallyom commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@sallyom

sallyom commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

file panel open:
file-panel-open

file panel closed:
file-panel-closed

@sallyom
sallyom force-pushed the feat/chat-workspace-files-panel-collapse branch from 00e0be2 to fdc2367 Compare June 13, 2026 18:05
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 13, 2026
@shakkernerd shakkernerd self-assigned this Jun 13, 2026
@shakkernerd

shakkernerd commented Jun 13, 2026

Copy link
Copy Markdown
Member

Closed as superseded by #92779.

We kept this PR's collapsed-strip direction, but maintainers could not update this fork branch because maintainer edits were disabled and the protected push was rejected. I preserved the patch in a maintainer branch, added the default-collapsed fix, and landed it on main at dbf24fe.

Thanks @sallyom!

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 merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: “Workspace Files” right sidebar is shown by default in chat after upgrading to v2026.6.1

2 participants