Interview parent state lifetime
17 November 2026; final revalidation 18 November 2026. Development checkpoint based on A3 eb253877, branch codex/interview-parent-lifetime. Scope is the interview-preparation and follow-up parent components and their unit tests. No runtime locale expansion, model/service calls, schema changes, production work or approval changes.
Reproduced defects and fix
On unchanged baseline, deferred reads for application 7 were completed after rendering application 8. Seven regression cases failed: previous prep content replaced the current board; previous follow-up data overwrote a current draft; stale errors appeared in either current surface; stale finalisers dismissed either current loading state; and parent drafts/data survived the application boundary, causing a failed new follow-up read to expose old editable data instead of a GET-only retry.
A second pre-fix run added three cases: an older same-application refresh replaced a newer board, and a late prep addition cleared the new application's title draft and initiated a previous-application reload (both failed); a late follow-up write already retained its original API target (positive control passed). Thus nine expected failing regressions and one passing control were observed before editing production code; overlapping reruns are not additional unique tests.
The exported prep/follow-up components now render a job-keyed private workspace, following the existing keyed interview-assistant ownership pattern. Changing job unmounts its board, drafts, error and busy state together. A per-workspace active flag and read sequence guard read success/error/finally, and prevent an unmounted workspace from starting a refresh after an existing write completes. Only the newest read can update a mounted owner. Explicit writes retain their original closure/API target; no write is cancelled, migrated to another application or retried automatically. Same-application language changes keep the same workspace and its drafts.
Two additional same-application controls exercise stale errors and stale finalisers while a newer refresh remains pending. Existing rerender tests now await remount reads inside act, avoiding React test warnings caused by unawaited new parent workspaces. No test suppresses console output.
Verification
Commands from job-tracker-ui:
rtk proxy node node_modules/jest/bin/jest.js --runInBand --runTestsByPath src/interview-prep.test.tsx --cacheDirectory='../.test-cache'
rtk proxy node node_modules/typescript/bin/tsc --noEmit --incremental false
rtk proxy node node_modules/eslint/bin/eslint.js src/components/InterviewPrep.tsx src/interview-prep.test.tsx --max-warnings=0
- Final focused jsdom suite: 63/63 passed, no snapshots, no React warnings. This includes 12 added cases and the existing 51; prior focused runs are not added to that total.
- Native runner receipt: jest-results.json, produced with
--json --outputFile='../docs/validation/interview-parent-lifetime/jest-results.json'added to the command above. Final revalidation passed 63/63 with zero failed/pending tests and 23.206 seconds reported by the runner. This is a repeat of the same source-bound cases, not an additional 63 distinct tests. - Full UI TypeScript check: passed, exit 0.
- Scoped lint: passed, exit 0, zero warnings. An earlier cleanup-ref lint warning was fixed by checking the active flag on completion instead of mutating the read ref during cleanup.
rtk git diff --check: passed.- Graph-first query used the existing isolated A3 research graph before source inspection.
rtk proxy graphify update .performed AST-only extraction in this new worktree, without API/model calls or shared graph mutation. The initial refresh created 19,835 nodes and 48,044 edges; an incremental refresh followed the final source/test edits. Generated graph output is local untracked research material, not a new runtime dependency. Graph reported missing optional PDF/SQL extraction dependencies and unsupported/no-symbol files; this is structural orientation, not full runtime or document analysis.
Existing dependencies were accessed read-only through a directory junction to E:/Storage/Projects/Active/temp docs/jobjakt-local-build/next-security-patch/job-tracker-ui/node_modules. No install/build/browser lane ran.
Validated working-file SHA-256:
| File | SHA-256 |
|---|---|
job-tracker-ui/src/components/InterviewPrep.tsx |
57d208df5880d8b93c9a3acf13e7b11d2791f4a9d3fdf55da56debe68c3145ee |
job-tracker-ui/src/interview-prep.test.tsx |
82c36af6225d4fb00fb689bf7243ef2163b6abc237c91a7058f283c173d34471 |
Limits and integration
Browser/native/device, broader repository suites, hosted CI, backend/database, live AI, provider and production checks were not run. Root owns source-bound browser qualification, integration/publication and central tracking. This checkpoint does not grant release or roadmap-stage approval.
Adjacent existing behaviour remains: ordinary same-application board refresh hides/remounts row editors through Shell's loading condition; preserving row-local unsaved answers during every ordinary refresh needs a separate behavioural decision and test package. This fix prevents superseded reads from replacing the newest board/draft state; it does not redesign refresh presentation or persistence. Pending writes may still finish on the original application after navigation, as explicitly initiated by the user.