Skip to content

Editable stacks, dash versions that follow the dash, dashes as files, a logo of your own and a zoom that stays - #304

Merged
kratofl merged 3 commits into
mainfrom
feat/stacks-and-scope-diffs
Dec 3, 2026
Merged

kratofl merged 3 commits into
mainfrom
feat/stacks-and-scope-diffs

Conversation

@kratofl

@kratofl kratofl commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Why

Beta drives turned up four problems:

  • Stacks: they could hardly be edited. An empty layer could not be clicked again once deselected, and getting a widget into a stack took a hidden Alt+drag.
  • Dash versions per scope: each version was a full copy, so a change to the dash never reached its versions.
  • Zoom: it came back zoomed in after every update.
  • Older builds: one that met a newer dash file just dropped it, without saying why.

What changes for a driver

Stacks in the designer

  • Every stack has a cell of its own, and its layer tabs are always above it, also when nothing is selected.
  • An empty layer is a drop zone you can always click.
  • A widget clicked or dropped from the library fills an empty layer or becomes a new layer that fills the stack's cell.
  • A widget dragged onto an empty layer goes into it, no Alt needed.
  • The inspector lists each layer with its widget count, First / Make first and a delete.
  • A stack with no widgets left goes away.
  • On the wheel an empty layer never blanks the stack: it shows the first layer with widgets.

Dash versions follow the dash

  • A version for a device, game, class or car keeps only what it changes: removed, changed and added widgets, and page settings. A change to the dash shows up in its versions.
  • A car's version sits on its class's, which sits on the dash.
  • Doesn't fit: when the dash puts a widget where a version has its own, the version keeps its own. The wheel leaves that one widget out. The designer outlines it in amber and offers Place it (the widget follows the pointer onto free cells) or Leave out.
  • Marks in the designer:
    • The title bar reads "Hypercar version · 2 changes from Driver Focus", with Reset to Driver Focus.
    • A removed widget shows as a ghost with Bring back.
    • A changed one has a blue dot, and its inspector offers Back to ….
  • Existing versions (whole copies) turn into their changes on the first start.

Dashes as files

  • Export… in a dash's menu saves it as a .sprintdash.
  • Import… on the Dashes page adds one as a dash of its own. It never replaces a dash.
  • Every dash file now carries its format and the Sprint that saved it.
  • A Sprint that finds a newer file leaves it alone and says which Sprint to update to. The same happens on import, and a newer dash from the cloud is not taken.

Settings › Appearance › Logo

  • Pick the Sprint mark: Normal, Beta or Dev. It shows in the sidebar, in the designer and as the window icon.
  • Until you pick, your build's own is picked. Picking it again follows the build once more.

Zoom that stays

  • Ctrl +/−/0 is kept in settings.json with every other setting and saved the moment it changes, so it no longer comes back zoomed in after an update.

Breaking

Older Sprint builds cannot read dashes that have versions in the new shape, and they skip such dashes. Builds from now on name the Sprint to update to instead of skipping silently.

