Skip to content

fix: remove html{zoom:1.2} to kill phantom scrollbars; restore editor bars - #147

Merged
BorisTyshkevich merged 1 commit into
mainfrom
fix/consistent-scrollbars
Jul 4, 2026
Merged

fix: remove html{zoom:1.2} to kill phantom scrollbars; restore editor bars#147
BorisTyshkevich merged 1 commit into
mainfrom
fix/consistent-scrollbars

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

What & why

The console has rendered at 1.2× via html{zoom} since the first commit (a larger default size). But zoom:1.2 (= 6/5) lands element box sizes on fractional device pixels, and the leftover sub-pixel makes a scroll container read as "scrollable by ~1px" over content that visibly fits — painting a phantom scrollbar. The CodeMirror editor was the most visible victim; #145 dodged it by hiding the editor's bars outright on both axes, but the rest of the UI still showed spurious bars at some window sizes. (The same rounding drove the Safari viewport-unit divergence, #70.)

This is the root-cause fix the user identified: set --zoom: 1 (native size; users enlarge with browser zoom, ⌘+).

Behavior now

With no zoom rounding, the editor drops the #145 bar-hiding and uses the app's standard themed scrollbars like every other pane:

Editor content Vertical bar Horizontal bar
Short query (fits)
Long line
Many lines
Back to short

The whole UI is ~20% smaller than before.

Why this is low-risk

--zoom: 1 puts every engine into the exact state the @supports not (zoom:1) fallback already defined and tested. So the zoom-bridging machinery (--vp-zoom runtime measurement, Chart-hover / menu-anchor / splitter zoom correction) is now dormant at divisor 1 rather than removed — nothing to re-verify against a new code path. Full teardown of that now-dead code is a separate follow-up (roadmap #68, originally gated on GraphSurface #66).

Verification

  • 1337 unit tests pass, coverage gate green (the zoom-support tests exercise the divisor function, unaffected by the CSS value).
  • Live on otel (bundled artifact, Chrome): short query → no bars; long line → horizontal bar; many lines → vertical bar; back-to-short clears. Iterated with the reporter through several deploys to this exact result.
  • Fullscreen graph panel (the memory-flagged sensitive area) measures --vp-zoom = 1 and computes to viewport − 48px (fits one screen).

Note on the investigation

An initial attempt using standard scrollbar-width/scrollbar-color was reverted: those are unsupported on Safari 17.6, and scrollbar-color disables Chrome's overlay auto-hide (forcing persistent bars) — a dead end. Removing the zoom is the real fix.

🤖 Generated with Claude Code

… bars

The console rendered at 1.2x via `html{zoom}` since the first commit. zoom:1.2
(=6/5) lands element box sizes on fractional device pixels, and the leftover
sub-pixel made scroll containers read as scrollable-by-~1px over content that
visibly fit — a phantom scrollbar. #145 dodged it on the editor by hiding its
bars entirely (both axes); the rest of the UI still showed spurious bars at
some window sizes. (The same rounding drove the Safari viewport divergence #70.)

Set --zoom:1 (native size; users enlarge with browser zoom). This puts every
engine into the state the `@supports not (zoom:1)` fallback already defined and
tested, so the zoom-bridging machinery (--vp-zoom measurement, Chart/menu/
splitter correction) is now dormant at divisor 1 rather than removed — full
teardown tracked in roadmap #68. With no rounding the editor uses the app's
standard themed scrollbars like every pane: a vertical bar for a long query, a
horizontal bar for a long line, and nothing when it fits.

Verified live on otel through the bundled artifact: short query → no bars,
long line → horizontal bar, many lines → vertical bar, back-to-short clears;
fullscreen graph panel measures --vp-zoom=1 and fits one screen. 1337 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXHG1CxKa5vm4SzNUQ8iWW
@BorisTyshkevich
BorisTyshkevich merged commit 341828b into main Jul 4, 2026
6 checks passed
@BorisTyshkevich
BorisTyshkevich deleted the fix/consistent-scrollbars branch July 12, 2026 03:39
BorisTyshkevich added a commit that referenced this pull request Jul 15, 2026
… scaffolding (#245)

PR #147 set --zoom:1 (native page scale), making the whole zoom-correction
layer a no-op. This tears it out: html{zoom}, --zoom/--vp-zoom, and the
@supports fallback are gone from styles.css; the fullscreen overlay and
detached-tab panels size off plain 100%/native full-height layout instead of
calc(.../var(--vp-zoom)). zoom-support.js, app.measureViewportZoom/
applyViewportZoom/vpZoom, and detached-view's --vp-zoom mirroring are
deleted. zoomScale() is deleted; fixedAnchor/dragValue/colResizeWidth/
schema-detail resize/the cell-detail drawer all drop their scale argument
and operate on native coordinates. Chart.js's unzoomChartEvent/
installChartZoomFix pointer-event correction is removed (cross-realm resize
fix is untouched). The synthetic zoom e2e harness is deleted in favor of a
real boundingBox assertion on the existing fullscreen-overlay e2e test.


Claude-Session: https://claude.ai/code/session_01PQbDSVDUTUk1bA8891cX9y

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant