Skip to content

fix(client): the tab's process icon leaves the label, and stays on the cell path (UI/UX v3 N-3c) - #103

Merged
mizu-jun merged 1 commit into
masterfrom
n3c-process-icon-run
Aug 29, 2026
Merged

fix(client): the tab's process icon leaves the label, and stays on the cell path (UI/UX v3 N-3c)#103
mizu-jun merged 1 commit into
masterfrom
n3c-process-icon-run

Conversation

@mizu-jun

Copy link
Copy Markdown
Owner

Last of the three N-3 PRs, and the second time this phase's own spec turned out to be wrong about a premise.

What N-3c is for

The Nerd Font glyph for the foreground process was prepended to the label string, so after #102 it was measured and drawn as part of a chrome run. rasterize_chrome_char boxes a glyph to its advance without cropping to ink, and Nerd Font icons commonly overhang, so the icon was being drawn into a box that could cut it.

It is now drawn beside the label, in a slot the tab reserves through tab_width's icon_w parameter — the one #101 shipped and tested.

The spec said "draw it through the icon path". That would have been worse.

Checking D3 before building on it, from icons.rs:

Every codepoint below lives in the Private Use Area, which overlaps the Nerd Font range tab_icons.rs uses for terminal-content icons. They are only ever safe to draw through FontRole::Icon, which is what keeps the two sets from resolving against each other.

Routing a process glyph through the chrome icon path would have silently returned the bundled Fluent icon sitting at that codepoint — a wrong glyph, not a clipped one.

So the icon stays on the cell path, which is where it has always come from: it resolves against the user's terminal font, and it boxes a glyph to a whole cell rather than to its advance, which is the clipping fix. D3 is corrected in the spec with the evidence, and a test pins that the process glyph is not routed through the chrome icon path.

Verification

  • cargo fmt --check — clean
  • cargo clippy --workspace --all-targets -- -D warnings — no warnings
  • cargo test --workspace — 28 suites pass (tab_layout now 11 tests)
  • Not covered: appearance, and this one is worth a look on device with tab_bar.show_process_icon = true — CI's font stack has no Nerd Font, so nothing here can observe the glyph that is actually drawn (spec §6).

Stacked on #102 (merged). This closes N-3.

🤖 Generated with Claude Code

…e cell path (UI/UX v3 N-3c)

Last of the three N-3 PRs. The Nerd Font glyph for the foreground process was
prepended to the label string, so after N-3b it was measured and drawn as part
of a chrome run. `rasterize_chrome_char` boxes a glyph to its advance without
cropping to ink, and Nerd Font icons commonly overhang, so it drew the icon into
a box that could cut it.

It is now drawn beside the label, in a slot the tab reserves for it through
`tab_width`'s `icon_w` parameter — the one N-3a shipped and tested.

The spec's D3 said to draw it "through the icon path, which crops". Checking
that before building on it: `icons.rs` documents that the bundled Fluent
subset's codepoints "live in the Private Use Area, which overlaps the Nerd Font
range `tab_icons.rs` uses", and that they are only safe to draw through
`FontRole::Icon` precisely so the two sets cannot resolve against each other.
Asking the icon path for a process glyph would have silently returned a Fluent
icon at that codepoint — a wrong glyph rather than a clipped one.

So the icon stays on the cell path, which is where it has always come from: it
resolves against the user's terminal font and boxes a glyph to a whole cell
rather than to its advance, which is the clipping fix. D3 is corrected in the
spec with the evidence.

A test pins that the process glyph is not routed through the chrome icon path.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@github-actions

Copy link
Copy Markdown

Coverage report


Generated by cargo llvm-cov (workspace minus nexterm-client-gpu and nexterm-i18n).

@mizu-jun
mizu-jun merged commit ffa7d9c into master Aug 29, 2026
13 checks passed
@mizu-jun
mizu-jun deleted the n3c-process-icon-run branch August 29, 2026 23:56
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.

1 participant