Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/recording-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,14 @@ three scoped to the account.
| `GET /api/recordings/{id}` | one recording's state, dates and recovery |
| `GET /api/recordings/{id}/events` | its replay: snapshot, review or tail |

The signed-in `GET /api/session` response includes a boolean
`recordingAvailable`. It is `true` when the server has a recorder and the
signed-in account has a verified email address. A candidate's recording list can still
be empty. Clients can determine availability from the session response alone.
The signed-out response omits the field. Clients must handle an absent field
and offer recording history only when the session confirms sign-in and the
field is `true`.

The events route has three shapes and two query parameters. Absent or negative
`after` is the snapshot, which keeps the newest row of each replaceable kind and
drops what it replaced. A sequence number is the tail, which drops nothing.
Expand Down
1 change: 1 addition & 0 deletions src/web/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ pub(crate) async fn session_handler(
&state,
json!({
"signedIn": true,
"recordingAvailable": state.recorder.is_some() && user.verified_email.is_some(),
"identityVerified": user.identity_verified,

// Task mode admits only a login GitHub vouched for; the
Expand Down
1 change: 1 addition & 0 deletions tests/browser/history.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ test("the response window panel says what the number is worth, in words a test c
"CODETRIAL",
"Your recordings",
"Interviews this account recorded. A recording is kept for 24 hours and then deleted, along with everything on this page.",
"Back to lobby",
"Older",
"No recordings yet.",
"Choose a recording",
Expand Down
Loading
Loading