Skip to content

Send refresh param on inbox load and manual refresh - #82

Merged
wparad merged 1 commit into
mainfrom
claude/inbox-refresh-param
Aug 19, 2026
Merged

Send refresh param on inbox load and manual refresh#82
wparad merged 1 commit into
mainfrom
claude/inbox-refresh-param

Conversation

@wparad

@wparad wparad commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • useThreadListQuery now sends a fresh ISO timestamp as the refresh query param on its very first fetch (covers page load/reload) and again whenever requestRefresh() runs — a new function it exposes, wired to the inbox's Refresh button (InboxView.vue) and the empty-state's refresh action.
  • The param is consumed after a single fetch, so routine background refetches (pagination, window focus, mutation-triggered invalidation) don't keep re-sending it.
  • Strengthened the existing InboxView.regression.test.ts "refresh button triggers new fetch" test to assert refresh is actually present on the call, rather than just that listThreads was called at all.

Context

Backend's GET /accounts/:id/threads already treats a present refresh value as a signal to wake the account's IMAP/JMAP IDLE listener (threadsApi.ts:97-103 in rhosys/ses-email-adapter) — but nothing in the UI ever populated it. ThreadListParams.refresh and its query-string wiring already existed in api.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) passes
  • npx vue-tsc --noEmit — clean
  • npx eslint . --ext .ts,.vue — clean

Generated by Claude Code

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).
@github-actions

Copy link
Copy Markdown

Preview deployed

URL: https://email.rhosys.cloud/pr/claude-inbox-refresh-param/

@wparad
wparad merged commit 5083080 into main Aug 19, 2026
3 checks passed
@wparad
wparad deleted the claude/inbox-refresh-param branch August 19, 2026 23:05
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