Phase 6: recipe + getting-started markdown rewrites (Subscribe/Publish nomenclature)#27
Open
adnaan wants to merge 1 commit into
Open
Phase 6: recipe + getting-started markdown rewrites (Subscribe/Publish nomenclature)#27adnaan wants to merge 1 commit into
adnaan wants to merge 1 commit into
Conversation
…blish (livetemplate v0.10.0)
Phase 6 of the broadcast-redesign wave (livetemplate#415) — docs side.
go.mod + e2e/go.mod bumped to livetemplate v0.10.0 (separate Go modules;
both must bump in lockstep).
8 user-named recipes rewritten at section-level depth (conceptual content,
not search-replace):
- content/index.md — top-of-funnel "Try it" paragraph.
- content/recipes/counter/index.md — full "How Subscribe + Publish route"
section replaces the prior BroadcastAction routing section; intro,
frontmatter, and "What next" list updated.
- content/recipes/shared-notepad/index.md — frontmatter, intro bullets,
Mount + Save sections (two-step Subscribe+Publish shape with the
"no Subscribe, no fan-out" caveat), Refresh section, scaling table.
- content/recipes/todos/index.md — same-user-multiple-tabs bullet,
scaling table cell, "What next" Counter link.
- content/recipes/broadcasting.md — full reframe around the two-step
shape; Mount section, "Sending — Publish under the lock-release rule",
multi-replica section now describes the topic-channel + seen-ring.
- content/recipes/sync-and-broadcast.md — full rewrite. Title: "Broadcast
& Server Push" → "Sync & Server Push". New 4-row When-to-pick matrix.
Mermaid diagram rewired with the Subscribe-aware sequence.
- content/recipes/architecture-flow.md — two-tab paragraph reframed.
- content/recipes/progressive-enhancement/index.md — Tier B limitation
bullet reframed to Publish-via-WS.
Inline _app/*.go migration (forced by the go.mod bump):
- content/recipes/counter/_app/counter.go: Mount adds Subscribe(SelfTopic);
Increment/Decrement swap to Publish.
- content/recipes/shared-notepad/_app/controller.go: Mount adds Subscribe;
Save publishes; Refresh comment rewritten.
- content/recipes/shared-notepad/_app/handler.go: 3 comment blocks reworded.
- content/recipes/shared-notepad/_app/notepad.tmpl: "How it works" bullet.
- content/recipes/todos/_app/controller.go: Mount adds Subscribe; 4 call
sites swap to Publish.
- content/recipes/patterns/_app/handlers_realtime.go: 3 controllers
(MultiUserSync, Broadcasting, Presence) gain Mount Subscribe; 5 Publish
call sites; 2 comment blocks reworded.
- content/recipes/patterns/_app/handlers_lists.go: 1 comment.
- content/recipes/patterns/_app/data.go: 2 pattern descriptions.
- content/recipes/patterns/_app/templates/realtime/{broadcasting,
multi-user-sync}.tmpl: explanatory paragraphs.
- cmd/site/main.go: shared-notepad mount-rationale comment block.
V20-zero cleanup (beyond user-named recipes):
- content/recipes/apps/index.md, content/getting-started/your-first-app.md:
flagged by the V20 substring sweep; reframed.
- e2e/shared-notepad/notepad_test.go, e2e/patterns/patterns_test.go:
comments and assertion messages.
V15 acceptance sweep GREEN — 5 chromedp e2e tests / 15 subtests pass
end-to-end against the migrated wiring (TestMultiUserSync,
TestBroadcasting, TestPresence, TestSharedNotepad_E2E,
TestSharedNotepad_MultiUserIsolation). The
Late_Joiner_Sees_Current_Counter_On_Mount subtest specifically validates
the Mount-side Subscribe + snapshot pattern works when a tab opens after
others have already published.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ed45f88 to
9ba2df0
Compare
adnaan
added a commit
to livetemplate/tinkerdown
that referenced
this pull request
May 21, 2026
…shm-usage + bump per-file deadline 15s → 60s) Surfaced while running the broadcast-redesign Phase-6 wave through livetemplate/docs#27's build workflow: the same docs content that validates cleanly in ~17s on a devbox failed in 5 successive CI runs with two error modes: ✗ index.md: chrome failed to start: Failed to connect to the bus ✗ recipes/architecture-flow.md: context deadline exceeded ✗ recipes/how-this-site-works.md: context deadline exceeded Each rerun flagged a *different* set of files (sometimes index.md alone; sometimes 3 unrelated files including ones the docs PR didn't touch), with the failures clustering on cold-runner runs. Local repro: 17s total for 55 files / 5 mermaid diagrams against the same content. The bug was in two layers: 1. **Missing `--disable-dev-shm-usage`.** Ubuntu CI runners default `/dev/shm` to 64MB (Docker/Actions cgroup default); Chrome's renderer process attempts to allocate shared memory there, OOMs, and the recovery path manifests as the `"Failed to connect to the bus"` D-Bus negotiation failure rather than a clean OOM error. Switching to `/tmp` via `--disable-dev-shm-usage` eliminates both the OOM and the misleading D-Bus message. Plus `--disable-extensions` + `--no-first-run` for faster cold-start. 2. **15s per-file deadline too tight on slow runners.** `validateMermaidDiagrams` creates a fresh `chromedp.NewExecAllocator` per file. Chrome cold-start on Ubuntu CI is routinely 5-10s; the diagram loop then adds Navigate + Sleep(2s) + Evaluate (~3s per diagram). On devbox: 15s holds. On CI with a slow cold start: only 5-7s budget remains — explaining the per-file randomness in which files fail. Bumped to 60s with a per-file rationale comment. Verified locally: same `time /tmp/tk-bin validate content/` against the docs site = 17s (no slowdown from the new flags), all 55 files pass. The CI side should follow once `docs#27` re-runs against a tinkerdown@main that includes this commit. This unblocks livetemplate/docs#27 (which has been red on `build` since its open) without changing any docs content — the docs content was always valid; the validator was over-tight for slow CI hardware. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Phase 6 of the broadcast-redesign wave (livetemplate#415) — docs side, markdown-rewrites-only after rebase.
Scope (post-rebase, net-new on top of origin/main)
docs#24 (already merged) covered the
_app/*.gomigrations + go.mod bump. This PR is the markdown-teaching-text companion that #24 didn't touch:content/index.md— top-of-funnel "Try it" paragraph.content/recipes/counter/index.md— full "How Subscribe + Publish route" section + frontmatter + "What next" list.content/recipes/shared-notepad/index.md— frontmatter, intro bullets, Mount + Save sections (two-step Subscribe+Publish shape with the "no Subscribe, no fan-out" caveat), Refresh section, scaling table.content/recipes/todos/index.md— same-user-multiple-tabs bullet, scaling table cell, "What next" Counter link.content/recipes/broadcasting.md— full reframe around the two-step shape; Mount section, "Sending — Publish under the lock-release rule", multi-replica section.content/recipes/sync-and-broadcast.md— full rewrite. Title: "Broadcast & Server Push" → "Sync & Server Push". New 4-row When-to-pick matrix.content/recipes/architecture-flow.md— two-tab paragraph reframed.content/recipes/progressive-enhancement/index.md— Tier B limitation bullet.content/recipes/apps/index.md,content/getting-started/your-first-app.md— V20-flagged residue..tmplfiles (broadcasting, multi-user-sync, notepad) — explanatory paragraphs.13 files, +96/-77.
V15 acceptance GREEN
5 chromedp e2e tests / 15 subtests pass against current main + the migrated controllers from #24.
Build / CI dependency on tinkerdown#279
This PR's
buildjob has been red since open. Root cause: bug in tinkerdown's mermaid validator, not in this PR's content:tinkerdown validate content/) creates a fresh Chromium process per file with a 15s deadline shared across all diagrams in the file. On Ubuntu Actions runners, Chrome cold-start routinely takes 5–10s, leaving 5–10s for navigation+render — randomly insufficient. The failure manifests two ways:chrome failed to start: Failed to connect to the bus(when Chrome OOMs/dev/shm) orcontext deadline exceeded. Different files failed each run, including ones this PR never touched (recipes/how-this-site-works.md).Fix landed in livetemplate/tinkerdown#279 (commit
74f51ad): adds--disable-dev-shm-usage+--disable-extensions+--no-first-runto the Chromium launch flags, and bumps the per-file deadline 15s → 60s. Locally verified to still pass the docs content in 17s.The docs CI workflow installs tinkerdown by cloning
https://github.com/livetemplate/tinkerdown.gitat default branch. Once tinkerdown#279 merges, the next docs CI rerun on this PR will install the fixed validator andbuildshould pass.Audit-was-wrong note
The original Phase 6 worktree branched off pre-#24 SHA
d15b96fand didn't notice docs#24 had already shipped (it's named in the project's pinned memory entry as a Phase 5 companion merge). The original commit re-migrated the same_app/*.gofiles; the rebase dropped those duplicate changes and kept only the net-new markdown work. Recorded in livetemplate#430'sphase-6.mdas a recovery deviation.Companion PRs
🤖 Generated with Claude Code