Skip to content

hub-client: seed an Examples / Templates collection on first run (bd-3fwtdhil) - #700

Open
icarusz wants to merge 4 commits into
mainfrom
feature/bd-3fwtdhil-seed-examples-collection
Open

icarusz wants to merge 4 commits into
mainfrom
feature/bd-3fwtdhil-seed-examples-collection

Conversation

@icarusz

@icarusz icarusz commented Sep 19, 2026

Copy link
Copy Markdown
Member

A brand-new user's first boot now creates an Examples / Templates collection with four example projects: Meeting Notes, Website, Article, Presentation. Each is the user's own fresh copy (new Automerge docs scaffolded from registry templates flagged seed, hub surface only); nothing is shared between users. Seeding fires exactly once, when a needs-setup boot establishes its root; never for migrations, returning browsers, or invite/share routes. Per-example failures skip that example and log. Every template's "Make it yours" points at the getting started guide.

Braid: implements bd-3fwtdhil (builds on bd-d147nkqx surface-gated choices, bd-4h1hv60p auto-root). Bugs found reviewing the rendered examples, filed not fixed here: bd-daa1nw40 (preview table caption: no "Table N:" prefix, unresolved crossref), bd-bj5y33jo (preview drops a citation after a leading @thm ref), bd-6xyjtnb9 (pipe-table alignment ignored), bd-jvu6cw57 (theorem refs render "Section 1: Theorem 1"), bd-5sbguner (flaky doc-inventory test).

Testing: unit tests for the seeding orchestration and fresh-root trigger; full cargo xtask verify green; e2e on wiped profiles in local-prod (per-user doc ids confirmed).

Article Website
Presentation Meeting Notes

🤖 Generated with Claude Code

icarusz and others added 2 commits September 19, 2026 09:22
…3fwtdhil)

New users' first boot creates an "Examples / Templates" collection holding
four example projects: Meeting Notes, Website, Article, Presentation. Each is
the user's own fresh copy (new Automerge docs scaffolded from the registry;
nothing shared between users), filed into a collection created for them.

Mechanism: registry choices flagged `seed: true` (hub surface only, per
bd-d147nkqx) drive `seedExampleProjects` in seedExamples.ts, triggered by
`onFreshRoot` in useAutoEstablishRoot: exactly once, when a needs-setup boot
establishes its root (never for migrations, returning browsers, or share/join
routes, per bd-4h1hv60p). Failures are per example; only collection-creation
failure aborts.

Each template's "Make it yours" section links the getting started guide.
The article table caption avoids a crossref inside the caption (works around
bd-daa1nw40). Bugs found reviewing the rendered examples were filed rather
than fixed here: bd-daa1nw40, bd-bj5y33jo, bd-6xyjtnb9, bd-jvu6cw57, and
bd-5sbguner (flaky doc-inventory test seen during verification).

Screenshots of each template's first page (native q2 render):
claude-notes/plans/assets/2026-09-17-get-started-collection/.

Verified end-to-end in local-prod on wiped profiles: fresh boot lands on the
home with all four examples seeded and per-user doc ids; full
`cargo xtask verify` green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Documents 32a96ec.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@posit-snyk-bot

posit-snyk-bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

icarusz and others added 2 commits September 21, 2026 12:24
…d-examples-collection

# Conflicts:
#	hub-client/changelog.md
Every Playwright test boots a fresh profile, so the first-run seeding fired
in every test context: four surprise projects broke fixtures assuming an
empty start (debug-inspector's seeded doc, import-zip), raced the injected
test actor id, and added enough connect load to stall CI (CONNECT_ERROR /
CONNECT_STALL with the article template's files stranded). Gate seeding off
under VITE_E2E=1, alongside the existing invite-boot and ephemeral-hub
exclusions. A future seeding-specific e2e test should opt in explicitly.

Local `npm run test:e2e`: 78 passed, 0 failed.

No changelog entry: test-environment-only change (changelog.md documents
user-facing changes only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants