fix: budget modal content for the Lip Gloss v2 box (td-db183c) - #206
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-6feeds content width for the issue modal, markdown pre-render, and huh form widths.width+2, height+2), andhostContentWidthreturns its true interior (outer-4), which the surface fill covers.modalOuterWidthwasmodalWidth+2).Verification
pkg/monitor/modal_wrap_test.goguards it, and fails on the old-4math.go test ./...green.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's019a560f build: take td v0.59.0already 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