Skip to content

Add public agent runbooks with signup continuation and atomic creation - #275

Merged
brianorwhatever merged 3 commits into
mainfrom
feat/203-agent-runbook-templates
Oct 5, 2026
Merged

brianorwhatever merged 3 commits into
mainfrom
feat/203-agent-runbook-templates

Conversation

@brianorwhatever

@brianorwhatever brianorwhatever commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Add ten public agent runbooks with crawlable use-case pages. “Use this template” survives signup and creates a private list containing every step in one authenticated mutation. Existing quick-start and saved templates remain available.

Closes #203.

Creation preserves list quotas and first-list referral rewards, waits for app unlock, and reuses unresolved attempts after a lost response/reload. The public catalog contains only source-controlled templates; private saved templates remain protected. Per-template view/use/activation events use existing consent-gated analytics and a stable activation deduplication ID. Generated HTML, metadata and sitemap support direct requests and client navigation.

Validation:

  • 672 unit tests and all 121 browser tests pass; app/backend/E2E typechecks and focused ESLint pass.
  • Independent delegated review: five pre-PR findings and both automated findings fixed and re-reviewed; 20 focused tests independently pass, with no remaining blocking findings.
  • Direct Vite build passes (existing chunk-size warnings). Actual local production-server HTTP checks verify generated pages, trailing slashes, protected/unknown SPA fallbacks and XML sitemap.
  • Desktop/mobile DOM checks show all steps and CTA without horizontal overflow. T3 screenshot capture failed; evaluation and browser tests worked.

Release prerequisite: make the compatible Convex backend available before the frontend; the independent release pipelines do not enforce that order. Live OTP, deployed Convex transactions/native biometrics, production crawling and PostHog ingestion were not exercised. Direct authenticated/unlocked /templates/:slug/use?new=1 links intentionally create a fixed catalog list; the reviewer noted persisted explicit intent as nonblocking UX hardening. Latest commit e1d3593 passes CI unit tests, all 121 browser tests, web/Android/unsigned iOS builds, Lighthouse and automated review; GitHub reports CLEAN/MERGEABLE. Independent final follow-up review found no blockers. No required human review is currently reported by GitHub. No merge or manual deployment.

@railway-app

railway-app Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the boop-pr-275 environment in Friends

Service Status Web Updated
boop ✅ Success (View Logs) Web Oct 5, 2026 at 12:58 am UTC

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Moving the quick-start picker onto createListFromTemplate drops the per-item authorship credential that addItem used to attach. The backend now also reads a catalog file that its deploy workflow doesn't watch.

Reviewed changes

I reviewed the full diff of the single commit: the public runbook catalog, signup continuation, atomic creation, prerendering, and the app-lock gating change.

  • Shared catalog: src/lib/builtinTemplates.ts now re-exports shared/templates.ts, which adds ten AGENT_RUNBOOKS and an allowlisted templateLoginDestination.
  • Atomic creation: createListFromTemplate accepts builtinId or templateId, deduplicates by assetDid + templateSource, enforces assertListQuota, sets the list vcProof, and grants the first-list referral through the extracted grantFirstListReferral.
  • Quick-start path rewired: TemplatePickerModal and Templates now make one createListFromTemplate({ builtinId }) call instead of createList + N×addItem.
  • Public gallery + continuation: /templates and /templates/:slug are public. Activation happens at /templates/:slug/use behind AppLockGuard + AuthGuard, with retry state kept in sessionStorage. The saved-template manager moves to /templates/saved.
  • App lock: AppLockGuard mounts no children until the lock preference resolves, and if reading it fails the app stays locked.
  • SEO: a Vite closeBundle hook prerenders per-runbook HTML and sitemap entries, and server.ts serves directory index.html files.

ℹ️ The new builtinId argument briefly depends on deploy order

TemplatePickerModal and Templates now send builtinId with no fallback. Railway and the Convex workflow both deploy on merge, independently. If the frontend lands first, the old validator rejects the unknown argument and every quick-start template fails until Convex catches up. If that window matters, run the Convex deploy (workflow_dispatch) before the frontend ships.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread src/components/TemplatePickerModal.tsx
Comment thread convex/templates.ts Outdated
@railway-app
railway-app Bot temporarily deployed to Friends / boop-pr-275 October 5, 2026 00:53 Destroyed

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. Both findings from the previous review are fixed.

Reviewed changes

I reviewed e506787, which fixes the two findings from the prior review. The frontend, e2e and script files changed only their import paths.

  • Restored item authorship metadata: createListFromTemplate now inserts each item with updatedAt and assignmentsVersion: 1. It then attaches vcProofs: [createItemAuthorshipVC(...)] the same way addItem does, using the helper now exported from convex/items.ts. A new test checks the exact credential payload for both a built-in and a saved template, and confirms that a retry leaves the items unchanged.
  • Moved the catalog under convex/lib/: shared/templates.ts became convex/lib/templateCatalog.ts. The existing convex/** deploy filter now picks up catalog edits, so the frontend preview and the backend creation data can't drift apart. Every importer was updated. The frontend already imports from convex/lib/* elsewhere (noteBody, authError), so this follows an existing pattern.
  • Documented release ordering: docs/templates.md now says the Convex backend must be deployed before the frontend, because the old validator rejects builtinId.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@railway-app
railway-app Bot temporarily deployed to Friends / boop-pr-275 October 5, 2026 00:57 Destroyed
@brianorwhatever
brianorwhatever merged commit 72ffae0 into main Oct 5, 2026
10 checks passed

This branch was successfully deployed

No deployments
Friends / boop-pr-275 — e1d35936 Deployed Oct 5, 2026 by railway-app[bot]
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.

Templates gallery v1: 10 agent-runbook templates (SEO surface)

1 participant