Skip to content

fix: budget modal content for the Lip Gloss v2 box (td-db183c) - #206

Merged
marcus merged 1 commit into
mainfrom
ui-regression
Aug 18, 2026
Merged

fix: budget modal content for the Lip Gloss v2 box (td-db183c)#206
marcus merged 1 commit into
mainfrom
ui-regression

Conversation

@marcus

@marcus marcus commented Aug 18, 2026

Copy link
Copy Markdown
Owner

What

Wrapped text in monitor modals rendered jagged: stray words from the end of a wrapped log line landed on their own unindented line at the left margin. Same for descriptions and acceptance blocks.

Lip Gloss v2 counts border and padding inside Width(), but the legacy monitor modals still budgeted content for the v1 rule (modalWidth-4). Content ran exactly two cells past the box, so Lip Gloss re-wrapped the overrun onto its own line. Embedded (Sidecar) looked fine only because the host chrome path exposes a wider interior and never re-wraps.

Changes

  • modalInnerWidth(outer) = outer-6 feeds content width for the issue modal, markdown pre-render, and huh form widths.
  • Standalone and embedded modals agree on one outer box: a chrome renderer receives the same outer dimensions the standalone box occupies (was width+2, height+2), and hostContentWidth returns its true interior (outer-4), which the surface fill covers.
  • Kanban and notes host paths now fill the modal surface — the two chrome paths td-2930ee missed, which would otherwise show the same unpainted holes.
  • Form modal mouse hit-testing follows the corrected geometry (modalOuterWidth was modalWidth+2).

Verification

  • New pkg/monitor/modal_wrap_test.go guards it, and fails on the old -4 math.
  • Full go test ./... green.
  • Standalone checked in an isolated tmux server; embedded checked through Sidecar's real CreateTDModalRenderer — every frame line exactly terminal width.

Note

The separate "nothing shows up behind the modal in Sidecar" symptom was not a regression in this branch: Sidecar was pinned one commit before d54e0d5 (modal surface fill). Sidecar's 019a560f build: take td v0.59.0 already picks that up.

Reviewed as a self-review (td-db183c) — an independent look before release is welcome.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FQCMCWoXqrWTAf9EX4ii2n

Lip Gloss v2 counts border and padding inside Width, but the legacy
monitor modals still budgeted content for the v1 rule. Every wrapped log
line, description, and acceptance block ran two cells past the box, and
Lip Gloss re-wrapped the overrun onto its own unindented line.

Content is now built for outer-6. Standalone and embedded modals agree on
one outer box: a chrome renderer receives the same outer dimensions the
standalone box occupies, and its two-cell-thinner chrome exposes a wider
interior that the surface fill covers. The kanban and notes host paths
fill that surface too - they were the chrome paths td-2930ee missed - and
form modal mouse hit-testing follows the corrected geometry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FQCMCWoXqrWTAf9EX4ii2n
@marcus
marcus merged commit ade0f70 into main Aug 18, 2026
1 check passed
marcus added a commit that referenced this pull request Aug 18, 2026
@marcus
marcus deleted the ui-regression branch August 18, 2026 20: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