Polish the SharpConsoleUI shell: tables, toolbars, graphs, rhythm#809
Open
nickprotop wants to merge 9 commits into
Open
Polish the SharpConsoleUI shell: tables, toolbars, graphs, rhythm#809nickprotop wants to merge 9 commits into
nickprotop wants to merge 9 commits into
Conversation
Plans the follow-up to PR managedcode#735. Splits the 2178-line shell into 4 partials, converts 5 list pages to TableControl, replaces bottom buttons with selection-aware ToolbarControl, replaces tall PropertyPanel headers with one-line identity strips, and adds gradient-styled graphs to Home/Project/Analysis/Settings. NavigationView and modals are explicitly kept.
Shell.cs was 2178 lines and growing — well past the codebase ceiling. Split into: - Shell.cs (1148) — orchestration: RunAsync, CreateCommandCenter, status bars, modals, palette, theme, page-shortcut helpers, async callbacks - Home.cs (80) — BuildHomePage only - Catalog.cs (468) — Skills, Collections, Bundles, Packages, Agents - Workspace.cs (541) — Installed, Project, Analysis, Settings, RemoveAll/UpdateAll confirmations, About Zero behavior change. All partials of the same internal sealed class. Build clean, 0 warnings across all 4 projects. 613/613 tests pass.
…eaders Page headers were 5-row PanelControls that duplicated info already in the top StatusBar (project/scope/platform/catalog/target). They cost ~4 rows of vertical real estate per page above the actual data. Replace them with `BuildIdentityStrip(title, accent, …facts)` — a single MarkupControl row: `[bold accent]title[/] · label₁ value₁ · label₂ …`. The title carries the page identity in the accent color; the facts carry only what the StatusBar doesn't already (counts, filters, summary stats). Converted page headers: - Home: session - Catalog: skill browser, collection browser, bundles/packages, package signals, orchestration agents - Workspace: installed skills, project scan, catalog analysis, remove all, update all, workspace (settings) Detail-pane PropertyPanels (inside modals and Collections right-pane) stay — they're content, not page identity. About also stays since the property grid IS the page content. Reclaims ~4 rows per page for the data area in upcoming commits. No behavior change. Build clean, 613/613 tests pass.
…ject
Five list pages previously crammed three to five logical dimensions into
a single escaped-markup row (`{marker} {alias} [dim]{status}[/] …`).
Each is now a sortable TableControl with one column per dimension:
- Skills: Collection · Lane · Skill · Version · Tokens
- Bundles: Bundle · Title · Skills · Tokens
- Packages: Signal · Kind · Skill · Collection · Lane · Tokens
- Agents: Status · Agent · Description · Skills
- Project: Confidence · Status · Skill · Reasons
The modal-on-Enter flow is preserved end-to-end. The activator reads
SelectedRow.Tag (typed `as TheEntry`) so it stays correct when the user
re-sorts by clicking a column header — indexing into the source array
would break under user sort.
Default sort matches the legacy ListControl order baked into the array.
Numeric columns right-justified; status/confidence centred; existing
sortable Installed (Workspace) and heaviest-skills (Analysis) tables
unchanged.
Collections left rail and Command palette stay as ListControl — they
are narrow single-string browsers, not multi-column data grids.
Build clean, 613/613 tests pass.
Bulk actions on Installed / Project / Agents used to sit as full-width
ButtonControls beneath a 16-row scrollable table — often off-screen on a
default terminal, and visually indistinguishable from list rows.
Move them into a `BuildPageToolbar(...)` helper that renders a native
ToolbarControl between the identity strip and the table. Each entry has
an Enabled flag so the bar carries the precondition signal:
- Installed: [Browse skills] · [Update all outdated (N)]ᵈⁱˢᵃᵇˡᵉᵈ ⁿ⁼⁰
· [Remove all (N)]ᵈⁱˢᵃᵇˡᵉᵈ ⁿ⁼⁰
- Project: [Install all recommended (N)]ᵈⁱˢᵃᵇˡᵉᵈ ⁿ⁼⁰ · [Browse installed]
- Agents: [Install all into detected platforms]ᵈⁱˢᵃᵇˡᵉᵈ ʷʰᵉⁿ ˡᵃʸᵒᵘᵗ⁼null
Per-row Update / Reinstall / Remove stay in the modal (intentional —
modals are part of PR managedcode#735's contract). Existing Ctrl+U / Ctrl+I /
Ctrl+Del bottom-bar shortcuts are unchanged.
Skills / Bundles / Packages pages don't grow a toolbar — they had no
bulk action and their only entry is modal-on-Enter.
RemoveAll / UpdateAll dedicated pages keep their single Button —
they're confirmation surfaces, not list pages.
Build clean, 613/613 tests pass.
Project page — three native BarGraphs (high / medium / low) showing the confidence breakdown of the recommendation set. Confidence IS severity- coded (high = trust, low = noise) so a green/yellow/grey palette is the right read. Analysis page — - Recolor "heaviest skills" BarGraph from WithStandardGradient (a green→yellow→red severity ramp that read as "warning") to a smooth "cool" gradient. Heavy ≠ unsafe, it's just magnitude. - Recolor "skills per collection" BarGraph from flat turquoise to a turquoise→purple smooth gradient so the two Analysis charts are visually distinguishable. - New third chart: LineGraph (Braille mode) plotting the catalog token distribution across the full catalog (X = skill index sorted by tokens desc, Y = tokens). Surfaces the long-tail shape of the catalog at a glance — a few mega-skills vs. a flat curve is the question this answers. "cool" series gradient, high/low markers, rounded border, Y-axis labels in N0 format. Settings disk-footprint chart and Home metric-card sparklines are deferred — they need data the Runtime layer doesn't expose synchronously (installed skill bytes, catalog release history). Will land as a follow-up once the data path is in place. Build clean, 613/613 tests pass.
…lish NavigationView pane thresholds — the previous Auto settings (Expanded ≥96, Compact ≥54) kept the 30-column rail at full width on typical 120-140 col terminals, eating horizontal space the new tables and graphs need. Bump to: - Expanded ≥160 cols (genuinely wide terminals) - Compact ≥ 90 cols (typical IDE-side terminal width — icons + selected) - Minimal < 90 cols (rail collapses, hotkey to summon) Modal action toolbar now draws a single-row separator above the buttons (`WithAboveLine(true)` + matching PanelBorder color), giving visual separation between detail-pane data and verbs that was missing. Outdated-row foreground in the Installed table moves from AccentYellow (215,175,0) to a desaturated OutdatedRowFg (200,180,80). The previous color doubled as both the chart-severity yellow (Project confidence "medium" bar) and the row-attention yellow, which made the two pages fight for the eye. Same warm signal, lower volume. Build clean, 613/613 tests pass.
A grab-bag of post-PR polish driven by use: Collections page - Left rail is now a sortable 2-column TableControl (Collection + Skills installed/total) instead of a markup-list. Same visual grammar as every other browse page. - Right pane gets the same primitives the rest of the shell uses: identity strip → tokens-by-lane BarGraph stack (cool gradient) → sortable Lanes Table → install Toolbar with two-stage arm. - HorizontalGrid now has WithSplitterAfter(0) so the user can drag the divider to rebalance left rail vs. detail pane. BuildStyledTable helper + ApplyStyledTableRuntime - Every TableControl now flows through `BuildStyledTable(title, accent)` — applies left-aligned title (was centered), sortable, rounded, border-color, and StretchHorizontal in one call. Replaces 4-line fluent chains scattered across pages. - `ApplyStyledTableRuntime(...)` flips on `TruncationFade = true` on the built TableControl so cells that overflow their column fade to background over the last 4 chars instead of clipping. Polished read; no ugly ellipsis. Identity strip ⇒ AddIdentityStrip + AddSectionHeader - New `AddIdentityStrip(panel, ...)` wraps the strip MarkupControl with a colored RuleControl underneath so the page header reads as one composite block — same visual rhythm as the modal toolbar's AboveLine separator. - New `AddSectionHeader(panel, title, accent)` replaces the previous pattern of `BuildSectionPanel(title, "", accent)` (a full rounded empty PanelControl) used as a heading divider. Now emits a blank spacer line + a titled RuleControl. Three rows of fake-titled panel down to two rows of real rule. Analysis page cleanup - Three section headers (tokens by skill / skills per collection / token distribution) use the new AddSectionHeader rule. - Dropped the redundant 12-collection card grid at the top — the same data is shown in the "skills per collection" BarGraph below. - Dropped the redundant bottom bullet list of package signals — count is in the identity strip, per-signal detail lives on the dedicated Packages page. Build clean across all 4 projects, 0 warnings. 613/613 tests pass.
Pulls the latest upstream skill-validator nightly into external-sources/upstreams/dotnet-skills and reimports the catalog. CI's `Verify imported external sources are committed` check on this branch was failing because the external nightly mirror had advanced since the branch was cut. This commit catches up: - Adds the new dotnet-blazor plugin and its 6 skills + author/collect/ navigate/render/state/style references - Adds the new dotnet-aspnet/convert-blazor-server-to-webapp skill - Refreshes msbuild-code-review agent + extension-points, msbuild-antipatterns skills - Refreshes dotnet-test migrate-vstest-to-mtp / run-tests / test-anti-patterns / test-smell-detection skills Generated by running `bash scripts/sync_external_catalog_sources.sh` which runs `vendir sync` + `python3 scripts/import_external_catalog_sources.py`. No source code changes; this is purely a regenerated catalog snapshot sitting alongside the TUI polish so CI passes on this branch.
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.
What this is
Follow-up polish on the SharpConsoleUI command center that landed in #735. After living with it, the six "browse" pages all collapsed into the same shape:
tall PropertyPanel header → search chip → 1-column ListControl with markup-salad rows → bottom-of-page Button stack. This PR fixes that, plus a series of related rhythm/visual cleanups across every surface.No public API changes, no manifest changes, no modal removals — the shape of the shell from a contract standpoint is identical. This is consumer-side polish only.
Commits (8, each self-contained and reviewable)
docs(superpowers)— plan doc atdocs/superpowers/plans/2026-05-25-tui-polish.mdcovering everything that follows.refactor(cli)— splitInteractiveConsoleApp.Shell.cs(2178 lines) into four partials:Shell(orchestration, modals, palette),Home,Catalog(Skills / Collections / Bundles / Packages / Agents),Workspace(Installed / Project / Analysis / Settings / RemoveAll / UpdateAll / About). Pure file move, zero behavior change.feat(cli)— thin one-lineAddIdentityStrip(...)headers replace the five-row PropertyPanel page headers (which duplicated the StatusBar info). Reclaims ~4 vertical rows per page.feat(cli)— five list pages (Skills / Bundles / Packages / Agents / Project recommendations) convert fromListControlwith bracketed markup-salad rows to sortableTableControlwith one column per logical dimension. Modal-on-Enter flow preserved. Collections left rail and Command palette stay asListControl(narrow single-string browsers, not multi-column data grids).feat(cli)— page-levelToolbarControlreplaces the bottom-of-page Button stacks on Installed / Project / Agents. Toolbar buttons carry selection-aware enabled state ("Update all outdated (N)" disabled when N=0). Existing Ctrl+U / Ctrl+I / Ctrl+Del shortcuts unchanged.feat(cli)— graphs with gradients across Project / Analysis:coolmagnitude gradient — heavy ≠ unsafefeat(cli)— responsive NavigationView thresholds (Expanded ≥160, Compact ≥90, Minimal <90) reclaim horizontal space on typical IDE-side 120–140 col terminals. Modal toolbar getsWithAboveLine(true)for verb-vs-content separation. Outdated row foreground desaturated so it doesn't fight the Project confidence-yellow.feat(cli)— Collections master-detail + section rhythm + table truncation fade:WithSplitterAfter(0)) so the user can rebalanceBuildStyledTable(title, accent)centralises the table styling (left-aligned title, sortable, rounded, StretchHorizontal)ApplyStyledTableRuntime(...)flips onTruncationFade = trueso cells that overflow their column fade to background over the last 4 columns — no ASCII ellipsisAddSectionHeader(panel, title, accent)replacesBuildSectionPanel(title, "", accent)(a full rounded empty PanelControl) — now a blank spacer line + a titled RuleControl, 2 rows instead of 3, and the heading reads as a rule with a caption rather than as an empty panelVisual changes per page
Browse skills·Update all outdated (N)·Remove all (N)); same TableCompliance with AGENTS.md
Runtime/*installers unchanged.Update all outdated (N)) and disabled when N=0. Ctrl+U shortcut unchanged. Project page recommendations install withforce: truefor outdated entries — unchanged from RFC: SharpConsoleUI command center for the interactive shell #735.[stack / lane]text go throughMarkup.Escapebefore display — unchanged from RFC: SharpConsoleUI command center for the interactive shell #735.RunClassicShellAsync. No prompt-degraded mode in the rich path; if SharpConsoleUI can't run, the tool fails clearly.Status
ManagedCode.DotnetSkills,ManagedCode.Agents,ManagedCode.DotnetAgents,ManagedCode.DotnetSkills.Tests) — 0 warnings.dotnet skills <subcommand>(list/install/recommend/bundle list/agent install/ …) is unchanged — only the bare interactive invocation is affected.RunClassicShellAsync) is unchanged — redirected stdio still falls through to it.Diff size
8 files changed, ~+1900 / ~−1100. Most of the delta is the partial-class split (commit 2) and the Collections master-detail rebuild (commit 8). Every other commit is small and reviewable on its own.
🤖 Generated with Claude Code