Skip to content

Comments

feat(ui): reusable auto-hiding Aqua scrollbar for diff and terminal views#218

Merged
forketyfork merged 3 commits intomainfrom
feat/209-aqua-scrollbar
Feb 17, 2026
Merged

feat(ui): reusable auto-hiding Aqua scrollbar for diff and terminal views#218
forketyfork merged 3 commits intomainfrom
feat/209-aqua-scrollbar

Conversation

@forketyfork
Copy link
Owner

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: passed ui_scale into 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.md

Checklist

  • All tasks from the issue are completed
  • Tests added/updated
  • All pre-commit hooks pass
  • All existing tests still pass
  • No new dependencies (or explicitly approved)
  • Docs updated (PRD / ARCHITECTURE / TRACEABILITY as applicable)
  • Commit messages follow conventional commits

Manual Steps Required

None

@forketyfork forketyfork marked this pull request as ready for review February 17, 2026 09:30
@forketyfork forketyfork requested a review from Copilot February 17, 2026 09:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.zig with 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.

@forketyfork forketyfork merged commit 72f5586 into main Feb 17, 2026
4 checks passed
@forketyfork forketyfork deleted the feat/209-aqua-scrollbar branch February 17, 2026 10:08
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.

[Feature]: Reusable auto-hiding scrollbar widget with macOS Aqua styling

1 participant