Lane 9 PR 5: J1 walks Admin's part; the first person to sign in owns the server (#735) #944

Merged
claude-bot merged 5 commits from build/lane9-5-j1-admin into main 2026-09-29 20:45:23 +00:00
Collaborator

Part of #735 (lane 9 PR 5, J1's Admin leg).

Journey (e2e/j1-first-campaign.spec.js):

  • Leftovers: asserted from GET /api/setup/state's skipped, with one "Set up X" link per skipped step (backups, what is kept, the models, Discord), and asserted absent when nothing is owed. The three projects share one DB, so this is conditional.
  • Backup settled:
    • Desktop clicks Save; keyboard focuses Save and presses Enter.
    • The switch is set, not toggled, so a retry can't turn it back off.
    • After Save: "Saved" shows, Enter goes back to /admin, "Set up backups" is gone, and skipped no longer holds backups.
  • Phone: the "Admin" back link goes to /admin, and the document doesn't scroll sideways.
  • Already on main, unchanged: the /admin/* addresses, the ?tab=backup redirect contract, full axe scans, IS-377's non-admin page and the Contents navigation.

App bug found and fixed: nothing ever made the first administrator of a new server its owner (D68). Only the migration's backfill did, for servers that already existed.

  • routers/auth.py now sets is_server_owner=(user_count == 0) beside is_admin.
  • test_auth_callback.py asserts the first user is the owner and a later one isn't. The column defaults to false, so the first-user assertion fails on main.

Checks:

  • J1 passes locally in all three projects (12/12).
  • test_auth_callback.py and test_server_owner.py: 50 pass.
  • ruff 0.4.4 and eslint (e2e) are clean.
  • Changelog: changelog.d/735-j1-admin-leg.fixed.md.

Coverage note: on a fresh CI database, desktop walks the setup wizard branch. The Admin leg's Save therefore runs in the keyboard project there (Enter), not as a mouse click. The page and assertions are the same.

🤖 Generated with Claude Code

Part of #735 (lane 9 PR 5, J1's Admin leg). **Journey (`e2e/j1-first-campaign.spec.js`):** - **Leftovers:** asserted from `GET /api/setup/state`'s `skipped`, with one "Set up X" link per skipped step (backups, what is kept, the models, Discord), and asserted absent when nothing is owed. The three projects share one DB, so this is conditional. - **Backup settled:** - Desktop clicks Save; keyboard focuses Save and presses Enter. - The switch is *set*, not toggled, so a retry can't turn it back off. - After Save: "Saved" shows, Enter goes back to `/admin`, "Set up backups" is gone, and `skipped` no longer holds `backups`. - **Phone:** the "Admin" back link goes to `/admin`, and the document doesn't scroll sideways. - **Already on main, unchanged:** the `/admin/*` addresses, the `?tab=backup` redirect contract, full axe scans, IS-377's non-admin page and the Contents navigation. **App bug found and fixed:** nothing ever made the first administrator of a *new* server its owner (D68). Only the migration's backfill did, for servers that already existed. - `routers/auth.py` now sets `is_server_owner=(user_count == 0)` beside `is_admin`. - `test_auth_callback.py` asserts the first user is the owner and a later one isn't. The column defaults to false, so the first-user assertion fails on main. **Checks:** - J1 passes locally in all three projects (12/12). - `test_auth_callback.py` and `test_server_owner.py`: 50 pass. - ruff 0.4.4 and eslint (e2e) are clean. - Changelog: `changelog.d/735-j1-admin-leg.fixed.md`. **Coverage note:** on a fresh CI database, desktop walks the setup wizard branch. The Admin leg's Save therefore runs in the keyboard project there (Enter), not as a mouse click. The page and assertions are the same. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(journeys): eslint globals in overflow check (#735)
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m0s
CI / Backend lint (ruff) (pull_request) Successful in 1m32s
CI / Feedback site tests (pull_request) Successful in 41s
CI / Bot tests and audit (pull_request) Successful in 1m54s
CI / Does this change touch the recording path? (pull_request) Successful in 18s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 1m17s
CI / Docker image build (pull_request) Successful in 3m16s
CI / Frontend (shard 2/2) (pull_request) Successful in 5m29s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 9m32s
CI / End-to-end journeys (desktop) (pull_request) Successful in 9m35s
CI / Backend migration, tests, and audit (pull_request) Successful in 16m20s
CI / End-to-end journeys (phone) (pull_request) Successful in 17m43s
CI / Frontend (shard 1/2) (pull_request) Successful in 14m44s
9f33f7c6aa
Sign in to join this conversation.
No description provided.