From 303addadabbbe894fcbbbf7f8f044d4a425fb51c Mon Sep 17 00:00:00 2001
From: Catarina Gamboa <52540187+CatarinaGamboa@users.noreply.github.com>
Date: Fri, 25 Sep 2026 00:36:05 +0100
Subject: [PATCH 1/2] Show constructor signatures on state machine arrows
---
client/src/types/fsm.ts | 2 +-
client/src/webview/diagram.ts | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/client/src/types/fsm.ts b/client/src/types/fsm.ts
index d9e1959..0d252ec 100644
--- a/client/src/types/fsm.ts
+++ b/client/src/types/fsm.ts
@@ -2,7 +2,7 @@
export type LJStateMachine = {
className: string;
- initialTransitions: { to: string; toCondition?: string | null }[];
+ initialTransitions: { to: string; toCondition?: string | null; constructorSignature?: string | null }[];
states: string[];
transitions: { from: string; to: string; label: string; fromCondition?: string | null; toCondition?: string | null }[];
errorContext: LJStateMachineErrorContext | null;
diff --git a/client/src/webview/diagram.ts b/client/src/webview/diagram.ts
index e9d3e64..d908714 100644
--- a/client/src/webview/diagram.ts
+++ b/client/src/webview/diagram.ts
@@ -35,7 +35,7 @@ export function createMermaidDiagram(
// initial transitions
sm.initialTransitions.forEach(transition => {
- const label = getInitialTransitionLabel(transition.toCondition, showConditions);
+ const label = getInitialTransitionLabel(transition.constructorSignature, transition.toCondition, showConditions);
lines.push(` [*] --> ${transition.to}${label ? ` : ${label}` : ''}`);
});
@@ -89,8 +89,12 @@ function getTransitionLabel(
].filter(Boolean).join('
');
}
-function getInitialTransitionLabel(toCondition?: string | null, showConditions = false): string {
- return showConditions ? getConditionLabel('post', toCondition) : '';
+function getInitialTransitionLabel(constructorSignature?: string | null, toCondition?: string | null,
+ showConditions = false): string {
+ return [
+ constructorSignature ? escapeMermaidLabel(constructorSignature) : '',
+ showConditions ? getConditionLabel('post', toCondition) : '',
+ ].filter(Boolean).join('
');
}
function getConditionLabel(kind: 'pre' | 'post', cond?: string | null): string {
From e0b8761f2bcd0ae6d4b80c5440e849bf16dd89ce Mon Sep 17 00:00:00 2001
From: Catarina Gamboa
Date: Tue, 20 Oct 2026 22:27:04 +0200
Subject: [PATCH 2/2] Use liquidjava-fsm 0.1.2 for constructor signatures
Co-Authored-By: Claude Opus 5.5 (1M context)
---
server/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/pom.xml b/server/pom.xml
index 31b050c..421bb29 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -172,7 +172,7 @@
io.github.liquid-java
liquidjava-fsm
- 0.1.0
+ 0.1.2
tools.aqua