Skip to content

fix(client): a node family's colour reaches plain nodes too - #97

Merged
endrix merged 2 commits into
mainfrom
feat/family-colours
Oct 24, 2026
Merged

endrix merged 2 commits into
mainfrom
feat/family-colours

Conversation

@endrix

@endrix endrix commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

A product's node families coloured only external nodes and subgraphs. A product whose own nodes are plain saw its families only on nodes brought in from elsewhere: the NDF diagram, with fourteen kinds, drew two colours, amber for a document's own clauses and blue for clauses from other documents.

Two causes, one per commit:

  • Client (palette-icons.ts): nodeFamilyCss had no rule for a plain node, so its header kept the task amber. A plain node (.actor-node) in a family now takes the family's colour in its header, with a rule more specific than .header-compartment.header-task .header-background.
  • Server (graph-gmodel-source.ts): a plain node's family class (external-actor-<family>) was on its header compartment only, while the header rule and the watermark rule (.external-actor-<name> .node-icon-<name>) both select from the node. External nodes and subgraphs had it on the node; plain nodes now do too, so the header and the icon both take the colour. The family is looked up once for all three branches.

Neutral: the colours and families are the product's declaration; the platform names none. Independent of #90 to #96.

Test plan

https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8

`nodeFamilyCss` generated colour rules for external nodes and subgraphs
only. Every node carries its family class (`external-actor-<family>`),
but a plain node's header kept the task amber, so a product whose own
nodes are plain saw its families only on the nodes brought in from
elsewhere: a specification with fourteen kinds drew two colours, amber
for its own clauses and blue for the ones from other documents.

A plain node in a family now takes the family's colour in its header,
with a rule more specific than `.header-compartment.header-task`.

Claude-Session: https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8
The client's family rules select from the node
(`.actor-node.external-actor-<name> .header-compartment ...` for the header,
`.external-actor-<name> .node-icon-<name>` for the watermark), but the server
put a plain node's family class on its header compartment only. External
nodes and subgraphs had it on the node; plain nodes did not, so the rule
added in the previous commit never matched and NDF clauses inside a frame
stayed in the task amber. The previous commit's test checked the generated
CSS, not what the server emits, so it passed regardless.

The family is now looked up once and its class goes on the node for every
branch: network, external (or `external-actor-default`), and plain.

Claude-Session: https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8
@endrix
endrix merged commit 8a34726 into main Oct 24, 2026
1 check passed
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