Skip to content

feat(tour): in-app founder walkthrough (8 steps) + server-side persistence - #254

Merged
dwinter3 merged 1 commit into
mainfrom
feat/founder-tour
May 14, 2026
Merged

feat(tour): in-app founder walkthrough (8 steps) + server-side persistence#254
dwinter3 merged 1 commit into
mainfrom
feat/founder-tour

Conversation

@dwinter3

Copy link
Copy Markdown

Adds the founder onboarding tour that auto-fires the first time a claimed admin lands in the L2 admin shell. Eight steps, ~90 seconds, teaches what an L2 is, where to connect agents, and where each operational surface lives. Custom spotlight + popover engine (no library, brand-native). State persists server-side via users.tour_state JSON column (migration 0024) + GET/PUT /api/v1/users/me/tour-state endpoints. Resumes mid-tour across refresh / device. Manual replay via ? button in the header. Tests cover the endpoint contract: default-on-fresh-user, round-trip PUT/GET, 'now' sentinel stamping, 404-on-missing-user race. Frontend type-checks + builds + lint:check clean. 53 backend tests in the affected suites pass.

The first time a founder lands in the admin shell after claiming their
invite, they see an empty L2 with no context for what to do next. This
PR ships an in-app guided tour ("WalkMe-style") to teach them what
they're looking at and walk them to their first agent connection.

Eight steps, ~25 words each, ~90 seconds total:

  1. Welcome to your L2 (semantic substrate, Layer 8)
  2. One Group / one L2 — model B explained
  3. API Keys → connect your first agent
  4. Network → watch the graph grow
  5. Review → approve knowledge
  6. Dashboard → day-over-day operations
  7. Personas → invite humans, assign personas
  8. You're operational

# Engine

Custom spotlight + popover (no library) — keeps the brand chrome
(Fraunces / cyan-violet / dark) intact without restyling someone
else's component. SVG-mask spotlight, viewport-clamped popover, ESC
to dismiss, dots for progress, "Skip" to abandon.

# Persistence

Server-side via `users.tour_state` (TEXT/JSON) — migration 0024 adds
the column, new GET/PUT `/api/v1/users/me/tour-state` endpoints persist
the state shape `{completed_at, dismissed_at, current_step}`. Resume
mid-tour after refresh; tour stays "done" across browsers/devices.

# Trigger

Auto-fire on first login (when state row is empty AND no dismissed_at)
plus a `?` button in the header for manual replay.

# Tests

`test_tour_routes.py` — 4 endpoint tests (default-on-fresh-user,
round-trip, "now" sentinel stamping, 404-on-missing-user race).
@dwinter3
dwinter3 merged commit 47db70d into main May 14, 2026
1 of 2 checks passed
@dwinter3
dwinter3 deleted the feat/founder-tour branch May 14, 2026 12:16
dwinter3 added a commit that referenced this pull request May 15, 2026
…267)

The new CodeBuild CI gate (#168) made main's red server suite visible.
All 7 failures were stale tests, not product bugs — features shipped
correctly, their tests just weren't updated:

- HEAD_REVISION pins (3 files: test_default_enterprise_backfill,
  test_migration_0011_activity_log, test_migration_0015_*) hardcoded
  "0023_persona_assignment_audit". Migration 0024_user_tour_state
  (founder tour, #254) correctly bumped HEAD_REVISION; the test pins
  didn't follow. Bumped to 0024 + de-staled the comments.
- test_queries TestUserHelpers — raw INSERT_USER param dicts omitted
  `role` (the column the role-propagation fix #252/#253 added to the
  INSERT), and the SELECT row indices still assumed the pre-role column
  order. Added role to the dicts; fixed row[3]/row[4] indexing.
- test_review test_get_requires_auth — _propose() logs in, persisting
  the cq_session cookie in the TestClient jar; since cookie auth
  landed, that cookie authenticates the "no header" request. Clear the
  jar so it exercises the genuine unauthenticated path.

Full server suite: 858 passed, 5 skipped, 0 failed.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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