fix(tabs): a background pane says which tab it is showing - #32
Merged
Conversation
PaintTabChips computed an unfocused pane's selected chip and its siblings from the same expression, background and ink alike, so every chip in a background pane was painted byte-identically to the pane's own surface tone. The ▌ was no help: TabTitles only emits it on the focused pane. A chip now states one fact relative to its own strip — the selected tab is painted the plane its page is painted on, its siblings are recessed one BackdropScale step below it. Pane focus is not a parameter; it arrives folded into PaneSurfaceTone, so the cue is one ratio in every strip, on every theme, under every tint, and hue stays free to carry identity. Selection is also emboldened, in every pane, so it survives a terminal that flattens the chips; it composes with the unread tint into one markup tag, and costs no cells. The new `tabs` view is the frame: two tabs in the pane that does not hold the focus, which no existing view had — and is why no snapshot caught it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015nuKnWthnELNkrd86q5KWN
Comments here had grown into changelog: what the code used to do, which report a line answers, what a previous set of colours measured. None of that is recoverable value in pre-release software, and it buried the rationale that is. Keeps present-tense why a maintainer could not recover from the code — the TintDepth bound, the AtLuma direction split, why fields are reserved, why a route may not reach another session's spawn window — and drops the history around it. Also fixes a malformed doc block in UnreadBadge that closed <summary> twice. WorkspacePalette 338 -> 140 comment lines, RailRenderer 175 -> 112, Workspace 246 -> 176, TabTitles and UnreadBadge likewise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015nuKnWthnELNkrd86q5KWN
Same pass as the palette cluster, over the settings screens: keeps the present-tense rule a maintainer needs (why a targeted button is not a cursor stop, why F5 states its own pane layout, why the password note names the file it names) and drops the account of which report each line answers and what the row said before it said this. ScreenChrome 417 -> 337 comment lines, WorldsScreenRenderer 599 -> 494, ScreenModel 279 -> 243. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015nuKnWthnELNkrd86q5KWN
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (13)
WalkthroughThe PR adds a ChangesTab selection and rendering
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SharpMUTermApp
participant DemoScene
participant Workspace
participant TabTitles
SharpMUTermApp->>DemoScene: request ScenesWindowId
DemoScene->>Workspace: create Scenes window identifier
SharpMUTermApp->>Workspace: split workspace and move tabs
SharpMUTermApp->>TabTitles: render selected and unread state
TabTitles-->>SharpMUTermApp: styled tab title
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
This was referenced Aug 12, 2026
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.
There was no way to tell which tab an unfocused pane was showing.
PaintTabChipsderived the selected chip and its siblings from the sameexpression — background and ink — so in a pane that did not hold the focus
every chip was painted byte-identically to the pane's own surface tone. The
▌was no help either:
TabTitlesonly emits it on the focused pane.The model
A chip states one fact — is this the tab you are viewing — and states it
relative to its own strip:
PaneSurfaceToneWorkspacePalette.Recessed(surface)IdleInkPane focus is no longer a parameter. It arrives already folded into that plane —
PaneSurfaceTonehas tinted it for the character and lifted it for focus — sothe selection cue is one ratio inside every strip, on every theme, under every
tint, and hue stays free to carry identity. Both inks stay held to the
legibility floor against the chip they actually land on.
Selection is also emboldened, in every pane, so it survives a terminal that
flattens the chips. It composes with the unread tint into one markup tag rather
than two nested ones, because a background pane's front tab collects lines like
any other. Zero cells either way — every width the strip is measured by is
MarkupParser.StripLength.Two smaller things fixed on the way: the focused pane's active chip used the
untinted
ArmedBand(_theme)while the command line beneath it usedArmedBand(theme, tint), so a tinted character's chip wore the wrong hue; andUnreadBadgehad a doc block that closed<summary>twice.Verification
New
tabssnapshot view: two tabs in the pane that does not hold the focus.No existing view had that geometry, which is why no frame ever caught this. It
opens a third window for itself alone and re-activates the main window before
splitting, since opening brings a window to the front and a split carries the
tabs that are not.
Read off the rendered frame — right pane, unfocused: selected chip
(34,34,38),its own surface; sibling
(26,26,29), recessed. The regression pin failsagainst the old expression and passes against the new one (checked by reverting
the one term and re-running).
All five suites green: Core 936, Graphics 83, Scripting 42, Web 37, Tui 1772.
Not fixed here
The
│between chips and the─filling the rest of the strip are hardcodedColor.Greyin SharpConsoleUI'sTabControl.Rendering.cs, in all three headerstyles, with no override. That needs an upstream change.
Also on this branch
Two commits trimming comment narration, at the repo owner's request — comments
had grown into changelog (what the code used to do, which report a line
answers, what a previous set of colours measured). Present-tense rationale a
maintainer cannot recover from the code is kept; the history around it is gone.
Eight files so far:
WorkspacePalette338 → 140 comment lines,WorldsScreenRenderer599 → 494,ScreenChrome417 → 337,ScreenModel279 → 243,
Workspace246 → 176,RailRenderer175 → 112, plusTabTitlesand
UnreadBadge. This is an ongoing sweep — ~26,000 comment lines remainacross the rest of the repo — and more of it will land on this branch.
🤖 Generated with Claude Code
https://claude.ai/code/session_015nuKnWthnELNkrd86q5KWN
Summary by CodeRabbit
New Features
tabssnapshot view showcasing tab movement across panes.Documentation
Tests