Skip to content

feat(graph): flow colours in the minimap, the timeline and three templates, each colour offered once (v0.20.0) - #327

Merged
MerciHanrim merged 3 commits into
mainfrom
feat/flow-colour-views
Oct 6, 2026
Merged

MerciHanrim merged 3 commits into
mainfrom
feat/flow-colour-views

Conversation

@MerciHanrim

@MerciHanrim MerciHanrim commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Part of #325, PR 2 of 3. Version 0.20.0 (the release date is set to the actual merge day before merging). The contract is docs/flow-colour-and-compact-nodes.md, FC-5 and FC-6. Compact nodes are PR 3.

What changes

  • Minimap: a coloured node's mark takes its colour; every other mark keeps its kind fill (MinimapDock).
  • Timeline: a coloured Pool or Register draws its line, legend mark and endpoint in its colour; every other series keeps the colour it had by index, so colouring one node never recolours another series. The Register's dashed line and the Pool's solid line stay; edge colours never reach the timeline. Each line now carries data-series.
  • Forced colours: both views paint inline SVG fill / stroke, which the system palette does not replace, so they ask the new useForcedColors() (src/ui/media.ts) and draw exactly what they drew before.
  • The run is untouched: the run and the run CSV are byte-identical with and without colours.
  • Inspector, each colour once: Recent leaves out the palette's colours and In this document leaves out both, so the current colour's ring shows once; an empty row is hidden.
  • Phone: the read-only sheet shows the colour as one line of text with no control: a dot with the colour's name and hex (Rose #B47599; the hex alone off the palette, a dir="ltr" run), Default with an empty ring, Mixed with no dot. A locked desktop canvas keeps the disabled editor, and its disabled look is now pinned there.

Templates

Template Sage Gold Violet Rose
Coffee roastery operations flow green beans (3 nodes, 2 edges) roasted beans (6, 5) — desserts (4, 3)
3-zone gacha banner comparison General / Free (10, 8) — Premium Standard (13, 10) Premium Pickup (20, 19)
Early MMO progression items and loot (22, 22) gold (11, 8) experience and level (11, 9) —
  • The colours are data in the shipped file, written by each builder through withTemplateFlowColours (src/engine/templateFlowColours.ts): a listed node takes its flow's palette colour, and so does every resource edge whose two ends are in the same flow. A Parameter, a Register, a missing id or a node listed twice throws. The gacha zones take the colour their frames already carry; Parameters, Registers, the gacha comparison row and the MMO combat chain stay uncoloured.
  • With accent removed, each regenerated file is identical to the one before.
  • Digests: each template's engine digest equals the one recorded in sha256Baseline.fixture.ts, so its simulation is unchanged. Its content and full revision digests change with the colours, as they must, and are pinned at their current values in src/engine/templateFlowColours.test.ts. The recorded feat(about): show open-source licences and check them at build time #301 values are not redefined: for these three files sha256Baseline.test.ts checks the engine digest as recorded, and an explicit legacy test removes accent and checks all three recorded digests.

Visual baselines

  • No existing baseline changes, and none was updated or re-masked. flow-colour-visual masks the minimap, and the baselines that open a template (forced-colors-edge-tell, Coffee and MMO) are taken under forced colours, where no flow colour is drawn. Every screenshot spec on the chromium and mobile projects passed without an update: 451 passed, 5 skipped by design.
  • That left PR 2's views without a pixel check, so a second commit adds thirteen new baselines, each reviewed and approved before it was added (all element shots, registered in e2e/support/snapshot-policy.ts):
  • e2e/flow-colour-views-visual.spec.ts: flow-views-minimap-light / -dark and flow-views-timeline-light / -dark (a coloured graph after five steps: coloured marks and series in their colour, the others in theirs, Registers dashed); flow-views-forced-minimap / -forced-timeline (the same graph under forced colours, back on its kind and series colours); flow-views-template-coffee / -gacha / -mmo, each -light and -dark (the Template opened from the menu and fit to the pane, with its minimap; the React Flow attribution is masked in the canvas's own computed background, so the mask reads as empty canvas).
  • e2e/flow-colour-mobile.spec.ts: flow-views-phone-summary (the phone's one-line Colour summary).
  • Each colour offered once and the stored Recent order are held by DOM tests, not pixels. Generated on a freshly started dev server checked to serve this branch's version and commit; two runs in a row without an update passed.

Documentation images

  • A third commit re-shoots the five app screenshots in docs/assets/ on v0.20.0, each reviewed and approved before it was added. Each keeps its scene, its selection and its values, at 1600 x 900, unmasked.
  • The three README images (hero-coffee, gacha-overview, gacha-pickup-guarantee) were shot on this pull request's deploy-hash preview, the production bundle, with the same script as docs(readme): reshoot the three README screenshots from the production UI #320; their alt text still holds. In the gacha images Pickup SSR and Pickup wins are both Premium Pickup Pools, so both series are Rose, told apart by their legend names and end values.
  • coffee-flow and mmo-focus replace v0.9.0 shots that nothing in the repository links to; they are kept, not deleted, because they may be linked from outside.

Tests

  • Unit: src/engine/templateFlowColours.test.ts (the builder helper, each template's colours, engine digest and pinned digests) and the split src/model/sha256Baseline.test.ts.
  • End to end: e2e/flow-colour-views.spec.ts (9: minimap, timeline, run and CSV, forced colours, each colour once, the locked desktop, the three templates opened from the menu); e2e/flow-colour-mobile.spec.ts rewritten for the summary line (2); e2e/flow-colour.spec.ts's Recent assertion now reads the stored order and the row without palette colours; e2e/whats-new.spec.ts pins 0.20.0. Without the implementation the new views tests fail; with it they pass.
  • Copy guards move only their exact pins: catalog 1023 to 1027, runtime 1245 to 1249, English Pool and Register prose 20 to 21 and 10 to 11, pt-PT's difference from pt-BR 273 to 274 (telemóvel), with the note that 0.19.0's move from 270 to 273 was missing. No bound is widened.

Verification (local, at the head commit)

  • npx tsc -b, oxlint (39 warnings, the existing baseline, 0 errors), 3,196 unit tests, all 21 source checks of the CI checks job, and the list of 1,992 tests in exactly one of the 5 shards.
  • End to end in Chrome on a freshly started dev server: every screenshot spec on chromium and mobile 451 passed, 5 skipped by design; the whole mobile project 108 passed, 4 skipped by design; the related specs (flow colour, views, What's new, i18n-vi, CSV, minimap, templates, timeline, canvas lock) 235 passed; the portable file 16 of 16, the production bundle 16 of 16, the PWA 19 of 19.
  • The automated before / after capture (the same script on the branch point and on this tree): the simulation series and the CSV of a coloured sample graph and of all three templates are byte-identical, in light and dark; under forced colours the minimap and the timeline read the same values as before.

CI

  • Run 37476943256 at 9a5dda7, before the baselines: every job passed; the five shard reports cover the list at that commit exactly (1,982: 1,975 passed, 7 skipped by design, 0 failed, 0 retried). Run 37483963137 at c569fd7, with the baselines: every job passed and the union is exact (1,992: 1,984 passed, 7 skipped by design, 0 failed), with one retry, kept as a record and not re-run: toolbar-locale-width.spec.ts:72 zh-Hant, whose first attempt timed out waiting for the locale to switch from en (the slowdown tracked in test(e2e): the zh-Hant descriptive-copy wrapping test slows down on CI and ended a browser session #305) and passed on the retry. The run at the head with the documentation images is the final one.
  • Run 37491691038 at 2548bc8, the final head: every job passed and the union is exact (1,992: 1,984 passed, 7 skipped by design, 0 failed), with one retry, not re-run: frame-label-locale-switch.spec.ts:142, whose first attempt timed out after 8 s waiting for the locale to switch from en to zh-Hant and passed on the retry. Merged under a one-time exception: the failure is the en to zh-Hant wait, not a product check; the same symptom appeared in a different locale spec on the previous run; this pull request does not change locale loading; no test failed in the end; and the head's preview passed every automated check. It is classed as evidence for the slowdown tracked in test(e2e): the zh-Hant descriptive-copy wrapping test slows down on CI and ended a browser session #305, not a regression here; the shard reports are kept.

Not claimed

  • No manual check of this pull request's preview; its Cloudflare preview is checked by automation.
  • No manual screen-reader check.
  • 16 of the 18 languages have not been reviewed by a native speaker.

…lates, each colour offered once (v0.20.0)

Part of #325, PR 2 of 3. Version 0.20.0. Contract: docs/flow-colour-and-compact-nodes.md FC-5 and FC-6. Compact nodes are left to PR 3.

Minimap and timeline: a coloured node's minimap mark takes its colour (MinimapDock), and a coloured Pool or Register draws its series in it, for the line, the legend mark and the endpoint (TimelineChart). Every other mark and series keeps the colour it had, by kind or by index, so colouring one node never recolours another; the Register's dashed line and the Pool's solid line stay, and edge colours never reach the timeline. Both views paint inline SVG fill and stroke, which forced colours do not replace, so they ask the new useForcedColors() (src/ui/media.ts, beside useIsMobile, now one mediaQuery helper) and draw no flow colour there. Each timeline line carries data-series. The run and the run CSV are byte-identical with and without colours.

Templates: Coffee roastery, the gacha banner and early MMO ship three flow colours each, as data in the file, written by their builders through withTemplateFlowColours (src/engine/templateFlowColours.ts): each listed node takes its flow's palette colour, and so does every resource edge whose two ends are in the same flow; a Parameter, a Register, a missing id or a node listed twice throws. Coffee: Sage green beans, Gold roasted beans, Rose desserts. Gacha: each zone the colour its frame already carries (Sage, Violet, Rose), set in scripts/gen-gacha-banner-zones-example.ts. MMO: Sage items and loot, Gold gold, Violet experience and level. Parameters, Registers, the gacha comparison row and the MMO combat chain stay uncoloured. With accent removed, each regenerated file is identical to the one before. Each template's engine digest equals the one recorded in sha256Baseline.fixture.ts; its content and full revision digests change, as they must, and are pinned at their current values in src/engine/templateFlowColours.test.ts. sha256Baseline.test.ts keeps the recorded #301 values unchanged: for these three files it checks the engine digest as recorded, and an explicit legacy test removes accent and checks all three recorded digests.

Inspector (AccentField): each colour is offered once. Recent leaves out the palette's colours and In this document leaves out both, so the current colour's ring shows once; an empty row is hidden. On the phone the read-only sheet shows the colour as one line of text with no control: a dot with the colour's name and hex (the hex alone off the palette, a dir="ltr" run), Default with an empty ring, Mixed with no dot. A locked desktop canvas keeps the disabled editor, and its disabled look is now pinned there.

Tests: unit src/engine/templateFlowColours.test.ts and the split digest test; e2e flow-colour-views.spec.ts (minimap, timeline, the run and CSV unchanged, forced colours, each colour once, the locked desktop, the three templates opened from the menu), flow-colour-mobile.spec.ts rewritten for the summary line, flow-colour.spec.ts's Recent assertion moved to the stored order plus the row without palette colours, whats-new.spec.ts pins 0.20.0. No visual baseline changes: flow-colour-visual masks the minimap, and the template baselines are taken under forced colours. Four release-note lines in 18 languages, 16 without native review; the copy guards move only their exact pins (catalog 1023 to 1027, runtime 1245 to 1249, English Pool and Register prose 20 to 21 and 10 to 11, pt-PT's difference from pt-BR 273 to 274 for `telemóvel`, with the missing note for 0.19.0's move from 270 to 273), no bound widened. Docs: the contract, docs/mobile.md, CHANGELOG.md and README.md.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Deploying cozy-loop-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2548bc8
Status: ✅  Deploy successful!
Preview URL: https://0e87ee6a.cozy-loop-studio.pages.dev
Branch Preview URL: https://feat-flow-colour-views.cozy-loop-studio.pages.dev

View logs

…meline, the templates and the phone summary

Part of #325, PR 2. No existing baseline changed with PR 2's views (flow-colour-visual masks the minimap, and the baselines that open a template are taken under forced colours), so these thirteen new ones hold what the views now draw, each reviewed and approved before it was added.

e2e/flow-colour-views-visual.spec.ts: the minimap and the timeline panel of a coloured graph (two Pools and two Registers, one of each coloured, and a coloured edge) after five steps, light and dark; the same two under forced colours, back on their kind and series colours; and each coloured Template opened from the menu and fit to the pane with its minimap, light and dark, the React Flow attribution masked in the canvas's own computed background so the mask reads as empty canvas. e2e/flow-colour-mobile.spec.ts adds the phone's one-line Colour summary. All thirteen are element shots, registered in e2e/support/snapshot-policy.ts. Each colour offered once and the stored Recent order stay DOM tests only. The contract's FC-8 lists the new spec.
…flow colours

Part of #325, PR 2. Each image keeps its scene, its selection and its values, at 1600 x 900 like the others, unmasked; only the current UI, the templates' flow colours and the selection ring outside the outline are new. Each was reviewed and approved before it was added.

README images, shot on this pull request's deploy-hash preview (the production bundle) with the same script as #320: hero-coffee (a temporary session, Coffee roastery, three steps, the minimap folded, Reset view), gacha-overview (the gacha banner run to its end, the Pickup rate - Premium Pickup Register selected) and gacha-pickup-guarantee (the Premium Pickup frame alone, its Ceiling hits Pool selected). Their alt text still holds.

coffee-flow (Coffee roastery, eight steps, the Projected daily operating margin Register selected, the graph fitted left of the minimap) and mmo-focus (Early MMO, step 0, Focus mode on Gold) replace v0.9.0 shots that nothing in the repository links to, kept because they may be linked from outside.
@MerciHanrim
MerciHanrim merged commit 36937f5 into main Oct 6, 2026
10 checks passed
@MerciHanrim
MerciHanrim deleted the feat/flow-colour-views branch October 6, 2026 16:15
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