Steps to reproduce
- In the DSL editor, type
OrderService.save()
- Press Enter.
- Type
Order.
Expected
OrderService appears in the autocomplete list — it is a real participant (it renders as a participant box in the preview, and the ANTLR oracle recognises it as a message endpoint).
Actual
OrderService is not suggested. Only participants declared via an explicit @Type Name / bare-name declaration are offered; participants introduced implicitly by a message (A.m() From/To, A->B From/To) are invisible to autocomplete.
Location
web/src/editor/participantManager.ts:39-51 (collectParticipants)
Cause
collectParticipants iterates only Participant nodes and reads their direct Name child. The Lezer tree for OrderService.save() is Statement > Message > … > FromToPart > To > Name("OrderService") — there is no Participant node, so the endpoint name is never collected. A->B: msg similarly yields From > Name / To > Name outside any Participant. The ANTLR conformance oracle already includes these (web/src/editor/conformance/oracle.ts → oracleParticipants() via ToCollector.onTo), so the editor's set is a strict subset that drops every message-introduced participant.
Fix sketch
Also collect From / To direct Name children in the tree walk:
if (nodeRef.name === 'From' || nodeRef.name === 'To') {
const nameNode = nodeRef.node.getChild('Name')
if (nameNode) names.add(state.doc.sliceString(nameNode.from, nameNode.to))
return false
}
Note
web/src/editor/participantManager.test.ts:117 ("starts empty for a document with no participant declarations") deliberately uses a comment-only doc to sidestep this gap — it must be updated alongside the fix.
Found via the report-bug skill (browser-driven repro on :3000).
Steps to reproduce
OrderService.save()Order.Expected
OrderServiceappears in the autocomplete list — it is a real participant (it renders as a participant box in the preview, and the ANTLR oracle recognises it as a message endpoint).Actual
OrderServiceis not suggested. Only participants declared via an explicit@Type Name/ bare-name declaration are offered; participants introduced implicitly by a message (A.m()From/To,A->BFrom/To) are invisible to autocomplete.Location
web/src/editor/participantManager.ts:39-51(collectParticipants)Cause
collectParticipantsiterates onlyParticipantnodes and reads their directNamechild. The Lezer tree forOrderService.save()isStatement > Message > … > FromToPart > To > Name("OrderService")— there is noParticipantnode, so the endpoint name is never collected.A->B: msgsimilarly yieldsFrom > Name/To > Nameoutside anyParticipant. The ANTLR conformance oracle already includes these (web/src/editor/conformance/oracle.ts→oracleParticipants()viaToCollector.onTo), so the editor's set is a strict subset that drops every message-introduced participant.Fix sketch
Also collect
From/TodirectNamechildren in the tree walk:Note
web/src/editor/participantManager.test.ts:117("starts empty for a document with no participant declarations") deliberately uses a comment-only doc to sidestep this gap — it must be updated alongside the fix.Found via the
report-bugskill (browser-driven repro on :3000).