feat: make Home Link a reusable remote dashboard - #697
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca5ccf184e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state.finishRead() | ||
| }() | ||
| sessionContext := state.session.Context() | ||
| ttl := time.Until(sessionContext.ExpiresAt) |
There was a problem hiding this comment.
Clamp read authorization to the session expiry
When passkey verification crosses a millisecond boundary, this calculates the remaining TTL before verification, but IssueReadSession later sets ExpiresAt from its post-verification wall clock plus that full TTL. The returned expires_at_ms therefore exceeds the signed session expiry, and HomeLinkSession.authorize() rejects it via result.expires_at_ms > this.expiresAtMS, making Unlock fail with “session authorization failed” under ordinary verification latency. Pass the absolute session deadline through or subtract the elapsed verification time before returning the grant.
AGENTS.md reference: AGENTS.md:L72-L75
Useful? React with 👍 / 👎.
What changed
Why
The beta page exposed raw JSON and asked for a passkey on every read. It did not feel like remote access to the user’s FTW.
Safety
Validation
make verify-allnpm test(238 tests)