Under the hood

  • Versions:
    • Host: DashVariantDiff, DashVariants (apply in chain order, conflicts, Update re-diffing every version, ConvertLegacy).
    • Designer: variantChanges.ts, variants.ts, VersionMarks.tsx.
    • app/Sprint.Desktop.Tests/Fixtures/dash-variant-changes.json pins host and designer to the same result.
  • Ids: new widget, group and page ids are unique across the dash and all its versions.
  • Dash files: DashFileFormat (format 2, savedBy). GET /api/dashes/{id}/file and POST /api/dashes/import, with Electron owning the dialogs as for lap files.
  • Stacks: groupOps (addToStack, putInLayer, pruning empty stacks). The empty-layer fallback is in groups.rs and groups.ts.
  • Logo: AppSettings.Logo (null = the build's own). Electron sets the window icon, and the three icon PNGs now ship in the package.
  • Zoom: AppSettings.UiZoom. Electron applies it on every page load and only reacts to a change in the settings, so a poll in flight cannot undo a zoom step.
  • Preview harness:
    • select=<selector>=<value> picks an option in a native select, for example a scope in the designer.
    • logo= and newerDash=1 set the logo and simulate a dash from a newer Sprint.
    • The sample's Driver Focus dash has a Hypercar version.
  • Docs: docs/internals/dash-rendering.md › Versions (shape, chain, doesn't fit, ids, file format) and the glossary.
  • Merged main: the dependency updates Move tar to 8 to close the node-tar security alerts #301–Take all open Dependabot updates in one go #303.

Checks

  • dotnet build app/Sprint.Desktop.slnx -warnaserror: 0 warnings. Desktop tests 1216, host tests 233.
  • API build: 0 warnings, 113 tests.
  • @sprint/desktop: type-check, 347 tests. @sprint/dashboard: type-check, 47 tests.
  • Renderer: 289 tests, clippy -D warnings, fmt --check.
  • pnpm lint (uncached) and the web build.
  • make smoke-app: the real app replays a race and renders all ten pages without errors.
  • Preview screenshots in dark of:
    • stack tabs, the empty layer and a new layer;
    • the Hypercar version with removed, changed and doesn't-fit marks, and Place it under way;
    • Settings › Appearance;
    • the Dashes page with the newer-Sprint notice and Export… in the menu.
  • Fresh-context review: it found 10 points. Fixed: ids made outside the edit, the zoom poll race, no way back to the build's own logo, setIcon on macOS, versions left empty, duplicate ids in a version, and three stale comments.
    • Not done: caching the version chain per frame. Dashes are mutated in place in places, so a cache could go stale; measure first.
    • Not done: one shared logo mapping. Renderer and Electron are separate TypeScript projects.

Not verified

  • Pointer drag and drop in the running app: library onto a stack, a widget onto an empty layer, Place it.
  • The export and import file dialogs end to end.
  • On the wheel: the stack fallback, and a version leaving out a widget that doesn't fit.
  • The taskbar icon switching with the logo setting.

🤖 Generated with Claude Code

kratofl and others added 3 commits December 3, 2026 13:15
…wn and a zoom that stays

Stacks: a stack could only be reached through its widgets, so an empty
layer left nothing to click once deselected, and a widget could only get
into a stack with a hidden Alt+drag. Every stack now has its cell and
always-visible layer tabs; an empty layer is a drop zone, and a widget
clicked or dropped from the library fills it or becomes a new layer.
Layers show their count and can be deleted; a stack with no widgets
left goes, and on the wheel an empty layer never blanks the stack.

Dash versions: a version per device, game, class or car was a whole
copy, so a change to the dash never reached it. A version now keeps
only what it changes (removed, changed and added widgets, page
settings) and a car's sits on its class's. When the dash puts a widget
where a version has its own, the version keeps its own and the designer
says it doesn't fit, with Place it and Leave out; the title bar counts
the changes and resets to the dash. Old copies turn into changes on
load. New ids are free across the dash and all its versions. Older
Sprint builds cannot read dashes with versions in the new shape.

Settings > Appearance > Logo picks the Sprint mark for the sidebar, the
designer and the window icon; until you pick one, your build's own is
picked, and picking it again goes back to following the build.

The UI zoom is kept in settings.json with every other setting, saved the
moment it changes, so it no longer comes back zoomed in after updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dash files had no version, so an older Sprint met a newer dash only by
silently dropping it. Every dash file now carries its format and the
Sprint that saved it. A Sprint that finds a newer format leaves the file
alone (never migrates, saves over it or seeds a preset on its id), and
the Dashes page names the Sprint to update to; a newer dash from the
cloud is not taken either. Builds from before this cannot say it yet.

Dashes can be shared: Export... in a dash's menu saves it as a
.sprintdash, and Import... on the Dashes page adds one as a dash of its
own, brought up to date like a dash on disk, or turned away with the
Sprint to update to when it is from a newer one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kratofl kratofl added the type/breaking Something a driver has stops working or has to be redone (major release) label Dec 3, 2026
@kratofl
kratofl enabled auto-merge (squash) December 3, 2026 13:37
@kratofl
kratofl merged commit 254eb00 into main Dec 3, 2026
3 checks passed
@kratofl
kratofl deleted the feat/stacks-and-scope-diffs branch December 3, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/breaking Something a driver has stops working or has to be redone (major release)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant