Skip to content

[Bug]: Story overlay scrollbar is a custom reimplementation instead of using the centralized scrollbar component #226

@forketyfork

Description

@forketyfork

Description

fullscreen_overlay.zig contains a bespoke renderScrollbar() method (lines 266–295) that manually draws a scrollbar using plain SDL FillRect calls. All other overlays (reader, diff, terminal) use the centralized src/ui/components/scrollbar.zig module, which provides DPI-aware layout computation, rounded gradient rendering, texture caching, and fade-in/fade-out animations. The story overlay's scrollbar therefore looks and behaves differently: no rounded thumb, no fade animation, no hover highlighting, and no drag or track-click interaction support.

Steps to Reproduce

Starting state: A story file is open in the story overlay with content tall enough to scroll.

  1. Open a story file so the story overlay is visible.
  2. Observe the scrollbar on the right side.
  3. Compare its appearance and behavior to the scrollbar in the reader or diff overlay.

Reproducibility: Always

Expected Behavior

The story overlay scrollbar matches the visual style and interaction behavior of all other scrollbars in the app: rounded thumb, fade-in/out animation, hover highlight, and drag/track-click support — all provided by scrollbar.zig.

Actual Behavior

The story overlay scrollbar is rendered as plain rectangles with no rounding, no animation, and no drag or hover interaction. It uses a separate, simpler code path in fullscreen_overlay.renderScrollbar().

Suspected Area

src/ui/components/fullscreen_overlay.zigrenderScrollbar() (lines 266–295) and src/ui/components/story_overlay.zig — the call site at line 575. Replace with scrollbar.computeLayout() + scrollbar.render() pattern used in reader_overlay.zig and diff_overlay.zig.

Acceptance Criteria

  • fullscreen_overlay.renderScrollbar() is removed and replaced with calls to the centralized scrollbar.zig module
  • The story overlay scrollbar visually matches the reader and diff overlay scrollbars (rounded, animated)
  • Drag and track-click interaction works on the story overlay scrollbar
  • Existing tests pass; no regressions in reader/diff/terminal scrollbar behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions