feat(jobs): add dedicated workspace page
CI and Deploy / test (pull_request) Failing after 2m51s
CI and Deploy / deploy (pull_request) Has been skipped

Make /jobs/:id the canonical application workspace while preserving list state and compatibility links. Replace popup and expandable-row navigation with accessible whole-row routing and richer job details.
This commit is contained in:
cesnimda
2026-08-15 13:33:00 +02:00
parent 0dfaac18a1
commit 109745edb0
18 changed files with 310 additions and 266 deletions
+1
View File
@@ -193,3 +193,4 @@ Output was reduced to filenames and commit counts. The token artifact appears un
| V-159 | Focused overlay Jest; full `npm test -- --runInBand --forceExit`; `npm run build`; `git diff --check` | `job-tracker-ui` / repository root | Verify first JOBS-002 route-backed embedded-workspace increment | PASS — focused 2/2, full frontend 51 suites and 206/206 tests, and optimized production build/TypeScript pass. Row Open creates `/jobs?workspace={id}`, direct URLs and section URLs render, close/Forward preserve history and in-memory search, the dialog has an accessible name/focus trap, mobile uses full screen, and the full-page route remains linked | JSDOM/mocked API only. Existing Jest force-exit notice remains. URL persistence of complete filter/page state, dirty-edit guards, table redesign and real browser/production checks remain | First cohesive increment verified |
| V-160 | Focused overlay/workflow Jest; direct URL query hydration; full `npm test -- --runInBand --forceExit`; production build; diff review | `job-tracker-ui` | Verify JOBS-002 URL-owned list state without breaking workspace routes or workflow links | PASS — focused 2 suites and 6/6, full frontend 51 suites and 207/207, and optimized production build/TypeScript pass. Search survives overlay Back/Forward; direct URLs hydrate status/company/location/follow-up/readiness/deleted/sort/direction/page into the API request; company loading no longer produces a MUI out-of-range state | Existing Jest force-exit notice remains; browser refresh/history still to be exercised in Playwright | Local increment verified |
| V-161 | `UsersControllerTests`; focused theme/confirm/admin-users Jest; production frontend build; native-confirm search; `git diff --check` | Repository root / `job-tracker-ui` | Verify canonical theme persistence, semantic Alert contrast ownership, app-owned destructive dialogs and final-admin safety | PASS — backend 4/4; theme/confirm 8/8; admin UI 3/3; production build/TypeScript pass; no remaining `window.confirm` in frontend. Self-demotion cancel/confirm, other-admin warning, preserved roles and final-admin disabled/API conflict paths are covered | JSDOM/local mocks only; authenticated real-browser refresh and production remain | Repository safety increment verified |
| V-162 | Focused workspace/table/workflow Jest; `ApplicationWorkspaceTests`; production frontend build; standalone TypeScript audit; route/native-popup search | Repository root / `job-tracker-ui` | Verify canonical dedicated job workspace, whole-row navigation, independent controls, list-state return, contextual section routes and richer owner-scoped details | PASS — frontend 8/8 and backend 9/9; optimized build passes; direct `/jobs/:id`, section route, return state, missing job and control isolation pass. Standalone TypeScript found only pre-existing test-prop/target errors, with no new application-source error | JSDOM/InMemory backend only; browser widths/themes/refresh and production remain. Legacy dialog source retained for rollback but is no longer reachable from the list | Repository increment verified |
@@ -1,6 +1,6 @@
# JOBS-002 application table and workspace verification
Updated: 2026-08-10
Updated: 2026-08-15
## Confirmed baseline
@@ -9,25 +9,31 @@ Updated: 2026-08-10
- “Open application workspace” navigated to `/applications/:id`; its Back control always navigated to a fresh `/jobs`.
- The existing full-page workspace already composes the owner-scoped checklist, intelligence, CV, cover-letter, attachment, correspondence and interview components. It is reused rather than duplicated.
## Increment 1 — route-backed overlay
## Superseded overlay increment
- Table row Open now creates `/jobs?workspace={id}` and renders the existing workspace inside an accessible MUI dialog.
- Workspace sections update `section=` with replacement navigation; opening is a pushed entry, so Back closes and Forward reopens without losing the mounted list state.
- A direct `/jobs?workspace={id}&section={section}` opens the requested application and closes by safely removing only workspace query keys.
- MUI owns focus trap/restoration. The dialog is full-screen below 768px and links to `/applications/:id?section=...` as the full-page fallback.
- Legacy `?open=` quick-dialog links continue to work; their workspace action enters the same overlay route.
- The route-backed overlay was a verified intermediate design, but the user explicitly requested a dedicated page instead of a popup.
- DEC-068 supersedes DEC-065. No new navigation emits `?open=` or `?workspace=`.
## Increment 2 — canonical dedicated workspace
- `/jobs/:id` is the canonical workspace route; `/applications/:id` is a query-preserving compatibility redirect.
- The entire desktop row and mobile card navigate to the workspace. Buttons, links, checkboxes and menus remain independent controls; keyboard users can open a focused row with Enter or Space.
- Expandable detail rows and the legacy popup are removed from the applications-list flow. The table now prioritises company, role, location, status, applied date, elapsed days, deadline and optional source URL.
- The workspace aggregate now includes discovery date, full/translated advert text, language, tags, notes and available source/country provenance. Job Details renders these without overflowing and exposes the existing editor.
- Workflow, quick-command, correspondence and Gmail-review links route to the appropriate dedicated workspace section.
- Correspondence and Gmail Review are removed from primary sidebar navigation; the global inbox routes remain available for compatibility and genuinely global review work.
- Return navigation preserves the complete URL-owned list state, including when a workspace section changes.
## Verification
- Focused Jest: `src/application-workspace-overlay.test.tsx` — 2/2 pass.
- Full frontend Jest: 51 suites and 206/206 tests pass; existing force-exit notice remains.
- Production build and TypeScript: pass.
- Evidence: V-158 and V-159 in `docs/audits/verification-log.md`.
- Focused Jest: workspace/table and workflow routing — 8/8 pass.
- Focused backend workspace aggregate: 9/9 pass.
- Production build: pass. Standalone repository-wide `tsc --noEmit` still exposes pre-existing React Router test-prop and target errors; no new application-source error was reported.
- Evidence: V-158V-162 in `docs/audits/verification-log.md`.
## Remaining before completion
- URL-owned list state is implemented for search, status, company, location, follow-up, readiness, deleted visibility, sort/direction and page. Direct hydration and overlay Back/Forward pass focused tests; real-browser refresh/history remains.
- URL-owned list state is implemented for search, status, company, location, follow-up, readiness, deleted visibility, sort/direction and page. Direct hydration and dedicated-page return pass focused tests; real-browser refresh/history remains.
- Add a shared dirty-edit close/navigation guard for workspace sections that own unsaved content.
- Improve the table's scan-priority data without adding every available field.
- Add real-browser 375/768/1440, light/dark, keyboard/focus restoration, refresh/history, error and long-content evidence.
- Run tenant-authorization regressions and the production smoke gate.
+10
View File
@@ -669,3 +669,13 @@
- **Consequences:** the final administrator cannot be removed by supported API paths. A self-demotion remains possible only when another administrator exists and the user explicitly confirms.
- **User approval required:** No; this is requested safety hardening with no production mutation.
- **Reversible:** Revert the controller/UI change; no stored data or schema changed.
## DEC-068 — Make the job workspace a dedicated canonical page
- **Date:** 2026-08-15
- **Decision:** Supersede DEC-065. Route every job/application open action to `/jobs/:id`, keep `/applications/:id` only as a query-preserving compatibility redirect, and remove the legacy dialog/expandable-detail path from the applications table. Preserve the URL-owned list location in route state for the workspace return control.
- **Reason/evidence:** the user explicitly rejected the popup interaction and asked for a scalable application workspace. The existing workspace already composes the authoritative checklist, CV, cover-letter, documents, intelligence, timeline and correspondence domains, so the safe change is canonical routing and richer aggregate data rather than another implementation.
- **Alternatives considered:** retain the route-backed overlay; make a drawer; copy legacy dialog tools into a new page. These conflict with the requested dedicated-page model or duplicate domain ownership.
- **Consequences:** rows/cards and contextual shortcuts open one responsive workspace; internal row controls remain independent; list state survives return; old application links still resolve. The former quick dialog remains in source for rollback until broader regression proves it can be safely deleted.
- **User approval required:** No; explicitly requested.
- **Reversible:** Restore DEC-065 routing/list presentation; no schema or stored data changed.
+2 -2
View File
@@ -3,7 +3,7 @@
Updated: 2026-08-15
- **Overall programme status:** Active. Seven packages are locally verified; twenty-two packages through UX-003 are implemented with automated/runtime evidence but blocked from applicable live/provider/production gates; JOBS-002 is now in progress. Gitea run 609 passes the prior complete pull-request CI; DEP-001 awaits approved merge-to-main and production verification.
- **Current work package:** `JOBS-002` — dedicated application workspace and scan-friendly applications table (`IN PROGRESS`). URL-owned list state is pushed. The requested theme/admin safety increment is locally verified; dedicated `/jobs/:id` navigation is next.
- **Current work package:** `JOBS-002` — dedicated application workspace and scan-friendly applications table (`IN PROGRESS`). Canonical `/jobs/:id`, compact whole-row navigation, sidebar cleanup and richer job details are locally verified; notification popover and browser regression are next.
- **Completed work packages:** None are `DONE`; all repository security/AI packages still have applicable browser, provider and/or production gates.
- **Locally verified work:** SEC-001, SEC-002, SEC-003, SEC-005A, CORE-001, PROD-002 and DEP-001 (`VERIFIED LOCALLY`).
- **Implemented, verification incomplete:** SEC-004, SEC-005B, SEC-008, CORE-002, BG-001, OPS-001A/B/C, POL-001/002, AI-001/002/003/004, UX-001/002/003, QA-001, CAREER-001/002, MAIL-001 and JOBS-001 (`IMPLEMENTED — NOT VERIFIED`). UX-003 safe local/browser scope is implemented; production/native-device gates remain.
@@ -12,7 +12,7 @@ Updated: 2026-08-15
- **Deferred work:** None. Conditional multi-replica coordination, model deletion, realtime operation delivery and unrelated production changes remain outside current packages.
- **Next five work packages:** JOBS-002 applications/workspace; PRODUCT-001 homepage/Pro claims; VER-001 action matrix; production-blocked SEC-006/007 when package-index permission is available; REL-001 after prerequisites.
- **Status counts:** 7 `VERIFIED LOCALLY`; 22 `IMPLEMENTED — NOT VERIFIED`; 1 `IN PROGRESS`; 5 `NOT STARTED`; 5 `BLOCKED`; 0 `DONE`; 0 `DEFERRED`.
- **Test status:** backend baseline 631/631 plus admin safety 4/4; frontend baseline 51/51 suites and 207/207 plus theme/confirm/admin focused 11/11; Playwright 6/6; npm audit 0 vulnerabilities; production build passes. Historical JT-019 and Jest force-exit/open-handle behavior remain recorded.
- **Test status:** backend baseline 631/631 plus admin safety 4/4 and workspace 9/9; frontend baseline 51/51 suites and 207/207 plus theme/confirm/admin focused 11/11 and JOBS-002 focused 8/8; Playwright 6/6; npm audit 0 vulnerabilities; production build passes. Historical JT-019 and Jest force-exit/open-handle behavior remain recorded.
- **Deployment status:** Gitea pull-request run 609 passed the complete CI job in 4m20s. Deploy was intentionally skipped because the workflow deploys only a `push` to `main`; live remains unchanged. No merge/deployment was performed directly, no production migrations were run and the AI operation worker remains disabled by default.
- **Production status:** Unchanged and unverified. No provider/model call, model pull, external request or paid API occurred.
- **Known regressions:** None found by automated/local browser checks. Jest still needs `--forceExit` and reports its existing open-handle notice. Email-provider/send tests are fake/local only; real delivery is not claimed. Current MAIL browser evidence is 1280×720 only because the browser surface could not resize or perform native Tab traversal. Interrupted attempts are aged after 15 minutes and notified without retry; the five-minute scan is unmeasured on a large ledger. Direct clean EF-only SQLite migration still hits the pre-existing historical blank-chain defect before later migrations; normal startup owns reconciliation. Cross-feature monthly AI usage accounting remains a rollout gap.
+6 -6
View File
@@ -673,23 +673,23 @@ Ordering differences from the suggested list:
- **Commit:** `511a9f6` (honest provenance/import), `3f74b23` (result states/sort), `82f4526` (duplicate/browser/contrast regression and evidence).
- **Remaining work:** live NAV compatibility, native mobile assistive-technology and production smoke. Add source filtering only when more than one real source is available.
### JOBS-002 — Applications table and embedded workspace
### JOBS-002 — Applications table and dedicated workspace
- **Source programme:** Work Phase 11.
- **Original requirement references:** `work.md:562-634`.
- **Related findings:** JT-003, JT-004, JT-015, JT-021.
- **Priority:** P2.
- **Dependencies:** CORE-001/002, MAIL-001 embedding contract, AI-003 status.
- **Affected components:** applications table, filters/search/sort, route-backed drawer/modal/full-page fallback, workspace sections/focus/unsaved state.
- **Acceptance criteria:** scan-friendly priority columns; list context preserved; deep-link/back-forward/direct URL; accessible focus/close; mobile full-screen; no nested modal; full-page fallback.
- **Affected components:** applications table, filters/search/sort, canonical dedicated route, workspace sections/focus/unsaved state.
- **Acceptance criteria:** scan-friendly priority columns; list context preserved; deep-link/back-forward/direct URL; accessible focus/return; responsive dedicated page; no job-details popup.
- **Required tests:** route/history/filter persistence/focus/unsaved/direct link/mobile, tenant authorization.
- **Required browser verification:** three widths/themes/keyboard/back-forward/refresh/error/long data.
- **Required production verification:** existing application/workspace smoke.
- **Status:** `IN PROGRESS`.
- **Blocker:** none after dependencies.
- **Evidence:** V-158 execution-path inventory; V-159 first route-backed overlay tests/build; `docs/verification/jobs-002-application-workspace.md`.
- **Commit:** none.
- **Remaining work:** first overlay increment implemented: row Open is route-backed, direct/section URLs and Back/Forward work, MUI owns focus trapping/restoration, mobile is full-screen, and full-page fallback remains. Still required: persist complete list/filter/page state in the URL; guard dirty section edits; improve scan-priority columns/states; browser widths/themes/keyboard/history/error/long-data checks; authorization regression and production smoke. Do not place every field in table or duplicate workspace data.
- **Evidence:** V-158V-162; `docs/verification/jobs-002-application-workspace.md`.
- **Commit:** `bd5362c` (URL-owned list state); dedicated page commit pending.
- **Remaining work:** canonical `/jobs/:id`, row/card navigation, compact priority columns, richer job details, contextual links and sidebar cleanup are implemented. Still required: dirty-edit navigation guard where section editors lack one; notification popover; browser widths/themes/keyboard/history/error/long-data checks; authorization regression and production smoke. Do not place every field in the table or duplicate workspace data.
### UX-003 — Kanban theme-state correction
+7 -7
View File
@@ -2,17 +2,17 @@
Updated: 2026-08-15
- **Exact current task:** continue the 2026-08-15 application UX programme; next implement dedicated `/jobs/:id` workspace/list/sidebar/notification changes after the completed theme/admin safety increment.
- **Last completed step:** pushed `bd5362c`; then V-161 canonical theme, Alert contrast, app-owned CV confirmations and final-admin protection passed focused tests/build and awaits the next logical commit.
- **Files currently modified:** theme/bootstrap/tests, admin API/UI/tests/translations, CV dialog use, UX verification/tracking documents.
- **Commands already run:** V-160 focused/build and push; V-161 backend 4/4, theme/confirm 8/8, admin UI 3/3, production frontend build and patch/native-confirm review.
- **Test results:** backend baseline 631/631 plus focused admin 4/4; frontend baseline 207/207 plus focused V-161 11/11; production build passes. Jest retains its known force-exit/open-handle notice.
- **Exact current task:** continue JOBS-002; implement the top notification popover, then complete browser regression for the dedicated application workspace.
- **Last completed step:** canonical `/jobs/:id`, compact whole-row navigation, richer job details, route compatibility, contextual workflow links and sidebar cleanup passed focused tests.
- **Files currently modified:** JOBS-002 API aggregate, workspace/list/routes/tests and tracking documents.
- **Commands already run:** workspace/table/workflow Jest 8/8; ApplicationWorkspace backend 9/9; production frontend build; standalone `tsc --noEmit` baseline audit.
- **Test results:** focused JOBS frontend 8/8 and backend 9/9; production build passes. Repository-wide standalone TypeScript still reports pre-existing React Router test `future` props, one Testing Library option and ES target errors; application source added no error.
- **Services currently running:** none on task-owned ports 3000/5202. Playwright stopped its disposable API/Next servers. Pre-existing Docker services were not changed.
- **Temporary files or processes:** no task-owned process is running and the failed disposable migration database was removed. Existing synthetic browser evidence/account and startup-created local backup remain documented. No provider account, real email, private content, paid service or production service was accessed.
- **Production changes currently active:** none. No deployment, migration, provider connection/sync/send or production payload occurred.
- **Rollback status:** downgrade `20260810080858_AddEmailDraftClientRequestId`, then `20260810075206_AddEmailDrafts`, before reverting draft commits; then follow the existing MAIL rollback order (`ee5ef7e`, `449faeb`, `123fc55`/`e9937ac`, ledger downgrade before `653f011`). No production migration/deploy/provider grant occurred.
- **Uncommitted changes:** V-161 theme/admin/dialog safety and tracking; no dependency/schema/config change.
- **Uncommitted changes:** V-162 dedicated job workspace/list/sidebar increment and tracking; no dependency/schema/config change.
- **Known failures:** live deployment is not verified because PR deploy is intentionally skipped and the active branch is not approved for merge. Draft export/API/UI, full thread/category actions and non-Gmail review remain; existing accounts need re-consent and IMAP stays read-only. A clean full-chain SQLite apply fails in the pre-existing JT-019 migration before the new draft migration. Browser/provider/MariaDB/production unavailable or unverified; recovery scan performance is unmeasured at large ledger scale; Jest open handles; SEC-006 parser dependency work is still separately gated; parser isolation remains SEC-007.
- **Exact next action:** commit/push V-161; replace the route-backed job popup with the dedicated workspace while preserving working job actions and URL-owned list state.
- **Exact next action:** commit/push V-162; add the bell notification popover without removing the Operations page.
- **Work that can continue independently:** JOBS-002, PRODUCT-001 and VER-001. UX/JOBS production, MAIL provider mutations, SEC-006/007 and PROD packages retain their recorded external gates.
- **Decisions still required from the user:** none for synthetic/code-inspected repository work. Any provider connection or send test, internet/package upgrades, private data, external/paid providers and production actions retain explicit approval/safety gates; SEC-009 retention/legal policy remains unresolved.