Skip to content

fix(results): vertical scroll + reliable ⌘A in the raw output pane#2

Merged
BorisTyshkevich merged 3 commits into
mainfrom
fix/output-pane-scroll-and-select-all
Jun 20, 2026
Merged

fix(results): vertical scroll + reliable ⌘A in the raw output pane#2
BorisTyshkevich merged 3 commits into
mainfrom
fix/output-pane-scroll-and-select-all

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

Two bugs reported in the data output pane (TSV/JSON raw view), both fixed and verified in-browser against the built bundle.

1. Vertical scroll didn't work (only horizontal)

.raw-text-view / .json-view used flex: 1, but their parent .res-body is a relatively-positioned block, not a flex container — so flex had no effect, the pane grew to its content height, and .res-body's overflow: hidden just clipped it. Horizontal worked because width was bounded. Fix: height: 100% + overflow: auto (same as .res-table-wrap), so both axes scroll.

2. ⌘A didn't select the pane on macOS

Detection required the pane to be focused (e.target.closest(...)), but macOS WebKit doesn't focus a tabindex <div> on click — so e.target stays <body> and the handler bailed. Re-keyed off "not editing + a raw pane is on screen" (document.querySelector) rather than focus. A focused editor/input still falls through to the native select-all (whole query), so ⌘A in the SQL editor is unchanged.

Verification (real browser, bundled code)

  • Tall pane (257px viewport / 2770px content): overflow-y: auto, scrollTop set and took → vertical scroll works; horizontal still works.
  • ⌘A fired as a real KeyboardEvent from <body> (pane not focused): selection equals the full pane text (exact match).
  • npm test → 333 pass; shortcuts.js and results.js at 100% coverage.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef

Isolator acm and others added 3 commits June 20, 2026 00:11
Two bugs in the TSV/JSON output pane:

- Vertical scroll didn't work (only horizontal). .raw-text-view/.json-view used
  `flex: 1`, but their parent .res-body is a relatively-positioned block, not a
  flex container — so flex had no effect and the pane grew to content height with
  no scroll (the parent just clipped it). Use `height: 100%` + overflow:auto like
  .res-table-wrap, so both axes scroll.

- ⌘A didn't select the pane on macOS. Detection required the pane to be focused
  (e.target.closest), but macOS WebKit doesn't focus a tabindex <div> on click,
  so e.target stayed <body>. Re-key off "not editing + a raw pane is on screen"
  (document.querySelector) instead of focus; a focused editor/input still gets
  the native select-all (whole query).

Verified in-browser against the built bundle: tall pane scrolls vertically; ⌘A
fired from <body> selects the entire pane text. 333 tests pass; shortcuts.js +
results.js at 100%.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
Root cause of the "16 rows don't scroll, 2000 do" report. `html { zoom: 1.2 }`
combined with `#root { height: 100vh }`: `vh` units ignore `zoom`, so 100vh
(= viewport px) is then scaled ×1.2 and #root renders ~120vh tall. The whole
shell overflowed the window by ~20% (measured: 970px tall in an 808px viewport),
pushing the results pane's lower portion below the fold — and html is
overflow:hidden, so the page can't scroll to reach it. With a tall result the
inner pane's own scrollbar bridged the gap (so 2000 rows "worked"); with a short
result the off-screen rows were simply unreachable.

Use `height: 100%` (cascades html→body→#root, and % scales with zoom) so the
shell is bounded to the viewport. Verified in-browser: #root/main-row/res-body
all bottom-out exactly at the viewport; the 16-row table sits fully on screen
and its pane scrolls. 333 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
- Header: rename "Sign out" → "Log Out" and add a GitHub-logo link (new
  Icon.github, opens the repo in a new tab, rel=noopener). svgFilled gains
  optional viewBox args so the 24×24 octocat path renders at 15px.
- History panel: remove the "Clear history" row (looked out of place); per-row
  delete is enough. clearHistory() stays as a tested state op, just unused in UI.

Verified in-browser: header shows "Log Out" + GitHub icon; history lists rows
with per-row delete, no clear row. 334 tests pass; icons/saved-history at 100%.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
@BorisTyshkevich BorisTyshkevich merged commit 7665662 into main Jun 20, 2026
2 checks passed
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