Repository navigation
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
Open
Kashyab Ambarani (kashyab12) wants to merge 2 commits into
Kashyab Ambarani (kashyab12) wants to merge 2 commits into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
webInboxCountnow 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.planAsksOf, which is now generic over the Apex entry so the web lines keep theirdeviceId. They go through a new purewebPlanAsks, whichuseWebPlanAskswraps. As before, a quiet owner's to-dos stay in its digest and are neither listed nor counted.useWebPlanAsks, so the chip counts plan lines before the Inbox page opens, the same way the desk'suseInboxCountdoes.Tests
scripts/test-web-inbox-count.ts(not in CI lists). On main, with the samewebPlanAsksshimmed in, it fails:actual: 1, expected: 3. On this branch it passes.test:inbox-count,scripts/test-placed-rows.ts(11 pass) andtest:phone-rail-uipass.npm run typecheck,npm run lintandnpm run check:public-textare clean.🤖 Generated with Claude Code