feat(tui): dim backdrops behind modals and exposé previews - #167
Conversation
Standardizes background recession in one place: "faint" keeps colors but dims via SGR-2 reinjection (for compositing a dimmed backdrop behind a crisp overlay), "soft"/"deep" strip color and flatten to a single 256-color gray (for receding content beneath foreground chrome). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When a centered overlay is active, recede the base frame (faint) so the modal box, which overdraws its rectangle at full brightness, reads clearly above it. The stored base stays raw, so dismissal redraws bright. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Flatten each captured pane preview to gray (selected tile brightest, others dimmer) so the tile border, title, and status pill — which keep their live state colors — read clearly as foreground. Extends the existing selected/unselected border model to the preview body. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a Changesrecede() ANSI dimming and rendering integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
The faint regex only matched bare resets; a reset-led combined form like \x1b[0;1m would clear faint and leave the rest of a backdrop bright. Match any reset-led SGR so faint resumes after it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Concurrent sub-agent review note (orphan finding, not blocking this PR):
Everything else the sub-agent checked (perf gating, exposé width/alignment, tile-height overflow, selected-tile flatten consistency, consumers of |
What
Adds background dimming to two TUI surfaces so the foreground layer reads clearly above its backdrop.
How
recede(text, mode)primitive insrc/tui/render/theme.ts:"faint"— keeps colors but dims via SGR-2, re-injecting faint after embedded resets (for the dashboard backdrop, which is pre-styled)."soft"/"deep"— strip color and flatten to a single 256-color gray (for exposé previews); fully portable, visible width preserved.writeFrame(dashboard-state-methods.ts) gates on an active overlay;drawTile(expose.ts) maps preview rows. The stored dashboard base stays raw, so dismissal redraws bright.Notes
Tests
recedeunit tests (faint reinjection, flatten levels, width preservation, empty input).writeFramecomposite assertion.drawTiletest: captured colors stripped → gray, selected (250) vs unselected (240), plain text preserved.yarn buildclean.🤖 Generated with Claude Code
Summary by CodeRabbit