GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Draw entry transitions on the state machine by CatarinaGamboa · Pull Request #169 · liquid-java/vscode-liquidjava

Conversation

@CatarinaGamboa

@CatarinaGamboa CatarinaGamboa commented Oct 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Brings liquidjava-fsm#15 to the extension, released as liquidjava-fsm 0.2.2.

The verifier uses the first @StateRefinement of a method whose from matches. A @StateRefinement without from beside ones with from is how an object whose state is unknown (a field, a parameter or a getter's result) enters the protocol. The parser now reports these as entryTransitions, and the diagram draws them as arrows from the initial node, labelled with the method and, when conditions are shown, its postcondition.

  • server/pom.xml: liquidjava-fsm 0.2.1 → 0.2.2
  • StateMachineDTO: passes entryTransitions to the client
  • diagram.ts: draws [*] --> to : method for each entry transition, dimmed in focus mode like the constructor arrows
  • fsm.ts: an entry transition postcondition enables Expand Conditions

The fsm PR's EntryTransition spec, with new Edit().undo() as the state error. canUndo (return) → endDone and reset → start now come out of the initial node:

Show all Focus on error Conditions collapsed

Tests

  • client: vitest run 110 passed, typecheck clean
  • server: mvn test 35 passed, against liquidjava-fsm 0.2.2 from Maven Central
  • checked in headless VS Code with the fixture above

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@CatarinaGamboa @claude
Draw entry transitions from the initial state on the state machine
ad3f886
Bump liquidjava-fsm to 0.2.2, which reports the entryTransitions of a
StateRefinement without from beside ones with from: how an object in an
unknown state enters the protocol.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
CatarinaGamboa added a commit that referenced this pull request Oct 27, 2026
@CatarinaGamboa
Screenshots for #169
f58c925
@CatarinaGamboa
CatarinaGamboa merged commit 1be8331 into main Oct 27, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@CatarinaGamboa CatarinaGamboa mentioned this pull request Oct 27, 2026
Collapse the unrelated methods when focusing on a state error, listed on hover #171
Merged
CatarinaGamboa added a commit that referenced this pull request Oct 28, 2026
@CatarinaGamboa @claude
Collapse the unrelated methods when focusing on a state error, listed…
80bed18
… on hover (#171)

Part of #170.

## Why
Focus mode dimmed the methods unrelated to a state error but kept their
text, so the layout did not move (#158). On a large machine the dimmed
label stacks still took the space. In the UDP chat client the state the
error is about, `closed`, was below the fold.

## What
In focus mode:
- **Collapse.** The dimmed methods of each label become a count:
`receive` + `+9 more`, or `2 methods`. Overloads count once. A single
dimmed method keeps its name and conditions.
- **List on hover.** Hovering a count lists its methods, with their
conditions, next to the label. A click keeps the list open until the
next click, a pan or a zoom. The diagram is not laid out again, so the
list appears at once. The list goes right, left, above or below the
label, or beside the diagram at the label's height: wherever it covers
the fewest states, labels and transition lines, and the closest such
place on a tie.
- **Constructors.** The constructors of each state are merged into one
arrow, e.g. `4 constructors`.
- **Layout.** The diagram is laid out again. A tall diagram is shrunk to
fit the panel, but never below 60%.
- **Bright.** Only the failed method stays bright.
- **States.** No state is removed.

**Show all** is unchanged.

An earlier version of this PR also drew a dashed "way to an expected
state": a shortest path along the diagram's transitions. It was dropped.
The path ignores the transitions' conditions and the code, and for a
state that no call leaves (`closed`) it could only suggest creating a
new object. The ways to fix now come from the verifier's hints only
(#172).

Error categories (liquid-java/liquidjava#418) are not used to choose
what to show. #170 explains why.

## Screenshots
Real verifier output (0.0.36) in headless VS Code.

**UDP chat client** (`E_OSS_A1_22`): `receive` after an `if` that may
close the socket. In the screenshots, the three `from = "closed(this) &&
connected(old(this))"` preconditions are removed from the DatagramSocket
spec. With them, verifier 0.0.36 sends no state context or hints for
this error, and the view can only say "Invalid method call at line 28".
That is a verifier issue, separate from this PR.

| Before | After |
|---|---|
| <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/udp-before.png"
width="440"> | <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/udp-after-v2.png"
width="440"> |

**On hover**, placed off the states and transitions: `+12 more` next to
`bound` goes beside the diagram, `+16 more` next to `connected` to its
right, and the `2 methods` of `ImageWriteParam` left of `tilingExplicit`
and right of `setTiling`.

| UDP, `bound` | UDP, `connected` |
|---|---|
| <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/udp-hover-bound.png"
width="440"> | <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/udp-hover-connected.png"
width="440"> |

| ImageWriteParam, bottom | ImageWriteParam, middle |
|---|---|
| <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/iwp-hover-bottom.png"
width="440"> | <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/iwp-hover-middle.png"
width="440"> |

**ImageWriteParam**: `setTiling` from `startTiling`.

| Before | After |
|---|---|
| <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/iwp-before.png"
width="440"> | <img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/iwp-after-v2.png"
width="440"> |

<details><summary>Show all (unchanged)</summary>

<img
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/focus-collapse/udp-show-all.png"
width="440">
</details>

The collapsed "Ways to fix" section in the screenshots comes from the
stacked PR.

## Tests
- `npm run test:unit`: 123 passed. New tests cover collapsing, the list
on hover, pinning it with a click and closing it on a click, pan or
zoom, placing it off the states, labels and lines and inside the panel,
merging constructors and the entry transitions from #169, the fit to the
panel, and Show all being unchanged.
- `tsc -p tsconfig.test.json` and `npm run lint`: clean.
- `npm test` (VS Code): 9 + 1 passing, and server `mvn test`: 35
passing, both run on the stacked branch, which includes this one.

Rebased on #169. In focus mode, entry transitions are dimmed and merged
per state, the same way constructors are.

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@CatarinaGamboa CatarinaGamboa mentioned this pull request Nov 9, 2026
Label a named state set's diagram with its name #178
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@CatarinaGamboa
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.