Sign-out records account.installation-revoked (live Installation lists) #104

Closed
kayg wants to merge 0 commits from issue/20-logout-journal into dev
Owner

Closes #20.

  • POST /api/v1/auth/logout now runs account.revoke through the engine (idempotency key sign-out-<installation>), so the journal records account.installation-revoked. Auth::set_engine wires the engine in (weak link); without it, logout still just revokes.
  • Test signing_out_shows_up_live_on_another_device: a live feed open for the user sees the event on sign-out, and a second sign-out records nothing more.
  • Web: Settings > Devices only loaded on open. It now reloads on account.* journal entries. Its Sign out button also sent {id} instead of {installation}, so it never worked; fixed.
  • Playwright (flow.spec.ts, Chromium): a second browser context signs in with the same passkey and signs out; the list open in the first goes from 2 rows to 1 with no reload. Passes.

Not covered: a new sign-in writes no event, so a list does not gain rows live.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

Closes #20. - `POST /api/v1/auth/logout` now runs `account.revoke` through the engine (idempotency key `sign-out-<installation>`), so the journal records `account.installation-revoked`. `Auth::set_engine` wires the engine in (weak link); without it, logout still just revokes. - Test `signing_out_shows_up_live_on_another_device`: a live feed open for the user sees the event on sign-out, and a second sign-out records nothing more. - Web: Settings > Devices only loaded on open. It now reloads on `account.*` journal entries. Its Sign out button also sent `{id}` instead of `{installation}`, so it never worked; fixed. - Playwright (`flow.spec.ts`, Chromium): a second browser context signs in with the same passkey and signs out; the list open in the first goes from 2 rows to 1 with no reload. Passes. Not covered: a new sign-in writes no event, so a list does not gain rows live. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Logout now runs account.revoke through the engine, like revoking from the
list does. Closes #20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Devices list refreshes when an account event arrives; fix revoke input name
Some checks failed
CI / rust (pull_request) Failing after 1m22s
CI / web (pull_request) Failing after 2m30s
1cfc90bcf8
Settings > Devices now reloads on account.* journal entries, so another
browser's sign-out shows up live. Its Sign out button sent {id}, but the
action takes {installation}. The flow test checks the live update with a
second browser signed in by the same passkey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Author
Owner

Review: diff read, looks right (the weak engine link avoids a reference loop; sign-out keeps working without an engine; the idempotency key makes a second sign-out a no-op). CI's only failure was the answers_within_budget startup gate at 512 ms vs 500 ms on a runner shared by about 8 agent builds. Locally on this branch: startup passed 3 of 3 runs (0.14–0.23 s for the whole file), and all calternal-auth tests pass. Merging. Follow-up: a new sign-in should write an event too, so lists gain rows live.

Review: diff read, looks right (the weak engine link avoids a reference loop; sign-out keeps working without an engine; the idempotency key makes a second sign-out a no-op). CI's only failure was the `answers_within_budget` startup gate at 512 ms vs 500 ms on a runner shared by about 8 agent builds. Locally on this branch: `startup` passed 3 of 3 runs (0.14–0.23 s for the whole file), and all `calternal-auth` tests pass. Merging. Follow-up: a new sign-in should write an event too, so lists gain rows live.
Author
Owner

Closing: this branch is already fully contained in dev (it landed through a merge train). Branch cleanup, 2026-10-15.

Closing: this branch is already fully contained in `dev` (it landed through a merge train). Branch cleanup, 2026-10-15.
kayg closed this pull request 2026-10-15 08:35:08 +00:00
Some checks failed
CI / rust (pull_request) Failing after 1m22s
CI / web (pull_request) Failing after 2m30s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!104
No description provided.