Skip to content

fix: poll notifications with the filter on screen - #480

Open
SanderMuller wants to merge 3 commits into
dev-null-sh:productionfrom
SanderMuller:fix/notifications-poll-keeps-filter
Open

SanderMuller wants to merge 3 commits into
dev-null-sh:productionfrom
SanderMuller:fix/notifications-poll-keeps-filter

Conversation

@SanderMuller

@SanderMuller SanderMuller commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

The notifications page polls every 30 seconds and loads more on scroll. Both requests reuse the current URL, so they send type only when the URL has ?type. On a page opened from the nav, the server uses the remembered filter in the cookie. That filter can differ from the chips on screen. Open Notifications on All, pick Replies, then go Back: the page shows All, and the next poll swaps in Replies. A second tab that changes the filter does the same.

The poll and InfiniteScroll now send filters.type, so the list always matches the chips. The cookie still decides the filter when you open the page without ?type.

The same poll also refreshes the Remotes badge now. The layout turns its count poller off on this page, and the page poll asked only for the notification count. So on mobile, or with the chat dock undocked, the Remotes badge stopped until you left the page.

NotificationPoll.test.tsx checks both. It fails on production and passes with this change. I added it to draft-images.config.ts and tests/tsconfig.json, so bun run test:unit and test:types cover it.

Related: #308 replaces this poll with a sync endpoint, and #300 and #492 replace draft-images.config.ts. Whichever lands second needs a small rebase.

🤖 Generated with Claude Code

SanderMuller and others added 3 commits October 19, 2026 20:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SanderMuller
SanderMuller force-pushed the fix/notifications-poll-keeps-filter branch from d86076b to 5749b20 Compare October 19, 2026 18:21
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