Skip to content

fix(render): mute banner band and rail interchange interior when their lines go inactive - #1940

Merged
pinin4fjords merged 7 commits into
mainfrom
fix/1895-inactive-muting-banner-rail
Sep 5, 2026
Merged

fix(render): mute banner band and rail interchange interior when their lines go inactive#1940
pinin4fjords merged 7 commits into
mainfrom
fix/1895-inactive-muting-banner-rail

Conversation

@pinin4fjords

Copy link
Copy Markdown
Member

Summary

Fixes #1895. Inactive-line muting was incomplete in two places:

  • Banner label band (icon terminus banners, e.g. file icons): the band fill/text were hardcoded module constants that bypassed the theme/muting system entirely, so they stayed full-strength while every sibling element correctly muted to grey. Now derived from theme.muted_line_color and mute as a coherent unit.
  • Rail interchange interior (link bar + knob cores): the outer casing already muted correctly, but the interior fill - the same mechanism as %%metro marker: glyph fills, which are intentionally exempt from muting elsewhere - stayed at its declared colour. After confirming with rendered before/after/mockup comparisons, the interior is now muted as a special case overriding the general marker-fill exemption for this piece of hardware, since a literal "mute strokes only" reading would leave a grey bar between two saturated knobs.

Test plan

  • New invariant tests added first, confirmed failing on base, passing after each fix (tests/test_inactive_lines.py)
  • Active-line renders confirmed byte-identical to base for all touched fixtures/examples (banner commits); rasterised colours confirmed identical for the interior-bar addressability commit (metadata-only, no visual change)
  • ruff check, ruff format --check clean
  • Targeted pytest: test_inactive_lines, test_render, test_corners, test_interchange, test_rail_mode, test_manifest(_standalone), test_markers - all passing
  • CI render-diff preview (posts automatically once checks run)

🤖 Generated with Claude Code

The banner strip drawn across a terminus file/files icon read its fill and
text colour from hardcoded module constants, so it stayed full-strength black
with white text even when every line touching the icon was inactive and the
rest of the map had greyed. Thread the existing muted flag from the terminus
icon render chain into the banner band and grey fill and text together as one
unit, so the strip recedes with its surroundings rather than leaving a stark
black band on an otherwise muted map.

Closes #1895 (banner-band half).
Resolve the banner band's fill/text pair once at the terminus icon call site
and hand the colours to the icon renderers, matching how fill, stroke, and
font colour are already resolved there. The muted band fill now reads
theme.muted_line_color instead of a second constant duplicating it, so a theme
overriding the muted colour greys the banner along with everything else.
A rail interchange carrying a %%metro marker: colour tinted its interior link
bar and knob cores with that declared colour, and the tint bypassed muting, so
a muted interchange kept a full-strength interior while its outer casing and
the rest of the map greyed. Thread the station's muted state through
_render_rail_pill and _render_interchange so the interior tint resolves to
theme.muted_line_color when the station is muted, overriding the marker-fill
exemption. An untinted interchange keeps its background station fill, and the
outer casing is unchanged.

Closes #1895 (rail-interchange half).
…ix for #1895

The interior link bar was the only layer of the interchange glyph drawn without
a class or station id, while the outline bar and both knob layers already carry
them. Tag it with nf-metro-rail-connector-interior and the station data like its
outline sibling, so it is addressable by station id and the muting test can
match it the same way as every other glyph layer rather than guessing by path
coordinates.
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Render preview is ready for review:
🖼️ https://seqeralabs.github.io/nf-metro/_pr/1940/

This preview shows only the renders that changed compared to main.

github-actions Bot added a commit that referenced this pull request Sep 5, 2026
…iff corpus

The inactive_lines gallery example now routes its two inactive subworkflows
through a shared cross-track interchange carrying a declared marker colour and
ends one of them at a banner file icon. Rendered with no CLI flags, both the
interchange interior and the banner band render muted, so the render-diff corpus
covers this muting on every PR rather than only the unit tests. Reconcile the
corpus topology digest for the changed fixture.

Refs #1895.
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
The muted band fill resolves from the theme's muted_line_color at the render
call site, so pair the muted label colour with that rather than a constant.
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
…topology

Adding the shared interchange and banner terminus to the inactive_lines example
grew its guard trace (23 -> 398 guard calls) and gave it the bypass,
icon_sole_continuation, and sole_continuation layout features. Regenerate the
guard-trace golden and register the three feature memberships in the hand-kept
manifest so both gates match the fixture's settled geometry.
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
@pinin4fjords
pinin4fjords marked this pull request as ready for review September 5, 2026 22:30
@pinin4fjords
pinin4fjords merged commit a1f0fc4 into main Sep 5, 2026
17 checks passed
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
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.

Inactive-line muting is incomplete: banner bands and rail interchange hardware stay full strength

1 participant