diff --git a/docs/ui-modernisation/GMAIL_REFRESH_LIFETIME.md b/docs/ui-modernisation/GMAIL_REFRESH_LIFETIME.md new file mode 100644 index 00000000..7953794f --- /dev/null +++ b/docs/ui-modernisation/GMAIL_REFRESH_LIFETIME.md @@ -0,0 +1,11 @@ +# Linked Gmail refresh completion lifetime + +16 November 2026. Source `207aba1a`, based on `64ac7e53`, branch `codex/a3-ui-10`. + +An automatic linked-thread refresh could finish after leaving correspondence and start another Gmail-status read. A manual failure could notify a different workflow; a manual success used the language captured before the request. Three deterministic deferred fixtures reproduced these failures while keeping the outer toast provider mounted. + +Refresh now checks the existing active job/generation before starting and after each awaited POST/read, suppresses obsolete completion/feedback and uses the existing translation ref. New job setup clears obsolete refresh history/loading. Already accepted server work is not cancelled or rolled back. Existing auto/manual behaviour, payloads, provider consent, linked identifiers, singular/plural copy and current-job refresh paths remain. + +PASSED:84 distinct cases across five suites (Gmail20, recovery20, inbox41, trust-loop1, search-context2), TypeScript, scoped lint and whitespace diff check. Earlier81 overlaps84; these are three additional regressions, not165 cases. AST graph update receipt retained. No new export build or native browser/provider access: the preceding source's standard build exited1 at the Next security warning; its qualification is still open. No physical PDF, real mail, integrated security or final roadmap acceptance. + +Source, canonical receipt and exact native gzip bindings are under [gmail-refresh-lifetime](evidence/gmail-refresh-lifetime/SOURCE_RECEIPTS.json). Remaining message/thread import, relink/unlink, disconnect, confirmed deletion and standalone status/choice read completion paths are independent work; this package does not claim them fixed. Broader real-job switching, native accessibility and final A3/release gates remain open. diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/SOURCE_RECEIPTS.json b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/SOURCE_RECEIPTS.json new file mode 100644 index 00000000..2e8c204f --- /dev/null +++ b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/SOURCE_RECEIPTS.json @@ -0,0 +1,55 @@ +{ + "sourceCommit": "207aba1a27a6c369305223c48a5122ada2df015f", + "sourcesLfSha256": { + "job-tracker-ui/src/components/Correspondence.tsx": "f26cefe9136380371030ce837466fd23d345fd72d0d2ee10491eaf3a9231f285", + "job-tracker-ui/src/correspondence-gmail-import.test.tsx": "4a43a817b446b428adc90905f774231d762c10528b6338537e859de75699e48e", + "job-tracker-ui/src/types.ts": "bae01df8de079b16546fca1c738f6d49564befcf62ae0449b039faf61bff1158", + "job-tracker-ui/src/i18n/translations.ts": "1bef579f8bb593ed3a888780e9d3472531f93b5602a6e92d9df8fa062060c1e9" + }, + "evidenceLfSha256": { + "gmail-refresh-red.txt": "18a343344ddc8423e3003c3e2dfc305e1594733ec65c8322f1a62eaa15c53dc3", + "gmail-refresh-green.txt": "59e6cdd89b5ed91d9d728fb929e4c9acb36d01ec16ae2cbbc2b625f7c4d65ca7", + "gmail-refresh-results.json": "574d68ad0e726be9ce51078fa6e36ce3c84477f9ef70a60591519e25fb67eda3", + "gmail-refresh-types.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "gmail-refresh-lint.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "gmail-refresh-graph.txt": "b6fba5c5b39b8be6903cd5ff51f21b3bb156208aea9b4bc230f6168f831864c4" + }, + "nativeReceipts": [ + { + "path": "gmail-refresh-red.txt", + "gzipPath": "gmail-refresh-red.txt.gz", + "rawSha256": "9541b333bcd091cbf8620ffbd9f92dfa33fad3db3043a8a87bb33e55bbbe684e", + "gzipSha256": "efc01ccd0ec99cd70171fee9f37df8ade1c68beafbccb3e264ca6613a2f4a232" + }, + { + "path": "gmail-refresh-green.txt", + "gzipPath": "gmail-refresh-green.txt.gz", + "rawSha256": "7ac573fd361379527d4a178faa1ebfb5a3c5d64fc547ace957d009a3457cbf1c", + "gzipSha256": "72a4148f3081837ddf482fddcbc404f8edf9a305aa2956d77d5d4eda4b647da7" + }, + { + "path": "gmail-refresh-results.json", + "gzipPath": "gmail-refresh-results.json.gz", + "rawSha256": "574d68ad0e726be9ce51078fa6e36ce3c84477f9ef70a60591519e25fb67eda3", + "gzipSha256": "6d32608256340bd8ff829036c4ed81310c972f221d64d5bd0bc1850d5ba4693c" + }, + { + "path": "gmail-refresh-types.txt", + "gzipPath": "gmail-refresh-types.txt.gz", + "rawSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "gzipSha256": "46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e" + }, + { + "path": "gmail-refresh-lint.txt", + "gzipPath": "gmail-refresh-lint.txt.gz", + "rawSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "gzipSha256": "46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e" + }, + { + "path": "gmail-refresh-graph.txt", + "gzipPath": "gmail-refresh-graph.txt.gz", + "rawSha256": "64beb47f84f657862bfb44d9f1059edeb09f7c4ec76b0157ad4df038969a434d", + "gzipSha256": "eba08c2094d7d04fe719e35a2ae296485fa105fd1f0a3a07e48f9cdc66c46c98" + } + ] +} diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-graph.txt b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-graph.txt new file mode 100644 index 00000000..e122ec1c --- /dev/null +++ b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-graph.txt @@ -0,0 +1,18 @@ +Re-extracting code files in . (no LLM needed)... +[graphify watch] 470 file(s) not classified (no supported extension or shebang), skipped: .dockerignore, .env.example, .git, .gitattributes, .gitignore, 1440-en-dark-converted.gz (+464 more) + AST cache: 2480/2927 files served from cache (84%); 447 to extract + AST extraction: 100/447 uncached files (22%) [16 workers] + AST extraction: 200/447 uncached files (44%) [16 workers] + AST extraction: 300/447 uncached files (67%) [16 workers] + AST extraction: 400/447 uncached files (89%) [16 workers] + AST extraction: 447/447 uncached files (100%) [16 workers] + warning: 8 .sql file(s) contributed nothing to the graph because a dependency is missing: tree_sitter_sql not installed. Install it with: pip install "graphifyy[sql]" (#1745) + warning: 144 code file(s) yielded no symbols (0.14 MB) — a data file, or source this extractor models no symbols for: JobTrackerApi.Tests/PdfBrowserStub/Program.cs, JobTrackerApi/Program.cs, JobTrackerApi/Properties/AssemblyInfo.cs, browser-extension/tests/capture-url.test.mjs, docs/audits/2026-09-07/validation/evidence/b05-excel-probe.ps1 (+139 more) +[graphify watch] community set changed since labeling (0 saved labels, 1164 communities now; renamed 120 community(ies) by their hub). Run `graphify label` to refresh names with the LLM. +Graph has 19234 nodes (above 5000 limit). Building aggregated community view... +graph.html written (aggregated: 1164 community nodes, 3006 cross-community edges) +Tip: run with --obsidian for full node-level detail. +[graphify watch] Rebuilt: 19234 nodes, 47286 edges, 1164 communities +[graphify watch] graph.json, graph.html and GRAPH_REPORT.md updated in graphify-out +Code graph updated. For doc/paper/image changes run /graphify --update in your AI assistant. +Tip: set GEMINI_API_KEY or GOOGLE_API_KEY to use Gemini for semantic extraction. diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-graph.txt.gz b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-graph.txt.gz new file mode 100644 index 00000000..23a71e45 Binary files /dev/null and b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-graph.txt.gz differ diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-green.txt b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-green.txt new file mode 100644 index 00000000..ba779ce6 --- /dev/null +++ b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-green.txt @@ -0,0 +1,7 @@ + +Test Suites: 5 passed, 5 total +Tests: 84 passed, 84 total +Snapshots: 0 total +Time: 42.658 s +Ran all test suites matching src/correspondence-gmail-import.test.tsx|src/correspondence-recovery.test.tsx|src/correspondence-inbox-page.test.tsx|src/end-to-end-trust-loop.test.tsx|src/correspondence-search-context.test.ts. +Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\gmail-refresh-results.json diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-green.txt.gz b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-green.txt.gz new file mode 100644 index 00000000..185e2b5f Binary files /dev/null and b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-green.txt.gz differ diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-lint.txt b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-lint.txt new file mode 100644 index 00000000..e69de29b diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-lint.txt.gz b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-lint.txt.gz new file mode 100644 index 00000000..ae211a2c Binary files /dev/null and b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-lint.txt.gz differ diff --git a/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-red.txt b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-red.txt new file mode 100644 index 00000000..7dff4444 --- /dev/null +++ b/docs/ui-modernisation/evidence/gmail-refresh-lifetime/gmail-refresh-red.txt @@ -0,0 +1,201 @@ +FAIL src/correspondence-gmail-import.test.tsx (8.128 s) + ● correspondence Gmail import › linked refresh completion lifetime › an automatic refresh finishing after leaving cannot start follow-up reads + + expect(jest.fn()).toHaveBeenCalledTimes(expected) + + Expected number of calls: 2 + Received number of calls: 3 + + 365 | const reads = mockedApi.get.mock.calls.length; + 366 | await act(async () => { write.resolve({ data: { ...refreshed, imported: 1 } }); }); + > 367 | expect(mockedApi.get).toHaveBeenCalledTimes(reads); + | ^ + 368 | expect(screen.queryByRole('alert')).not.toBeInTheDocument(); + 369 | }); + 370 | + + at Object.toHaveBeenCalledTimes (src/correspondence-gmail-import.test.tsx:367:29) + + ● correspondence Gmail import › linked refresh completion lifetime › manual refresh feedback respects a leave boundary + + expect(element).not.toBeInTheDocument() + + expected document not to contain element, found
Failed to refresh linked Gmail threads.
instead + + 386 | view.rerender(dialog(42, false)); + 387 | await act(async () => { write.reject(new Error('obsolete refresh failure')); }); + > 388 | expect(screen.queryByText(translations.en.correspondenceRefreshLinkedFailed)).not.toBeInTheDocument(); + | ^ + 389 | } else { + 390 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: 'nb' })); }); + 391 | await act(async () => { write.resolve({ data: refreshed }); }); + + at toBeInTheDocument (src/correspondence-gmail-import.test.tsx:388:91) + + ● correspondence Gmail import › linked refresh completion lifetime › manual refresh feedback respects a language boundary + + Unable to find an element with the text: Tilknyttede Gmail-tråder er allerede oppdatert.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. + + Ignored nodes: comments, script, style + +