Skip to content

Register push only for the signed-in account's Burrows - #1238

Merged
nedtwigg merged 4 commits into
mainfrom
pocket-account-burrow-filter
Oct 20, 2026
Merged

nedtwigg merged 4 commits into
mainfrom
pocket-account-burrow-filter

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Hardening for Pocket's push registration across an account switch.

Pinned Burrow records outlive a sign-out, so after signing in to a different account the Burrows list can still show a record paired under the earlier one (it keeps its offline row, per docs/specs/pocket-app.md). Enable treated that row as a push target and asked this session's Relay to register it. The Relay scopes registration to the session's account and refuses it, and that refusal stopped the loop before the current account's own Burrows registered, leaving the offer card up for an Enable that could never finish.

  • loadBurrows in lib/src/remote/pocket-app/App.tsx marks a record whose accountId is not the signed-in account's as otherAccount on its BurrowView, from the same account read that already decides removed.
  • isPushTarget excludes it, so Enable never sends it to the Relay and the push offer does not count it.
  • The row itself is unchanged: it stays listed with its offline face, and nothing about its record is touched.

Tests

lib/src/remote/pocket-app/App.push.test.tsx → "skips a Burrow paired under another account, and keeps its row": with the first record under an earlier account (and a Relay that refuses it), Enable registers only the second, reports no error, and the offer goes away. It goes red with the isPushTarget change reverted.

Specs

  • docs/specs/pocket-app.md → "Detecting install state, and what cannot be detected" (the push-registration rules): Enable registers, and the offer counts, only the signed-in account's paired Burrows its list still names (word budget ratcheted).

🤖 Generated with Claude Code

Pinned records outlive an account switch, so the Burrows list can show a
record paired under another account. Enable treated it as a push target and
asked this session's Relay to register it, which refuses a Burrow the account
does not hold; the refusal stopped the loop before this account's own Burrows
and left the offer up for good.

The list now marks such a row `otherAccount`, and push neither registers it
nor counts it in the offer. The row itself keeps its offline face.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3a32427
Status: ✅  Deploy successful!
Preview URL: https://77d06702.mouseterm.pages.dev
Branch Preview URL: https://pocket-account-burrow-filter.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change itself looks right to me, and I have no findings on the diff. I'm holding the approval only because Workflow Lint is red on this head. It isn't caused by this PR: zizmor flags ci.yml:403 ("action's hash pin has mismatched or missing version comment"), which this PR doesn't touch, and main fails the same way in run 39445113310. Once main is fixed and this PR's checks are green, this is ready to approve.

@nedtwigg
nedtwigg merged commit 3c8621a into main Oct 20, 2026
15 checks passed
@nedtwigg
nedtwigg deleted the pocket-account-burrow-filter branch October 20, 2026 17:16
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.

2 participants