feat(ui): reusable auto-hiding Aqua scrollbar for diff and terminal views#218
Merged
forketyfork merged 3 commits intomainfrom Feb 17, 2026
Merged
feat(ui): reusable auto-hiding Aqua scrollbar for diff and terminal views#218forketyfork merged 3 commits intomainfrom
forketyfork merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a reusable Aqua-style scrollbar widget and wires it into both the diff overlay and terminal views to unify scrollbar rendering/interaction, including auto-hide fade behavior and drag/track-click scrolling (replacing the terminal’s prior yellow indicator bar).
Changes:
- Introduces
ui/components/scrollbar.zigwith state machine (fade/hover/drag), layout + hit-testing, and Aqua rendering + unit tests. - Integrates the shared scrollbar into the diff overlay and terminal interaction/rendering paths (including idle-frame requests during fades).
- Updates renderer/runtime to keep scrollbar DPI-aware via
ui_scale, and updates docs/README to reflect the new behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/ui/components/scrollbar.zig | New reusable scrollbar widget (math, state, rendering, tests). |
| src/ui/components/diff_overlay.zig | Replaces overlay-specific scrollbar with shared widget + input handling. |
| src/ui/components/session_interaction.zig | Adds terminal scrollbar hover/click/drag handling and per-frame state updates. |
| src/render/renderer.zig | Removes yellow scrollback indicator; renders terminal scrollbar using shared widget; threads ui_scale. |
| src/ui/session_view_state.zig | Persists per-session terminal scrollbar state. |
| src/app/runtime.zig | Passes ui_scale into renderer for DPI-aware scrollbar rendering. |
| docs/ARCHITECTURE.md | Documents scrollbar component/state + renderer responsibilities. |
| README.md | Updates feature list to mention the new terminal scrollbar behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: feat(ui): reusable auto-hiding Aqua scrollbar for diff and terminal views
Issue/PR linkage: Closes #209
Summary
Added a reusable Aqua-style scrollbar widget and integrated it into both the diff overlay and terminal views so scroll position, interaction, and visuals are consistent across scrollable surfaces. The widget supports fade-in/fade-out auto-hide behavior, thumb drag, and track click-to-jump, while removing the old terminal yellow scroll indicator bar and keeping rendering DPI-aware.
Changes
src/ui/components/scrollbar.zig: added reusable scrollbar widget state, layout math, hit testing, drag/click mapping, Aqua rendering, fade behavior, and unit tests.src/ui/components/diff_overlay.zig: replaced fullscreen overlay scrollbar rendering with shared widget; added hover/drag/click interaction and frame-demand handling during fades.src/ui/components/session_interaction.zig: added terminal scrollbar input handling (hover, track click, thumb drag) and per-frame scrollbar state updates.src/render/renderer.zig: removed yellow 4px scrollback indicator and added terminal scrollbar rendering via shared widget and ghostty-vt scrollbar metrics.src/ui/session_view_state.zig: added per-session terminal scrollbar state storage.src/app/runtime.zig: passedui_scaleinto renderer to keep scrollbar rendering DPI-aware.README.md: updated feature description to mention the new auto-hiding draggable terminal scrollbar.docs/ARCHITECTURE.md: documented scrollbar component/state and renderer responsibility updates.For Features
New behavior: Users now get a consistent, auto-hiding Aqua-style scrollbar in diff and terminal views, with drag-to-scroll and track click-to-jump behavior.
Docs updated:
README.md,docs/ARCHITECTURE.mdChecklist
Manual Steps Required
None