No description
Find a file
Cursor Agent e260a4ed00 feat(config): surface auto-detected roles in the ⚙ Config modal
The per-column Role dropdown only ever showed an explicit fileCfg
override — a column literally named 'Status' (or Category/Notes/Image/
Anki-front by their own name lists) already drives getStatusCol() etc.
at render time by name, but the modal showed '— no special role —' for
it with nothing to indicate that. This was the exact confusion behind
a user question: 'what corresponds to the checkmark in the file?' —
the Status role does, but for a conventionally-named column there was
no visual confirmation it was already active.

- Extracted the Category/Status/Notes column name-alias lists (already
  duplicated between main.ts and inline-view.ts) into shared constants
  in src/utils.ts, and split ankiFrontCol's fallback chain out into an
  exported autoAnkiFrontCol() in src/view/anki.ts. Both were already
  pure name/position lookups; this just makes them independently
  callable without an explicit override applied.
- FileConfigModal now takes an AutoDetectedRoles snapshot (computed
  once in toolbar.ts's openColumns(), the same lists/functions the
  views themselves use) and roleOf() shows the resolved role plus an
  'auto (by name)' badge whenever nothing is explicitly configured for
  that slot — exactly mirroring the fact that explicit overrides always
  win outright over name detection at runtime (never blended).

Tests: two new FileConfigModal cases — a name-matched column shows its
role with the auto badge and no saved config, and an explicit override
on a different column suppresses the badge everywhere for that role,
matching what getStatusCol()/etc. actually resolve.

Co-authored-by: SVM0N <SVM0N@users.noreply.github.com>
2026-07-06 08:47:14 +00:00
src feat(config): surface auto-detected roles in the ⚙ Config modal 2026-07-06 08:47:14 +00:00
test-support fix(add-entry): exclude title/index column from categorical dropdown detection 2026-07-06 07:19:14 +00:00
bench-load.mjs SWITCH TO CSV AS MAIN: retire XLSX, drop SheetJS, simplify save path 2026-05-24 07:23:02 +00:00
esbuild.config.mjs feat(mobile+ui): kanban slim, table-lag cuts, modal keyboard fix, search collapse 2026-05-24 20:43:32 +00:00
main.js feat(config): surface auto-detected roles in the ⚙ Config modal 2026-07-06 08:47:14 +00:00
main.ts feat(config): surface auto-detected roles in the ⚙ Config modal 2026-07-06 08:47:14 +00:00
styles.css feat(config): surface auto-detected roles in the ⚙ Config modal 2026-07-06 08:47:14 +00:00
test-csv-parser.mjs SWITCH TO CSV AS MAIN: retire XLSX, drop SheetJS, simplify save path 2026-05-24 07:23:02 +00:00
test-plugin-logic.mjs feat: project-tag notes, Anki sync, file-template commands, Tasks refinements 2026-06-15 16:47:28 +00:00
test-view-smoke.mjs feat(config): surface auto-detected roles in the ⚙ Config modal 2026-07-06 08:47:14 +00:00
world-map.svg feat(travel): world-map view, residency gauges, editable trips, modal UX 2026-06-06 14:08:10 +00:00