Files
jobtrackingapp/docs/redesign/phase-3/COMMANDS_NOTIFICATIONS_TASKS.md
T
2026-09-10 18:15:05 +02:00

60 lines
6.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Commands, notifications and tasks
ARC-12; PRES-E07–PRES-E09, PRES-J01–PRES-J04, PRES-J08, PRES-W04, PRES-W11, PRES-W12, PRES-M01–PRES-M06, PRES-S02–PRES-S04.
## Command palette
Extend [QuickCommandDialog](../../../job-tracker-ui/src/components/QuickCommandDialog.tsx), which already has six static commands and job/company search. NEW-02 expands it; no competing command platform.
| Group | Results / actions | Scope and implementation limit |
|---|---|---|
| Context | Open Match, tailor current CV, review current letter, interview prep | Only supported actions for current resource; opens existing review/action, never auto-applies |
| Navigate | Dashboard, Jobs, Discover, Follow-ups, Companies, Offers, Career Profile, CVs, Documents, Analytics, Correspondence, Settings | Existing pages first; new routes only after they have meaningful content |
| Find | Jobs, companies, CV names, supported document metadata | Owner-scoped reads, labelled entity kind; CV/library read reuse, document search awaits bounded projection |
| Create | Add/import job; create CV | Opens review/template/name flow; not a background POST or auto-generated content |
| Preferences | Light/dark/system, EN/Bokmål, density when implemented | Existing preference handlers and clear current selection; no new account identity |
| Administrative | Authorized page navigation | Server still gates every action; no reset/delete/run-maintenance shortcut |
Blank query shows a short useful command list, not every button in the product. Preserve current job/company result destinations and Add's no-write behavior. Context actions may rank ahead of generic navigation; don't hide ordinary manual commands when AI is unavailable.
Ctrl+K / Cmd+K and visible search button open the same modal. Focus goes to a **labelled** search input (placeholder alone insufficient). Arrow keys move among results, Enter activates, Home/End reach boundaries, Escape clears a nested scope or closes, Tab remains inside the modal. Do not intercept these keys while IME composition is active; don't steal unrelated editor shortcuts. When closing without navigation restore the trigger; after navigation focus destination heading.
Group headings/result count and loading/error/no-match states are announced. Existing search catches map errors to empty arrays; improve that deliberately during command migration, not with an assertion that current search distinguishes outage. Debounce, cancel stale results, cap result sets and never generate PDFs/AI during search. No private recent searches in localStorage. Clear query/results on close and identity change.
## Notification centre
Reuse NotificationsPopover, UserNotification read/unread/dismiss and operation links. Bell opens a recent list; optional /notifications is an expanded view of the same store. Show unread/all, clear timestamps, safe summaries, mark read and dismiss. Opening a link marks/read behavior must be explicit and must not execute the underlying job action.
| Event | Current source / availability | Planned behavior |
|---|---|---|
| Background work progress/success/failure | UserOperation + notifications exist | Link /operations or actual result; preserve retry/cancel identity and failure |
| Saved NAV search changes | Saved-search alert results exist | Retain existing alert/dismiss flow; unified centre producer only after end-to-end evidence |
| Job follow-up/deadline | Rules/reminders feed and email preference exist | Centre event producer/dedup needs verification/addition; don't equate reminder rows with stored notifications |
| Upcoming interview | No general scheduled interview resource | NEW-06 event data first; no inference from stage |
| Task due | Checklist has no due date | NEW-04 scheduling contract first |
| Document/application state | Existing workspace/artifact events | Link only persisted event/result; avoid one notification per keystroke/preview |
| System message | Existing operation/config failures where relevant | Actionable owner-safe messages, no infrastructure secrets |
Future producers need event identity/dedup, ownership, expiry/read behavior and navigation tests. Do not introduce a general event bus as a presentation task. Muting/hiding a notification is not completing a checklist item or deleting a job.
## Distinct lifecycles
- **Task:** actionable job checklist item; pending/done/dismissed, manual or system/auto-signal, persistent ID/order. Completing it changes task state. Due date/time/reminder and cross-job tasks view are new contracts, not already implemented.
- **Notification:** notice about a recorded event or work needing attention. Read/dismiss affects the notice only.
- **Calendar event:** scheduled time/date, provider identity and timezone; current job deadline/follow-up creation and ICS are existing features. It is not a generic task completion store.
- **Email:** external message with actual delivery, provider and consent constraints. Draft/edit/review/send/uncertain attempt remain distinct from notifications and manual correspondence logs.
Retain Google/Outlook writable-permission/status actions and ICS fallback from [ApplicationCalendarActions](../../../job-tracker-ui/src/components/ApplicationCalendarActions.tsx). Current kinds are follow-up and deadline; no general scheduled interview/calendar sync is proven. A future interview event needs date/time/timezone, explicit calendar link and duplicate-creation semantics. Calendar/timezone baseline defects keep their original owner; no event schema work here.
## Mail architecture and integrations
Transactional account/reminder email already has server SMTP configuration and admin test/settings. Gmail, Microsoft Graph and IMAP connection capabilities also exist, with differing read/send capabilities. Preserve those; the original brief's “choose an email provider” is a future deployment/product decision, not evidence that no email architecture exists.
Correspondence primary entry keeps inbox filters, read details/attachment metadata, provider compose/reply, persisted draft versions, explicit review/send, uncertain-delivery handling, thread import/link/unlink/move and review candidates. A note/pasted message does not send an email. Retry after unknown delivery must use the existing explicit attempt controls.
LinkedIn recruiter links or imported listing URLs are **not** a LinkedIn integration. No unsupported scraping, auto-apply or synchronization is planned. NAV remains the supported discovery mechanism; additional jobs/calendars/providers need explicit future contracts and authorization.
## Tests before migration
Command job/company/Add behavior, keyboard active result/focus, dirty navigation, account switch and stale result rejection; notification read/dismiss does not complete task; link to operation/job section survives aliases; task auto/manual/dismissed rules and keyboard ordering retained. Mail requires real sandbox delivery/reconnect/uncertainty evidence before changing provider flows; Phase 2 mocks are not provider certification.