Skip to content

Count the phone's Inbox once: chip and page both read webInboxCount, plan lines included - #1250

Open
Kashyab Ambarani (kashyab12) wants to merge 2 commits into
mainfrom
fix/web-inbox-count
Open

Kashyab Ambarani (kashyab12) wants to merge 2 commits into
mainfrom
fix/web-inbox-count

Conversation

@kashyab12

Copy link
Copy Markdown
Collaborator

The web client's Inbox chip (phone, iPad, browser) counted Fins and waiting Threads but left out the Apex plan lines waiting on the person. The web Inbox page already listed those lines and counted them in its own sum, so the chip and the page could disagree, and the chip could disagree with the desk after #1249.

  • webInboxCount now takes the plan lines too. The list's Inbox chip and the Inbox page's "N need you" both call it, so the page no longer keeps its own sum.
  • The web client reads plan lines with the desk's planAsksOf, which is now generic over the Apex entry so the web lines keep their deviceId. They go through a new pure webPlanAsks, which useWebPlanAsks wraps. As before, a quiet owner's to-dos stay in its digest and are neither listed nor counted.
  • The list calls useWebPlanAsks, so the chip counts plan lines before the Inbox page opens, the same way the desk's useInboxCount does.

Tests

  • New standalone check scripts/test-web-inbox-count.ts (not in CI lists). On main, with the same webPlanAsks shimmed in, it fails: actual: 1, expected: 3. On this branch it passes.
  • test:inbox-count, scripts/test-placed-rows.ts (11 pass) and test:phone-rail-ui pass.
  • npm run typecheck, npm run lint and npm run check:public-text are clean.

🤖 Generated with Claude Code

…e both read webInboxCount, plan lines included

The web client's Inbox chip counted Fins and waiting Threads but not the Apex
plan lines waiting on the person, while its Inbox page listed and counted them,
so the chip, the page and the desk could each say a different number.

- webInboxCount takes the plan lines too; the list's chip and the page's
  "N need you" both call it.
- The phone reads plan lines with the desk's own planAsksOf (now generic over
  the Apex entry, so the phone's keep their Mac), through a pure webPlanAsks
  that useWebPlanAsks wraps.
- scripts/test-web-inbox-count.ts: standalone check (1 before, 3 after).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant