Skip to content

R8a: composer must never overlap the minimap or the token counter - #166

Merged
dovvnloading merged 1 commit into
mainfrom
r8a/canvas-collision-fix
Jul 28, 2026
Merged

R8a: composer must never overlap the minimap or the token counter#166
dovvnloading merged 1 commit into
mainfrom
r8a/canvas-collision-fix

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Problem

The composer island's width formula only reserved a thin margin from the minimap, and relied on a bare 7px vertical gap from the token counter - a razor-thin technical non-overlap, not a real design margin. At common window widths the composer's higher z-index let it visibly paint over both corners' chrome.

Change

Three independent, structural guarantees instead of one tuned distance:

  1. .app-composer-layer now reserves real horizontal space on both sides (left: 230px for the token counter's measured footprint, right: 232px for the minimap's) and centers the card within that narrowed box via flex - not the full viewport - so centering can never land it in territory either neighbor already owns.
  2. bottom: 64px still gives the token-counter side a second, independent vertical guarantee on top of that.
  3. Both the token counter and the minimap now sit on a new --gl-z-canvas-hud tier (21) that outranks the composer's app-layer tier (20) regardless of position - so even if the geometry above were ever wrong, neither can be painted over.

Test plan

  • Frontend: tsc --noEmit clean, lint 0 errors, 794 tests passed, build succeeds
  • Backend: 995 passed (unaffected, frontend-only change)
  • Verified live with real measured pixel gaps (not just "no overlap"): 26px clearance from the token counter and 19px from the minimap at the exact width the collision was first reported at, and confirmed no overlap at the app's real minimum window width (960px, per graphlink_desktop.py's own min_size)

The composer island's width formula only ever reserved clearance from the
minimap (a thin margin, not real space), and never accounted for the
token counter at all beyond a 7px vertical gap - a real but razor-thin
non-overlap that a font/padding change, or the composer picking up a
second line, could erase. At common window widths the composer could
visibly paint over both corners' chrome.

Fixed with three independent, structural guarantees instead of one tuned
distance:

1. The composer's layer now reserves REAL horizontal space on both sides
   (left:230px for the token counter's measured footprint, right:232px
   for the minimap's) and centers its card WITHIN that narrowed box, not
   the full viewport - centering can no longer land it in territory
   either neighbor already owns.
2. bottom:64px still gives the token-counter side a second, independent
   vertical guarantee on top of that.
3. Both the token counter and the minimap now sit on a new
   --gl-z-canvas-hud tier (21) that outranks the composer's app-layer
   tier (20) regardless of position - so even if the geometry above were
   ever wrong, neither can be painted over.

Verified live at the app's real minimum window width (960px, per
graphlink_desktop.py's own min_size) and at the width the collision was
first reported at, with real measured pixel gaps on both sides, not just
an absence of overlap.
@dovvnloading
dovvnloading merged commit f02eca2 into main Jul 28, 2026
2 checks passed
@dovvnloading
dovvnloading deleted the r8a/canvas-collision-fix branch July 28, 2026 19:33
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