Skip to content

Improve search sidebar and zoom controls#32

Merged
GordonBeeming merged 2 commits into
mainfrom
gb/search-sidebar-zoom
Jun 23, 2026
Merged

Improve search sidebar and zoom controls#32
GordonBeeming merged 2 commits into
mainfrom
gb/search-sidebar-zoom

Conversation

@GordonBeeming

Copy link
Copy Markdown
Owner

Summary

  • Move workspace content search results into the main sidebar body and widen the resizable sidebar limit.
  • Speed up workspace content search traversal by avoiding repeated full-tree rescans.
  • Remove the old upper zoom caps while keeping lower guards that prevent invalid app/editor sizing.

Test plan

  • npm test -- --run src/App.test.tsx --testNamePattern "zooms the editor and app"
  • cargo test ui_state_is_sanitized_deduplicated_and_persisted
  • ./run-tests.sh

Closes #31

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
@GordonBeeming GordonBeeming marked this pull request as ready for review June 23, 2026 11:14
Copilot AI review requested due to automatic review settings June 23, 2026 11:14

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the UI limits for editor font size, app zoom, and sidebar width, allowing smaller font sizes and zoom levels, and a wider sidebar. It also refactors the content search UI to toggle visibility with the file tree and adds corresponding tests. In the backend, the workspace search was refactored to use a queue-based BFS traversal. However, a review comment points out a performance bottleneck in this traversal, where creating a new WalkBuilder for each subdirectory causes redundant .gitignore parsing, and suggests refactoring to a single recursive walk.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src-tauri/src/workspace.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7415c47ea0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/App.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the workspace content search UX by moving content search results into the primary sidebar scroll area (replacing the cramped “above the tree” layout), increasing the sidebar’s maximum resizable width, and improving the Rust fallback traversal used for content search by avoiding repeated full-tree rescans. It also removes the previous upper caps for editor/app zoom while keeping minimum guards.

Changes:

  • Sidebar content search results now occupy the main sidebar body area and hide the file tree while active.
  • Sidebar maximum width cap increased (520px → 1040px) and persistence/sanitization updated accordingly.
  • Workspace content search traversal in Rust now walks directories incrementally (queue-based) instead of rescanning the root repeatedly with increasing depth.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/styles.css Adds a sidebar-specific search-results modifier to allow results to flex and scroll within the sidebar body.
src/App.tsx Moves content search results into the main sidebar area, hides the tree during content search, raises sidebar width cap, and removes upper zoom caps while keeping minimum sanitization.
src/App.test.tsx Updates/extends UI tests to assert the tree is hidden during content search and validates new zoom/resize behavior.
src-tauri/src/workspace.rs Reworks content search traversal to avoid repeated rescans by iterating directories via a queue with depth-1 walkers.
src-tauri/src/lib.rs Updates view/workspace UI state sanitization/constants for new min zooms and sidebar width cap; adjusts tests for removed upper clamps.
src-tauri/Cargo.lock Bumps memmap2 patch version.
scripts/smoke-test.mjs Updates smoke scenario interactions to open content search results and validate Escape-to-clear/close behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Address reviewer comments:
- Use a single recursive workspace search walker
- Keep filter and content search as separate sidebar modes
- Add default-on active file tree tracking setting

Co-authored-by: Codex <noreply@openai.com>
@GordonBeeming GordonBeeming merged commit f1a59ea into main Jun 23, 2026
2 of 4 checks passed
@GordonBeeming GordonBeeming deleted the gb/search-sidebar-zoom branch June 23, 2026 14:23
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.

Improve workspace search layout and responsiveness

2 participants