Summary
While typing a free-text message label (or title/divider text), the autocomplete popup
offers keyword suggestions whenever a label word prefixes a keyword. A real user writing
natural labels like "title screen", "while loading", "section header", "return policy",
"new feature" gets an irrelevant keyword popup — pure noise.
Steps to reproduce
Type A->B: titl → popup shows title (Diagram title). Type A->B: whil → shows while.
Expected
No completions inside a free-text label — the cursor is in a Content/LineContent node,
which is not a code position.
Cause
zenumlCompletions (web/src/editor/zenumlAutocomplete.ts) resolves the label position to
the 'top' zone (the Content node has no Head/Block/Group ancestor), so
keywordsForZone('top') offers all keywords; CodeMirror's fuzzy filter then surfaces any
that prefix-match the label word.
Fix
Early-return null when the cursor is inside a Content / LineContent node (the message
label / title / divider free-text), alongside the existing Comment-node guard. From/To
endpoints are siblings (not inside Content), so participant completion at message endpoints
is unaffected.
Found via real-user dogfooding in the editor-improvement campaign.
Summary
While typing a free-text message label (or title/divider text), the autocomplete popup
offers keyword suggestions whenever a label word prefixes a keyword. A real user writing
natural labels like "title screen", "while loading", "section header", "return policy",
"new feature" gets an irrelevant keyword popup — pure noise.
Steps to reproduce
Type
A->B: titl→ popup showstitle(Diagram title). TypeA->B: whil→ showswhile.Expected
No completions inside a free-text label — the cursor is in a
Content/LineContentnode,which is not a code position.
Cause
zenumlCompletions(web/src/editor/zenumlAutocomplete.ts) resolves the label position tothe
'top'zone (theContentnode has no Head/Block/Group ancestor), sokeywordsForZone('top')offers all keywords; CodeMirror's fuzzy filter then surfaces anythat prefix-match the label word.
Fix
Early-return
nullwhen the cursor is inside aContent/LineContentnode (the messagelabel / title / divider free-text), alongside the existing
Comment-node guard.From/Toendpoints are siblings (not inside
Content), so participant completion at message endpointsis unaffected.
Found via real-user dogfooding in the editor-improvement campaign.