Skip to content

feat(examples): greet-async example + e2e test - #127

Merged
adnaan merged 2 commits into
mainfrom
greet-async
Jul 26, 2026
Merged

feat(examples): greet-async example + e2e test#127
adnaan merged 2 commits into
mainfrom
greet-async

Conversation

@adnaan

@adnaan adnaan commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds examples/greet-async/ — the Async+Pending variant of greet-loading-server, collapsed from two methods to one via livetemplate.Async and {{.lvt.Pending}}
  • Adds chromedp e2e test (TestGreetAsync) that captures WS frames filtered by tree key and asserts the two-frame pending→completion sequence
  • Bumps livetemplate pin from v0.19.0 to v0.22.0 (includes Async API, Validate API, parse fixes)

Test plan

  • TestGreetAsync passes against local recipes server (7.78s)
  • Server logs show no fallback/diff warnings
  • go build ./... succeeds with pinned v0.22.0 (no replace directive)
  • gofmt -l clean on all changed files

🤖 Generated with Claude Code

https://claude.ai/code/session_01U1SVDXVmsZhhBFpUmPRV5j

adnaan and others added 2 commits July 26, 2026 07:10
….22.0 (#521)

Adds a greet-async example that demonstrates the Async[S,R] + {{.lvt.Pending}}
pattern — the same behavior as greet-loading-server but collapsed from two
methods (Greet + GreetDone) to one via livetemplate.Async.

The chromedp e2e test captures WS frames filtered by tree key (immune to
heartbeat interleaving) and asserts the two-frame sequence: frame #1 carries
"Loading..." (Pending=true), frame #2 carries the applied name with Pending
cleared.

Also bumps the livetemplate pin from v0.19.0 to v0.22.0 (Async API).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1SVDXVmsZhhBFpUmPRV5j
- Remove received(), receivedSince(), waitForReceivedCount() from
  helpers_test.go — superseded by tree-key-filtered variants, no callers
- Name unused err param as _ in apply closure to match documented
  error-propagation pattern

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1SVDXVmsZhhBFpUmPRV5j
@adnaan
adnaan merged commit f5e30f3 into main Jul 26, 2026
3 checks passed
@adnaan
adnaan deleted the greet-async branch July 26, 2026 13:26
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