Skip to content

feat(workspace): the rail's scrollbar is thin, hidden at rest and revealed on hover or scroll (abilityai/trinity-enterprise#608) - #2736

Open
trinity-ability wants to merge 1 commit into
devfrom
feature/608-rail-scrollbar
Open

feat(workspace): the rail's scrollbar is thin, hidden at rest and revealed on hover or scroll (abilityai/trinity-enterprise#608)#2736
trinity-ability wants to merge 1 commit into
devfrom
feature/608-rail-scrollbar

Conversation

@trinity-ability

Copy link
Copy Markdown
Contributor

Summary

  • The Workspace rail's tab body (data-testid="portal-rail-body", its one scroll axis) gets a scoped rail-scroll style: scrollbar-width: thin with a transparent scrollbar-color at rest, the tertiary ink (gray-500 light / gray-400 dark, reduced alpha) revealed on :hover / :focus-within / .is-scrolling, 150ms fade, and a matching 6px rounded-thumb ::-webkit-scrollbar* block for Safari. Reveal changes colour only — never display / width / scrollbar-width / overflow — so nothing reflows. sm:-and-up only (the mobile sheet stays native); transition off under prefers-reduced-motion.
  • is-scrolling is a passive scroll listener holding a class ~800ms past the last event. Found in the capture, not designed in: Chromium on a Mac in the default "show scroll bars automatically" mode renders the standard-property bar as a native overlay that shows during scrolling only and never on hover, so with the rest colour transparent the CSS-only cut showed no bar at all.
  • Scope is the rail only: the global .dark ::-webkit-scrollbar rule in style.css is untouched; the sidebar list and the conversation transcript are a follow-up per the issue.

Changes

  • src/frontend/src/components/portal/PortalRail.vuerail-scroll class + is-scrolling binding on the body, the scroll listener (cleared on unmount), the scoped style block.
  • src/frontend/tests/unit/portalRail.spec.js — three source guards (hidden at rest on both engines and revealed on hover/focus/scroll; reveal rules set colour only and the WebKit width is fixed; tokens on both themes, sm-and-up, reduced-motion). The existing guard pinning the body's class string now includes rail-scroll (the one way to add the class to that string).
  • docs/memory/requirements/core-agent.md — AC-9 under 5.19 (the rail shell).
  • docs/memory/feature-flows/workspace-rail.md — the scrollbar section.

Test Plan

  • npm run test:unit — 125 files, 2735 tests pass (raw-color and loading-gate ratchets unchanged); npm run check:tokens OK
  • Layout stability proved mechanically: every descendant's getBoundingClientRect at rest vs hovered serialises identically, both themes (Playwright, Chromium)
  • Human feel check confirmed by the requester on the issue before this PR was opened (both themes, Chrome on macOS) — abilityai/trinity-enterprise#608
  • Safari (WebKit block) and classic-scrollbar mode (Windows/Linux, macOS "Always") — verified by source only; the standard pair and the WebKit block are kept visually identical

Fixes abilityai/trinity-enterprise#608

🤖 Generated with Claude Code

https://claude.ai/code/session_018LigrhfzBXbTBCdoeQ69if

…ealed on hover or scroll (Abilityai/trinity-enterprise#608)

The Workspace rail's one scroll axis (the tab body) showed a stock
scrollbar: the global 8px painted bar in dark mode, the browser default in
light — and because any `::-webkit-scrollbar` rule opts an element out of
macOS overlay bars, a dark-mode Mac saw an always-on bar where the light
rail hid its bar when idle. The two themes disagreed about scrollbar weight.

A scoped `rail-scroll` style on that one container makes both behave like
the good case and thinner: `scrollbar-width: thin` with a transparent
`scrollbar-color` at rest, the tertiary ink (gray-500 light / gray-400
dark, at reduced alpha) on `:hover` / `:focus-within` / `.is-scrolling`,
with a 150ms fade; a parallel `::-webkit-scrollbar*` block gives Safari the
same 6px rounded thumb. Reveal changes colour only — never display, width,
scrollbar-width or overflow — so content wraps byte-identically hovered or
not (proved by comparing every descendant's bounding rect at rest vs
hovered, both themes). `sm:`-and-up only, so the mobile sheet stays native;
the transition is off under prefers-reduced-motion.

`is-scrolling` is a passive scroll listener holding a class ~800ms past the
last event. It was found in the capture, not designed in: Chromium on a Mac
in the default "show scroll bars automatically" mode renders the
standard-property bar as a native overlay that shows during scrolling only
and never on hover, so with the rest colour transparent the CSS-only cut
showed no bar at all, in either theme.

The global dark rule in style.css is untouched; the sidebar list and the
transcript are a follow-up. Human feel check confirmed on the issue.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LigrhfzBXbTBCdoeQ69if
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