Skip to content

Ask 18 settings questions instead of 29 - #18

Merged
MartinForReal merged 1 commit into
mainfrom
feat/settings-consolidation
Aug 5, 2026
Merged

MartinForReal merged 1 commit into
mainfrom
feat/settings-consolidation

Conversation

@MartinForReal

Copy link
Copy Markdown
Owner

Closes #17.

Several settings turned out to be one question split across several controls, and one pair the code could not even tell apart.

What merged

New row Replaces Options
On save Live check on save / open, Fix format issues on save Do nothing / Check the note / Check and fix
Incomplete index.md Auto-generate index.md, Generate index.md on startup, Report index gaps Ignore / Report in the vault scan / Write it as notes change / Write it as notes change, and at startup
Warn about missing fields Warn on missing recommended fields, Warn on missing tags comma-separated: title, description, generated, tags
Portent Checks four Validate … toggles comma-separated: type, lifecycle, belongs_to, related_to
Portent Field name overrides five field-name text boxes status=state, belongs_to=parent

Two of these fix real defects rather than only tidying the tab:

  • "Live check on save / open" never gated "open". Opening a note was always validated unconditionally — only the save path was ever gated. The name, the setting's own description, and the README all claimed a control the code didn't have. Open-time checking has to stay on: the report pane's active-note section reads that verdict and would otherwise go stale behind a tab. The row is now named On save, and the always-on open-time check is stated.
  • "Generate index.md on startup" did nothing with auto-generation off. It was only ever read as autoGenerateIndex && generateIndexOnStartup, so it was a rung of a ladder presented as an independent toggle.

What stayed separate

Rebuild existing index.md and Subdirectory description section stay independent rows, and stay live in every index mode — including Ignore — because both Generate/refresh index.md commands write regardless of the mode. Greying them out would hide two live controls, one of them destructive.

Storage

Four of the five merges are presentation-only: the merged control reads and writes the same underlying booleans, so nothing in an existing data.json needs migrating.

Warn about missing fields is the exception. A per-field list cannot be backed by the old two booleans, so it is a new stored field, and loadSettings() derives it once for a vault saved before the change: warnRecommendedFields !== false contributes title, description, generated, and warnTagsField === true adds tags. (I said in issue #17 that the whole consolidation was presentation-only; that was wrong for this one row.)

The one combination no longer expressible is generating indexes and reporting gaps, which now reads as generating. With generation on there is rarely a gap left to find.

Loading also now copies only keys that still exist in the defaults, so three settings that had no effect — warnBrokenLinks (no read sites anywhere), checkReservedFiles, and promptVersionBumpOnMigrate (both long gone from the source) — stop being written back into data.json on every save and age out of the vault.

Verification

No test framework in this repo, so: a throwaway harness drives the real settingSpecs() through a fake Setting, and the real onload() against a stub app.

  • 48 assertions pass, covering the row count, every merged control's read-and-write round trip, each legacy-vault migration path, the unreachable-combination collapse, and the dead-key drop.
  • Proven discriminating: the same harness against origin/main gives 6 passed, 14 failed.
  • The report-pane harness from Report index gaps instead of writing them (#15) #16 still gives 41 passed, 0 failed — no regression.
  • tsc --noEmit clean; main.js rebuilt from the committed sources.

🤖 Generated with Claude Code

Several settings turned out to be one question split across several
controls, and one pair the code could not even tell apart.

On save replaces "Live check on save / open" and "Fix format issues on
save": both gated the same handler, so it was always a ladder — do
nothing, check, check and fix — rather than two independent axes. The
old name also promised something it never had: opening a note was
always validated unconditionally, and it must be, because the report
pane's active-note section reads that verdict and would otherwise go
stale behind a tab.

Incomplete index.md replaces "Auto-generate index.md", "Generate
index.md on startup", and "Report index gaps". Writing and reporting
are answers to one question — what to do about a folder whose listing
is missing — which the old layout left the reader to work out. And
"Generate index.md on startup" did nothing at all with auto-generation
off: it was only ever read as autoGenerateIndex && generateIndexOnStartup.

Warn about missing fields replaces two toggles and is now per field, so
a vault names what it wants warned about instead of answering the same
judgment four times. This one needs storage: the field list can't be
derived from the old pair, so loadSettings maps a saved vault forward.

Portent's four check toggles and five field-name boxes become one row
each.

Rebuild existing index.md and Subdirectory description section stay
independent, and stay live in every index mode, because both
Generate/refresh index.md commands write regardless of the mode —
greying them out would hide two live controls, one of them destructive.

Loading now copies only keys that still exist, so warnBrokenLinks (which
had no read sites anywhere), checkReservedFiles, and
promptVersionBumpOnMigrate stop being written back into data.json on
every save and age out of the vault.

Closes #17

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MartinForReal
MartinForReal merged commit ae7f3eb into main Aug 5, 2026
1 check passed
@MartinForReal
MartinForReal deleted the feat/settings-consolidation branch August 5, 2026 09:20
@MartinForReal MartinForReal mentioned this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate the settings tab: 29 rows to 18, and three dead fields

1 participant