Skip to content

fix(ui): keep focused border above cwd bar - #399

Merged
forketyfork merged 1 commit into
mainfrom
fix/focused-border-cwd-bar
Sep 3, 2026
Merged

fix(ui): keep focused border above cwd bar#399
forketyfork merged 1 commit into
mainfrom
fix/focused-border-cwd-bar

Conversation

@forketyfork

Copy link
Copy Markdown
Owner

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 UiRoot rendering. Attention borders inset the focus border into the cwd bar's rectangle, exposing the otherwise hidden draw-order difference.

Test plan

  • Open Grid view with multiple terminal sessions.
  • Trigger a notification highlight on the focused terminal and verify the blue focus border remains above the cwd bar label.
  • Compare focused terminals with and without notification highlights for consistent border placement.

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.
@forketyfork
forketyfork marked this pull request as ready for review September 3, 2026 15:14
@forketyfork
forketyfork requested a balanced review from Copilot September 3, 2026 15:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 UiHost and 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.

@forketyfork
forketyfork merged commit 4cf3ee3 into main Sep 3, 2026
5 checks passed
@forketyfork
forketyfork deleted the fix/focused-border-cwd-bar branch September 3, 2026 15:19
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.

[Bug]: Blue focus border renders under cwd bar when notification highlight is active

2 participants