feat(tui-go): transparent modal backdrops
Modals now composite over a dimmed copy of the screen behind them instead of an opaque scrim, so the transcript stays faintly visible around a modal (opencode-style). center() stashes the frame's base (View sets m.lastBase), strips+dims it to a faint scrim, and splices the modal box over it (ANSI-aware via ansi.Truncate/TruncateLeft so the side margins keep the dimmed content). An idempotence guard passes an already-full-screen modal through unchanged, so the existing double-center builders don't get re-dimmed. Geometry tests assert the composite still fills the screen exactly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,8 @@ func (m Model) View() string {
|
||||
bottom,
|
||||
m.renderFooter(),
|
||||
)
|
||||
// Stash the base so center() can composite a modal over a dimmed copy of it.
|
||||
m.lastBase = base
|
||||
|
||||
if m.displayState() == StateClarification {
|
||||
return m.center(m.clarificationModal())
|
||||
|
||||
Reference in New Issue
Block a user