This commit is contained in:
2026-08-04 10:26:54 -05:00
parent 96a37a495e
commit da3f8434a1
11 changed files with 926 additions and 77 deletions

View File

@@ -285,6 +285,12 @@ export interface InboxRow {
export type RefreshState = 'idle' | 'running' | string;
export interface RefreshResult {
/**
* `incremental` reads the newest pages of the plain list, `full` re-reads a
* whole window through the search index — only after a moved date picker or
* on the very first run.
*/
mode: 'incremental' | 'full';
pages: number;
seen: number;
stored: number;

View File

@@ -105,9 +105,10 @@ export default function NdaInbox({
useEffect(() => {
if (!refreshing && watchingRefresh.current && inbox?.last_refresh_result) {
watchingRefresh.current = false;
const { pages, seen, stored, legacy_stored: legacy } = inbox.last_refresh_result;
const { mode, pages, seen, stored, legacy_stored: legacy } = inbox.last_refresh_result;
setRefreshNotice(
`Refreshed: ${stored} request${stored === 1 ? '' : 's'} stored ` +
`Refreshed (${mode === 'full' ? 'full window' : 'newest first'}): ` +
`${stored} request${stored === 1 ? '' : 's'} stored ` +
`from ${seen} seen over ${pages} page${pages === 1 ? '' : 's'}` +
(legacy > 0 ? ` · ${legacy} in the pre-rename title format` : '') +
'.',