Skip to content

fix(web): keep the floating pill nav within the viewport - #92

Merged
maarco merged 2 commits into
mainfrom
fix/pill-nav-viewport
Sep 29, 2026
Merged

maarco merged 2 commits into
mainfrom
fix/pill-nav-viewport

Conversation

@maarco

@maarco maarco commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

What Changed

  • The docked pill's position along its edge is clamped from its measured size, so both ends stay 20px inside the window on all four docks. The clamped value is saved.
  • The pill's size cap now comes from the viewport and the pill scale instead of its saved position, so the border wraps the whole pill.
  • With the pill unlocked, dragging from the grip moves the pill. A drag no longer toggles the lock; a click still does.
  • Workspace headers move down only while the pill overlaps the top header band, using the pill's real rectangle. A pill docked left or right never moves the header.

Why

A pill saved near either end of its edge (10% or 90%) was centred on that percentage whatever its width, so in a narrower window part of it sat outside the viewport. Its size cap also shrank toward those ends, so most controls were cut off. The header spacing only handled a top dock, so a pill dragged across the header could cover the title.

UI Changes

No screenshots are attached. Measured in a running app at 820px wide with the pill saved at 10% along its edge:

Dock Before (main) After
Top pill 124px wide, most controls cut off pill 709px wide, all controls visible, 20px from the left edge
Left pill 140px tall, most controls cut off pill 673px tall, all controls visible, 20px from the top edge

The bottom and right docks use the same clamp, and all eight dock and offset combinations (top, bottom, left, right at 10% and 90%) stayed inside the window with a 20px margin. At 390px wide the pill is the full-width top rail, before and after.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (not attached; measurements above)
  • I included a video for animation/interaction changes (n/a: no animation change)

A pill docked to the left or right edge reserved its full height above the workspace header, so the header moved down 701px in a live check at 820px wide. Side-docked pills now reserve nothing; only a pill over the top header band does.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 29, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −19 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +2 B (+0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB −21 B (−0.3%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 9 9 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB +18 B (+0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −6 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +24 B (+0.4%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 8 9 +1 (+12.5%) 21 ✅

Baseline: db6fa48 · PR result: 11c571e · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@maarco
maarco merged commit b99b215 into main Sep 29, 2026
18 of 19 checks passed
@maarco
maarco deleted the fix/pill-nav-viewport branch September 29, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant