Send refresh param on inbox load and manual refresh - #82
Merged
Conversation
The backend's GET /accounts/:id/threads already treats a present `refresh` query value as a signal to wake the account's IMAP/JMAP IDLE listener (threadsApi.ts), but nothing in the UI ever set it — the Refresh button and page load only re-read cached thread data. Now useThreadListQuery sends a fresh ISO timestamp as `refresh` on its first fetch (covers page load/reload) and again whenever requestRefresh() runs (the Refresh button and empty-state action).
Preview deployedURL: https://email.rhosys.cloud/pr/claude-inbox-refresh-param/ |
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.
Summary
useThreadListQuerynow sends a fresh ISO timestamp as therefreshquery param on its very first fetch (covers page load/reload) and again wheneverrequestRefresh()runs — a new function it exposes, wired to the inbox's Refresh button (InboxView.vue) and the empty-state's refresh action.InboxView.regression.test.ts"refresh button triggers new fetch" test to assertrefreshis actually present on the call, rather than just thatlistThreadswas called at all.Context
Backend's
GET /accounts/:id/threadsalready treats a presentrefreshvalue as a signal to wake the account's IMAP/JMAP IDLE listener (threadsApi.ts:97-103inrhosys/ses-email-adapter) — but nothing in the UI ever populated it.ThreadListParams.refreshand its query-string wiring already existed inapi.ts, just unused. Pressing Refresh (or reloading the page) only ever re-read cached thread data from the database; it never actually asked the backend to check the mailbox for new mail.Test plan
npx vitest run— full suite (67 files, 510 tests) passesnpx vue-tsc --noEmit— cleannpx eslint . --ext .ts,.vue— cleanGenerated by Claude Code