Skip to content

Show constructor signatures on state machine arrows - #120

Merged
CatarinaGamboa merged 2 commits into
mainfrom
feat/112-constructor-signatures
Oct 20, 2026
Merged

CatarinaGamboa merged 2 commits into
mainfrom
feat/112-constructor-signatures

Conversation

@CatarinaGamboa

Copy link
Copy Markdown
Collaborator

Summary

Show the constructor signature on each initial state machine arrow. Keep conditional postconditions available under the existing Expand Conditions toggle, and accept responses from older servers that lack signature metadata.

Implements the diagram side of #112. Parser metadata comes from liquid-java/liquidjava-fsm#1.

Verification

  • Client webpack compile and server Maven build passed.
  • Headless VS Code diagnostic smoke test passed.
  • In a live VS Code webview built with the FSM parser branch, the state machine rendered new MultipleInitialStates() and new MultipleInitialStates(int) on separate initial arrows.

Local review

  1. Check out Record constructor signatures on initial state transitions liquidjava-fsm#1 and run mvn install there.
  2. Check out this PR, then run npm ci and npm run build:server in client.
  3. Open client in VS Code and press F5. In the Extension Development Host, open a Java class with overloaded state-refined constructors and view its State Machine tab.

The server still pins the published FSM 0.1.0 dependency. Maven must use the locally installed parser build for this test; a new FSM artifact version and server dependency update are needed before release.

@CatarinaGamboa
CatarinaGamboa force-pushed the feat/112-constructor-signatures branch from 214d317 to 303adda Compare October 20, 2026 18:07
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@CatarinaGamboa
CatarinaGamboa merged commit e46f8c0 into main Oct 20, 2026
3 checks passed
CatarinaGamboa added a commit that referenced this pull request Oct 20, 2026
## Summary

Bump `liquidjava-fsm` from 0.1.2 to 0.1.3 so the state machine diagram
also shows static factory methods as initial transitions, labeled like
`Connection.connect(String)`.

Follow-up to #120. The 0.1.3 bump was pushed after #120 had already
merged, so it never reached `main`.

0.1.3 reuses the existing `constructorSignature` field, so no client
changes are needed.

## Verification

- Server builds against 0.1.3.
- Ran a class with overloaded constructors and a `@Refinement` static
factory through the 0.1.3 parser and `createMermaidDiagram`; the factory
renders as its own initial arrow.
- Tested manually in the Extension Development Host.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

2 participants