Skip to content

Trustblocks share links open ready to simulate; the clause check reports truly - #2

Merged
tbrooke merged 1 commit into
trustblocksfrom
fix/share-link-load
Sep 28, 2026
Merged

tbrooke merged 1 commit into
trustblocksfrom
fix/share-link-load

Conversation

@tbrooke

@tbrooke tbrooke commented Sep 28, 2026

Copy link
Copy Markdown

I found these by opening the link the app's Open in Template Playground now generates, which carries a contract's template, model, data, clause and lifecycle.

  • The page hung on a share link. loadFromLink awaited the clause check, and the check waits for the sandbox, which the page renders only after loading finishes. The check now runs without holding up the load, as it already did for samples.
  • "Start building" replaced a share link's template with the first card's. This is an upstream design-v2 behaviour. A page opened from a link now keeps what the link loaded.
  • The check reported every clause as refused, with the message [object Object]. The sandbox hands a null result back as {}, and anything other than a string was taken as a refusal; now only a string is. Simulate had stayed usable because a lifecycle alone unlocks it, which hid the bug. There's now a unit test for the {} case.
  • A link with a lifecycle and no clause now opens the logic panels too.

Tests

  • Unit: 310 of 310 pass.
  • e2e/trustblocks.spec.ts: 4 of 4 pass, with two new tests:
    • the Logic step shows checked;
    • a share link for the Town Manager contract opens, and the contract is approved under CERTIFY_MINUTES, ending in APPROVED.

🤖 Generated with Claude Code

…rts truly

Found opening the link Trustblocks' "Open in Template Playground" now
generates (a contract's template, model, data, clause and lifecycle):

- The page hung on a share link: loadFromLink awaited the clause check,
  which waits for the sandbox the page renders only once loading is done.
  The check now runs without holding up the load, as on a sample.
- "Start building" replaced a share link's template with the first card's.
  A page opened from a link keeps what the link loaded.
- The check reported every clause refused ("[object Object]"): the sandbox
  hands a null result back as {}, and anything but a string was taken as a
  refusal. Only a string is one now. Simulate had stayed usable because a
  lifecycle alone unlocks it, which hid this.
- A link with a lifecycle and no clause opens the logic panels too.

e2e/trustblocks.spec.ts now checks the Logic step says "checked", and opens
such a share link -- the Town Manager contract -- and approves it under
CERTIFY_MINUTES.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@tbrooke
tbrooke merged commit c69bdad into trustblocks Sep 28, 2026
2 checks passed
@tbrooke
tbrooke deleted the fix/share-link-load branch September 28, 2026 20:33
tbrooke added a commit to TrustBlocks/trustblocks-contracts that referenced this pull request Sep 28, 2026
…plate-playground#2)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tbrooke added a commit to TrustBlocks/trustblocks-contracts that referenced this pull request Sep 28, 2026
…cle (#49)

* Template Playground: Trustblocks' own, with the clause and the lifecycle

A contract's Template Playground action now opens Trustblocks' fork of
Accord's playground (TrustBlocks/template-playground, hosted at
trustblocks.github.io/template-playground), which runs Clojure logic with
our own clause runtime. The share link carries the contract's clause
(logicTs) and lifecycle (lifecycleJson), so it opens ready to simulate.

The fork bundles our shared models and Accord's usa.state beside Accord's
standard ones, so every template of ours opens -- the manager's contract,
unavailable until now, included. A model needing more than one namespace
beyond the bundle is still explained rather than linked.

bin/playground runs the fork locally (the `trustblocks` branch, pinned),
building its logic runtime and samples from the sibling
trustblocks-templates checkout the first time. The docs, runbook and
AGENTS.md say what the fork is and how to run it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* bin/playground: pin the fork at its share-link fixes (TrustBlocks/template-playground#2)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

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.

1 participant