Skip to content

Move the file explorer into an independent right sidebar - #340

Open
jsgrrchg wants to merge 17 commits into
zeronsh:mainfrom
jsgrrchg:zeron/right-sidebar-file-tree
Open

Move the file explorer into an independent right sidebar#340
jsgrrchg wants to merge 17 commits into
zeronsh:mainfrom
jsgrrchg:zeron/right-sidebar-file-tree

Conversation

@jsgrrchg

@jsgrrchg jsgrrchg commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

The workspace explorer now lives in its own right sidebar. Opening a file creates or focuses an editor tab while the tree remains available beside files, diffs, terminals, browser tabs, and subagent transcripts.

The central panel's empty-state selector and + menu offer only surfaces that open there: Browser, Terminal, Diffs, and History (git entries are shown where available). Files is removed from both menus because the explorer has its own folder button in the topbar. Selecting a file in the tree still opens its editor tab in the central panel.

Each chat retains its explorer state, including search, expanded folders, and selection. Switching file tabs reveals the active file without clearing an ongoing search. Editors no longer load hidden trees, and open documents continue receiving filesystem updates when the explorer is closed.

Files and the surface panel always occupy separate columns. The explorer yields preferred width before reducing the chat and editor minima; narrower windows share the available space without overlapping panels. Preferred widths are restored when space returns. Tab headers, resize handles, expanded mode, and animations use the same width allocation, and Files follows the sidebar's theme and frost treatment.

Validation:

  • Latest full UI run after the upstream update: cargo test --release --locked -p zeron-ui --lib -- --test-threads=1, 908 passed.
  • cargo check --release --locked -p zeron: passed on Linux, including the final menu cleanup.
  • Coverage includes layout budgets, session ownership, file selection, external updates, renames, deletion, and explorer cleanup. The layout was also checked visually on Linux before the upstream merge.
  • macOS and Windows runtime behavior has not been tested locally.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@jsgrrchg
jsgrrchg marked this pull request as ready for review September 13, 2026 01:15
@jsgrrchg

Copy link
Copy Markdown
Contributor Author

updating tests

@wingleeio wingleeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed d797a04735bad2650a2dc7df429a38c5fa02c4fe. One low-priority regression is noted inline: activating an empty directory from search leaves the search view open instead of revealing the directory.

Validation: cargo test --locked -p zeron-ui --lib -- --test-threads=1 passed 908/908 on Linux. The real workspace/RPC fixture also passed under X11, covering separate columns, narrow and expanded layouts, file tabs, inactive-chat navigation rejection, external updates with Files hidden, rename/delete handling, and explorer cleanup. A separate test-only probe confirmed the directory-search regression. macOS and Windows runtime behavior was not tested locally.

Screenshots are real application captures, uploaded as GitHub user attachments. The first three use the unmodified PR fixture; the last two extend that fixture with an empty directory and search activation, without changing production behavior.

Scenario Screenshot
Editor and independent explorer — 1400px Editor and independent explorer — 1400px
Expanded editor with explorer — 1400px Expanded editor with explorer — 1400px
Narrow window — 1000px Narrow window — 1000px
Empty directory search, before activation Empty directory search, before activation
After activation: search remains visible After activation: search remains visible

Comment thread crates/ui/src/files/search.rs

@wingleeio wingleeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed f53a33be9188bcf32019ac95116d419f8ab2ec97. No new findings; the previous P3 is fixed.

Repeated the original empty-directory reproduction against the real workspace/RPC: activation now clears search, selects the directory in the visible tree, and opens no editor. Passive editor-tab synchronization still preserves the search query in the regression tests.

Validation: all 909 UI tests passed with cargo test --locked -p zeron-ui --lib -- --test-threads=1. The X11 workspace fixture also passed, including normal/narrow/expanded layouts, chat ownership, external file updates, renames, deletions, and explorer cleanup. macOS and Windows runtime behavior was not tested locally.

Fresh captures from this commit, using a test-only extension of the workspace fixture to reproduce the directory case; production code was unchanged. Images are hosted as GitHub user attachments.

Scenario Screenshot
Before activating the directory search result Before activating the directory search result
After activation: search cleared, directory revealed After activation: search cleared, directory revealed
Editor and independent explorer — 1400px Editor and independent explorer — 1400px
Narrow layout — 1000px Narrow layout — 1000px

@jsgrrchg

Copy link
Copy Markdown
Contributor Author

The failing macOS CI job needs to be rerun. The preview fixture exited before exercising the UI with Address already in use (os error 48), which appears to be a transient port-allocation race rather than an implementation failure. The other UI, iOS, Linux, and session-sync jobs passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants