Skip to content

Hide flowchart ids and designer status by default; let the flowchart follow its theme - #11

Open
timurbazhirov wants to merge 4 commits into
mainfrom
feature/SOF-8023-hide-ids-and-designer-status
Open

Hide flowchart ids and designer status by default; let the flowchart follow its theme#11
timurbazhirov wants to merge 4 commits into
mainfrom
feature/SOF-8023-hide-ids-and-designer-status

Conversation

@timurbazhirov

@timurbazhirov timurbazhirov commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

Two changes to what the flowchart shows and how it looks — SOF-8024 portion 1 items 1.1 / 1.5 and SOF-8023 items 1.3 and 3.3 (plan).

1. Ids and status are opt-in

Every subworkflow card, unit row and flowchart node prints a raw UUID under its title, and a status badge reading "idle" — in the designer, where nothing has run and no unit has a meaningful status. Both are addressed to whoever is debugging rather than to the person reading the workflow, and they spend a line and a badge on every card to do it.

Two props on CardHeader, threaded through UnitCard and WorkflowUnitCard, both default off:

Prop Effect
showDeveloperInfo Renders the flowchart id, copy affordance intact. Hosts expose it deliberately — the designer puts it behind a "Developer info" toggle.
showStatus Renders the status badge. Job views, where status is the point, pass it; the designer doesn't.

When the id is hidden the subheader isn't rendered at all, rather than emptied — otherwise every title keeps a blank row and a dangling copy button under it.

2. The flowchart takes its colours from the theme

reactflow's own stylesheet paints the pane and its control buttons white with near-black glyphs, regardless of the surrounding theme — so a dark host framed a white rectangle with controls invisible against it.

The background grid was worse than hard-coded: its colour was the literal string "000", which is not a valid CSS colour. The dots fell back to reactflow's light-theme default and disappeared entirely on a dark surface.

Pane, control buttons, edges and handles now read from the theme. The rules sit in sx on a wrapper rather than props on <ReactFlow> because the library exposes those surfaces as CSS classes, not as an API.

This is necessary but not sufficient for the dark designer: workflow-designer also pinned its whole subtree to a light theme, fixed by useHostTheme in mat3ra/workflow-designer#14.

Verification

tsc clean, eslint 0 errors, prettier clean, npm test 36 pass — including 6 render tests (tests/cardHeader.tests.tsx, following the existing renderToStaticMarkup pattern) asserting: the id is absent by default and present with showDeveloperInfo; status is absent by default and present with showStatus; the title survives both modes; and no empty subheader element is left behind.

Measured in the workflow-designer demo under its dark theme:

before after
pane background white #0d1117
control buttons #fefefe with near-black glyphs theme paper with white glyphs
grid dots pure black (invalid colour → fallback) rgba(255,255,255,.5)

One note for review

dist/context/utils.* also moves in this PR. That file was already stale on main — a src JSDoc change had never been transpiled — so regenerating dist sweeps it up. Comments only, no behaviour change.

That staleness was worth a follow-up in its own right: these repos track dist/ and ship it, and the husky pre-commit hook that regenerates it only fires once hooks are installed — there was no "prepare": "husky install" here, so a fresh clone commits without it. Now fixed (the same gap hit ive, job-designer and workflow-designer; all four are fixed).

🤖 Generated with Claude Code

https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8

claude added 2 commits August 16, 2026 20:49
Every subworkflow card, unit row and flowchart node printed a raw UUID
under its title, and a status badge reading 'idle' - in the designer,
where nothing has run and no unit has a meaningful status. Both are
addressed to whoever is debugging rather than to the person reading the
workflow, and they cost a line and a badge on every card to do it.

Two opt-in props on CardHeader, threaded through UnitCard and
WorkflowUnitCard, both default off:

- showDeveloperInfo - renders the flowchart id (with its copy affordance
  intact). Hosts expose it deliberately; the designer will put it behind
  a 'Developer info' toggle.
- showStatus - renders the status badge. Job views, where status is the
  whole point, pass it; the designer does not.

When the id is hidden the subheader is not rendered at all, rather than
leaving an empty row and a copy button under every title.

Covers SOF-8024 portion 1 items 1.1 and 1.5, and the wove half of
SOF-8023 item 1.3.

Note: dist/context/utils.* also moves. That file was already stale on
main - a src JSDoc change had never been transpiled - and regenerating
dist sweeps it up. Comments only, no behavior.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8
Reaching the flowchart cards from a host means going through reactflow
node data (UnitsFlowchartContainer -> UnitsFlowchart -> node.data ->
UnitNode -> UnitCard), so a prop is not a practical way to say 'this whole
tree is a designer'. These are host decisions anyway, not per-card ones.

WoveDisplayOptionsProvider sets showDeveloperInfo / showStatus for a
subtree; CardHeader reads it as the default and an explicit prop still
wins for a single card. Defaults stay off.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8
The hook that regenerates dist has never run: husky was not a dependency
and no prepare script installed it, so a fresh clone had .husky/pre-commit
sitting inert. That is why several packages landed src changes with a
stale or entirely missing dist - including new modules whose emitted code
imported files that were never built.

Adds husky + 'prepare: husky install' (matching cove, the one repo where
this works), and drops 'npx lint-staged' from the hook: lint-staged is
neither a dependency nor configured here, so arming the hook with that
line would have failed and blocked every commit. Linting is enforced in
CI regardless.

Verified in ive: staging only a src file produced a commit that included
the regenerated dist output.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8
Phase 3.3 (D4). The canvas was painted by reactflow's own stylesheet —
a white pane, white control buttons with near-black glyphs — regardless
of the surrounding theme, so a dark host framed a white rectangle with
controls that were invisible against it.

The background grid was worse than hard-coded: its colour was the
literal string "000", which is not a valid CSS colour. The dots fell
back to reactflow's light-theme default and disappeared entirely on a
dark surface.

Pane, control buttons, edges and handles now read from the theme. The
rules sit in `sx` on a wrapper rather than props on <ReactFlow> because
the library exposes those surfaces as CSS classes, not as an API.

Verified in the workflow-designer demo under its dark theme: the pane is
#0d1117, buttons are dark with white glyphs, and the grid dots are
rgba(255,255,255,.5) — previously white, black-on-white, and pure black
respectively.

Refs SOF-8023.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8
@timurbazhirov timurbazhirov changed the title Hide flowchart ids and designer status by default Hide flowchart ids and designer status by default; let the flowchart follow its theme Aug 17, 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.

2 participants