Editable stage history, auto-ghosting, and an Add-form fix

Stage history editor:
- The edit form's Pipeline section is now the application's history:
  one row per step (stage + date), Add Step and Remove Step, kept in
  date order. The last step is the current stage and the first step's
  date the date applied, replacing the separate Stage and Date Applied
  fields. An application logged after the fact (applied, interviewed,
  rejected) keeps its whole path.
- JobsDatabase::replaceStageHistory() rewrites a job's history in one
  transaction (sorted, repeats collapsed, stage and date applied kept in
  step); StageHistoryModel backs the section; JobsModel::addJob() now
  returns the new id so a new application's history can be saved.
- `kareer history <id> [Stage=YYYY-MM-DD ...]` shows or replaces it.

Auto-ghosting:
- Applications still at Applied with no activity (the later of the
  date applied and the last stage change) for more than 30 days move to
  Ghosted, recorded like any stage change. Runs at startup for GUI and
  CLI, after switching databases, and shortly after the setting changes.
- Preferences gains an Applications section: on/off and the number of
  days (kareerrc [AutoGhost]). The GUI shows a passive notification; the
  CLI notes it on stderr so --json output stays clean.

Fixes:
- The Add Application form pre-filled empty text fields with the word
  "undefined" (typing "a" gave "undefineda"): fields with no value
  reached QML as undefined. Every field now gets a typed default.
- Embed the app icon as the window icon fallback, so the window and
  About page show it when running uninstalled.

Tests: history replacement and the after-the-fact Allstate case, the
ghosting rules (fresh/stale/logged-late/reopened/threshold), and empty
new-form fields.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxDf7HqD1xPnsZP8wt3NTk
This commit is contained in:
2026-09-11 17:00:45 -05:00
co-authored by Claude Opus 5
parent 289246a6d0
commit eb47a589cb
24 changed files with 1106 additions and 32 deletions
+18 -4
View File
@@ -15,12 +15,18 @@ applications without ever opening a window.
salary expectation, notes, contact, and the date applied
- A fixed pipeline of stages (Applied, Screening, Interview, Onsite,
Offer, Accepted, Rejected, Withdrawn, Ghosted) with full history of
every transition
every transition. The history is editable, with a date per step, so an
application you log after the fact (applied, interviewed, rejected)
keeps its whole path
- A Sankey diagram of the whole pipeline, showing where applications
progress and where they drop off
- Dashboard summary stats: total applications, active count, offers,
response rate
- A full CLI (`kareer add|list|show|update|stage|delete|stats|stages`)
- Applications with no response are marked Ghosted automatically:
anything still at Applied with no activity for 30 days (adjustable, or
off, under Preferences). The move is recorded in its history like any
other, and the CLI notes it on stderr so `--json` output stays clean.
- A full CLI (`kareer add|list|show|update|stage|history|delete|stats|stages`)
for scripting
## Command line usage
@@ -49,6 +55,10 @@ kareer show 1
kareer update 1 --salary-max 175000
kareer stage 1 Interview
# Show or rewrite an application's stage history, one Stage=date per step
kareer history 1
kareer history 1 Applied=2026-08-01 Interview=2026-08-15 Rejected=2026-08-20
# Delete (requires --yes to actually happen)
kareer delete 1 --yes
@@ -169,10 +179,14 @@ Run the tests with `ctest --test-dir build`.
draws what this hands back.
- `jobfieldcatalog.{h,cpp}` - the static catalog of edit-form fields and categories.
- `jobeditmodel.{h,cpp}` - `QAbstractListModel`-backed edit-form state, built from the field catalog.
- `stagehistorymodel.{h,cpp}` - the editable stage history shown in the edit form's Pipeline section.
- `clicommands.{h,cpp}` - the `add`/`list`/`show`/`update`/`stage`/
`delete`/`stats`/`stages` subcommands.
`history`/`delete`/`stats`/`stages` subcommands.
- `appcolorscheme.{h,cpp}` - QML-facing wrapper around `KColorSchemeManager` for the Preferences page.
- `databaselocation.{h,cpp}` - where the database lives: the first-run choice and the Preferences Database section.
- `autoghost.{h,cpp}` - marks applications with no response as Ghosted, and its Preferences setting.
- `qml/` - Kirigami UI: `ApplicationsPage` (list + search),
`ApplicationEditPage` (add/edit/delete form), `DashboardPage`
(stat cards + pipeline), `SankeyDiagram` (the renderer),
`SettingsPage` (the Preferences page).
`SettingsPage` (the Preferences page), `DatabaseSetupDialog`
(the first-run database choice).