Skip to content

fix: do not call a complete graph partial - #51

Merged
endrix merged 1 commit into
mainfrom
fix/dont-call-a-complete-graph-partial
Sep 4, 2026
Merged

endrix merged 1 commit into
mainfrom
fix/dont-call-a-complete-graph-partial

Conversation

@endrix

@endrix endrix commented Sep 4, 2026

Copy link
Copy Markdown
Owner

The problem

The warning chip prefixed its message with Partial graph: whenever the producer reported any error, regardless of whether the graph was actually partial:

const isPartialGraph = args['wf:partial'] === true || graphErrors.length > 0;

A graph that is missing nodes and a graph that faithfully draws something faulty are opposite situations, and they need different reactions from the reader. The wrong label sends someone hunting for content that was never missing, instead of reading the problem being reported.

That is also the more common of the two. A producer able to describe a fault precisely usually had no trouble drawing the thing it is in.

The change

The prefix follows wf:partial, the flag that actually means the graph is incomplete. When the graph is whole, the message stands on its own: it already says what is wrong, and the chip's styling already says it is a warning.

isPartialGraph keeps its existing meaning of "is there anything to warn about", because the centre overlay keys on it and that reading is correct for deciding whether to warn. The new value is the narrower fact, and only the wording follows it.

The wording moved into a small exported function so it could be tested directly. It is one line of string arithmetic, and also the whole difference between telling a reader their picture is missing something and telling them their subject has a fault.

Verified

  • npm run build, npm run typecheck (5/5), npm run check:neutrality (5/5), npm test — green by exit code.
  • New: packages/diagram-client/test/graph-warning-text.test.ts.

The warning chip prefixed its message with "Partial graph:" whenever the
producer reported any error, whether or not the graph was actually partial.

Those are opposite claims. A graph that is missing nodes and a graph that
faithfully draws something faulty need different reactions, and the wrong label
sends a reader hunting for content that was never missing instead of reading the
problem being reported. The second case is also the more common one: a producer
able to describe a fault precisely usually had no trouble drawing the thing.

The prefix now follows `wf:partial`, which is the flag that actually means the
graph is incomplete. When the graph is whole the message stands on its own — it
already says what is wrong, and the chip's styling already says it is a warning.

`isPartialGraph` keeps its meaning of "is there anything to warn about", because
the centre overlay keys on it and that reading is right for deciding whether to
warn at all. The new value is the narrower fact, and only the wording follows it.

The wording moved into a small exported function so it could be tested directly.
It is one line of string arithmetic, and it is also the whole difference between
telling a reader their picture is missing something and telling them their
subject has a fault.
@endrix
endrix merged commit 0b31eef into main Sep 4, 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