Skip to content

fix(view): label transition triggers by the name their signal or operation ends in - #563

Merged
HuiJun merged 3 commits into
developfrom
fix/trigger-labels-end-names
Sep 24, 2026
Merged

HuiJun merged 3 commits into
developfrom
fix/trigger-labels-end-names

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What and why

A rendered state or action view labelled an accept trigger with the trigger's source text. A transition migrated from a Cameo model writes its signal fully qualified, so every such edge carried the whole path across the drawing (accept TMT::'02 JPL'::'System Model'::APS::…::Control::'Post-Segment Exchange Alignment'), overlapping the nodes and the other edges of any Cameo-positioned view. Node heads and types were already shortened to their end names; edge triggers were the one label left on the written text.

triggerLabel now heads an accept or call trigger by the name its signal or operation ends in, the way a node's type is headed, before falling back to the source text:

accept Signals::'APS Internal'::'Go Now'   →  accept 'Go Now'
accept msg : Signals::'APS Internal'::Halt →  accept msg : Halt
accept Triggers::setSpeed(value)           →  accept setSpeed(value)
accept after 5 / when x > 0                →  unchanged (written text)

The shortening happens in the shared renderer, so DOT, Mermaid, PlantUML and the text form, -render, -render-all and document figures all pick it up.

Use Case: Post-Segment Exchange Alignment (TMT, neato -n2 on the Cameo positions), before and after:

before

after

How it was verified

  • TestTriggerLabelsHeadTheirSignalByItsEndName (new): qualified signal, named payload, call trigger with arguments, and a time event; no edge label keeps a ::.
  • Existing TestEdgeLabelsYieldToTheEdgesOwnText and the state.* goldens unchanged.
  • go build ./..., go vet ./..., gofmt -l . empty, go test ./... green.
  • TMT (49,060 elements): 'TMT-APS DDD Document' rendered to HTML under the nasa theme — 69 accept TMT::… figure labels before, 0 after; every trigger label is now the bare signal name.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

devin-ai-integration Bot and others added 2 commits September 24, 2026 14:12
…ation ends in

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author
Browser verification: shortened transition labels

Rendered a small fixture and the TMT DDD document with the CLI and inspected them in Chrome.

  • Qualified signal, payload and operation triggers use their end names in the DOT and Mermaid HTML, the text form, and a drawn PDF.
  • TMT section 4.3.1.4 reads accept Finished / diffTime and accept 'Post-Segment Exchange Alignment'; accept TMT:: occurs zero times in the HTML (69 before).
  • A unitless after 5 is rejected by validation (delay must be a DurationValue), so the unchanged time label was checked as after 5 [s].
Mermaid HTML PDF
Short Mermaid labels Drawn PDF labels
Remaining layout issues, out of this change's scope

On the Cameo-positioned TMT view the nested cluster headings still overlap each other and one guard/effect label crosses the StandBy box; Mermaid's initial-state marker overlaps the machine's header. The view also reports 65 unpositioned nodes and 82 edges at them left undrawn, as the omit-by-default rule for positioned views states.

TMT HTML (DOT source) TMT drawn from that DOT
Zero qualified matches TMT short labels and remaining overlaps

@HuiJun
HuiJun marked this pull request as ready for review September 24, 2026 15:11
devin-ai-integration[bot]

This comment was marked as resolved.

…n parameterless calls

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun merged commit 8ceaa1b into develop Sep 24, 2026
15 checks passed
@HuiJun
HuiJun deleted the fix/trigger-labels-end-names branch September 24, 2026 16:09
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