fix(ui): keep focused border above cwd bar - #399
Merged
Conversation
Issue: Fix #259, where a focused terminal with an active notification highlight could draw its blue border underneath the cwd bar label. Solution: Share the focused-border rendering between the scene renderer and cwd-bar component while preserving the existing attention inset and normal focus fill behavior. Propagate the exact attention state to the UI host so the cwd bar can reassert the border after its label, and cover the inset geometry with a regression test.
There was a problem hiding this comment.
🟢 Approval recommended
The focused-border rendering is consistently shared, correctly layered, and covered by a focused regression test.
Pull request overview
Fixes focused-border z-ordering over Grid-view cwd bars when attention highlighting is active.
Changes:
- Extracts and tests shared focus-border rendering.
- Redraws the focused border after cwd-bar labels.
- Propagates attention state through
UiHostand documents the flow.
File summaries
| File | Description |
|---|---|
src/ui/types.zig |
Adds per-session attention state. |
src/ui/components/cwd_bar.zig |
Reapplies the focused border after rendering. |
src/render/renderer.zig |
Extracts and tests focused-border geometry/rendering. |
src/app/ui_host.zig |
Populates attention state from session views. |
docs/ARCHITECTURE.md |
Documents shared border rendering and z-order. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Issue
Fixes #259. In Grid view, focusing a terminal with an active notification highlight could leave the blue focus border underneath the cwd bar label.
Solution
The renderer and cwd-bar component now share the focused-border primitive. The cwd bar reapplies the border after drawing its label, preserving the same z-order for highlighted and ordinary focused tiles without duplicating the normal translucent focus fill.
The exact per-session attention state is passed through the UI host, and focused-border inset geometry is covered by a regression test.
Context
The issue was caused by scene rendering occurring before
UiRootrendering. Attention borders inset the focus border into the cwd bar's rectangle, exposing the otherwise hidden draw-order difference.Test plan