feat(examples): greet-async example + e2e test - #127
Merged
Merged
Conversation
….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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
examples/greet-async/— the Async+Pending variant of greet-loading-server, collapsed from two methods to one vialivetemplate.Asyncand{{.lvt.Pending}}TestGreetAsync) that captures WS frames filtered bytreekey and asserts the two-frame pending→completion sequenceTest plan
TestGreetAsyncpasses against local recipes server (7.78s)go build ./...succeeds with pinned v0.22.0 (no replace directive)gofmt -lclean on all changed files🤖 Generated with Claude Code
https://claude.ai/code/session_01U1SVDXVmsZhhBFpUmPRV5j