Repository navigation
fix(client): a node family's colour reaches plain nodes too - #97
Merged
Merged
Conversation
`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
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.
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:
palette-icons.ts):nodeFamilyCsshad 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.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
npm run typecheck,npm run check:neutralitythe colour family of a plain node; it fails without the server commitscripts/render-svg, in feat: group containers, a producer's own grouping of nodes #91): smokepipeline.mdand picorv3210-architecture/pipeline.md. Requirement, architecture, verification, information, option, decision and source each draw their own colour, inside frames and out. The first commit alone left every clause inside a frame amber; the first version of this test plan missed that.https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8