Repository navigation
Move app behaviour to the TaskNotes settings record (tasknotes.task rc.6) - #2432
Merged
callumalpass merged 7 commits intoOct 27, 2026
Merged
Conversation
tasknotes.task 0.3.0-rc.6 removes app behaviour from the type binding. TaskNotes now keeps it in _settings/dev.tasknotes.md (app dev.tasknotes, scope collection, settings_version 1), a tasknotes-settings record that implements mdbase.app-settings 1.0.0 and tasknotes.settings 1.0.0: NLP triggers, templating, archive moves, time-tracking auto-stop, recurrence checkbox reset, link write format, and per-status next status, cycle exclusion and auto-archive. - Consume @tasknotes/model 0.3.0-rc.20 from vendor/ (unpublished) and the mdbase-contracts tasknotes.task 0.3.0-rc.19 pack. - Upgrade rc.3 and rc.5 types to rc.6 and write the record in the same journalled, rollback-capable metadata transaction; v4 migrations write it from data.json. Creation is create-if-absent; an existing record only gains absent fields. Seed the settings contracts, schemas and type when absent. - Read precedence: record, then the earlier binding, then local settings. Sync later changes both ways with a conflict prompt; respect read-only (newer settings_version) records. - Recovery allowlists accept the versioned contract and settings files. Fix the v0.2 contracts_folder derivation for versioned contract paths, and treat rc.5 types as current when setting aside beta duplicates.
This was referenced Oct 27, 2026
Merged
The v0.2 migration wrote the settings record but left the session's first-sight flag unset, so the first save took the add-absent-fields branch, remembered the new values as applied and never patched the fields the record already held. The first-sight branch now also writes local changes, and the migration marks the record as merged.
A sync conflict copy, or any other _settings/ file with app: dev.tasknotes and scope: collection, was ignored without a word. TaskNotes now names those files in a notice and keeps using _settings/dev.tasknotes.md; the other files are not changed.
generateLink delegated Markdown links to Obsidian's generateMarkdownLink, which follows the global wikilink preference, so the project picker, dependencies and other relationship writes could produce wikilinks with the TaskNotes setting on Markdown. It now builds a Markdown link when Obsidian returns a wikilink. Projects from natural-language input (task modal, inline convert, API/MCP/CLI), the parent-note project default and the Bases current-file default now use the same setting.
Rollback and startup recovery restored only files that existed before, leaving new contracts, schemas, the settings type, the settings record and abandoned *.tasknotes-stage-* files behind. Both the v0.2 migration journal and the metadata transaction now remove a file they created while it still holds exactly the bytes written, keep any file edited since, and clean staging files beside journaled paths that no pending swap journal owns. This reverses the earlier choice to never delete created files during rollback. Also documents competing settings records and the new rollback behaviour, and adds release notes for this round.
Inline conversion only needs the TaskNotes link format for the parent note project; the template variable is also used in note bodies and filenames, so it keeps Obsidian's generated link.
…d tarball The npm package (published with provenance from tasknotes-model v0.3.0-rc.20) has the same integrity hash as the vendored tarball it replaces.
callumalpass
marked this pull request as ready for review
October 27, 2026 20:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves TaskNotes app behaviour out of the
tasknotes.taskbinding into the TaskNotes settings record,_settings/dev.tasknotes.md. The record uses appdev.tasknotes, scopecollectionand settings_version 1. Its type istasknotes-settings, which implementsmdbase.app-settings1.0.0 andtasknotes.settings1.0.0.Merge and release order: mdbase-contracts#18 → publish tasknotes-model#25 (0.3.0-rc.20) → TaskNotes App callumalpass/tasknotes-app#311 ships → this plugin upgrades collections. Spec: callumalpass/tasknotes-spec#11.
This branch uses the unpublished model tarball
vendor/tasknotes-model-0.3.0-rc.20.tgz(file:dependency) and the rc.19 pack JSON from mdbase-contracts#18. Swap the tarball for the registry version once the model is published.Moved to the record
nlp.triggerstemplatingarchive.move_on_archiveandarchive.foldertime_trackingrecurrence.reset_body_checkboxeslinks.write_formatnext_status,exclude_from_cycle,auto_archiveandauto_archive_delay_minutes, keyed by status valueEverything else stays in the binding.
x-tasknotes-generatoris unchanged.Behaviour
settings_versionis read-only.schemas/…beside the contracts folder, as the pack lays them out) and the_types/tasknotes-settings.mdtype are seeded only when absent.portableSettingsFingerprintno longer covers the moved fields.applyCanonicalTaskTypeToSettingstakes{record, legacyBinding}.Fixes found on the way
contracts_folderfrom the contract path. With the versioned path_contracts/tasknotes.task/<ver>.mdthis would have produced_contracts/tasknotes.task.Decisions (brief left open)
_contracts/tasknotes.task/0.3.0-rc.6.md. The rc.5 contract at_contracts/tasknotes.task.mdis retained as is, matching the pack._types/tasknotes-settings.mdand the settings record), but only while each still holds exactly the bytes written. A file edited since is kept. Recovery also removes abandoned*.tasknotes-stage-*files beside journalled paths, unless a pending swap journal owns them. This reverses the earlier rule that rollback never deletes created files. Re-running is idempotent.exclude_from_cycledefaults to the status'sis_skipped.Risks
FieldMapping.recurrenceOriginalDateand adisplayValuefix.binding/status/definitionsfor collections with customised statuses, because arrays merge atomically. The plugin's own upgrade path is unaffected.Validation
npm test: 784 suites passed and 70 skipped; 5202 tests passed, 1012 skipped and 4 todo.npm run lint(strict) andnpm run typecheck: pass.npm run i18n:verify: all up to date.npm run docs:check: pass.npm run build: pass.check:bundle-size: main.js is 4,796,163 bytes, below the 5,000,000 limit.Regression tests:
mdbaseSafeWrites)Fix round 2 (manual upgrade testing)
recordAbsentFieldsMerged=false. The first save then took the first-sight branch, added only absent fields, remembered the new values as applied and never patched the existingmove_on_archive/archive_folder. The first-sight branch now also patches fields changed locally, and the migration marks the record as merged. Regression test: v4 migration → save → save → restart._settings/*.mdwithapp: dev.tasknotesandscope: collection(for exampledev.tasknotes (conflicted copy Device-B).md) is now named in a non-blocking notice (mdbaseSafety.competingSettings, translated in all locales). This follows the beta.6 "Multiple TaskNotes types" notice pattern. The canonical record stays in use; other files are not changed, merged or deleted._settings/*.mdchanges trigger reconciliation.generateLinkdelegated Markdown links tofileManager.generateMarkdownLink, which follows Obsidian's global wikilink preference. When that returns a wikilink, it now builds a Markdown link. NLP projects (task modal, inline convert, API/MCP/CLI viabuildTaskCreationDataFromParsed), the parent-note project default and the Bases current-file default now use the TaskNotes setting. The{{parentNote}}template variable keeps Obsidian's format, because it is also used in bodies and filenames. The edit modal keeps existing project links as written.[[…]], and inline conversion writes the project as plain text. Both also reproduce on beta.6, so they are not regressions from this PR, and they are tracked for a follow-up. The HTTP API keeps caller-supplied link syntax, which is intended.MetadataTransaction.Round 2 validation (head 311534e):
npm test: 784 suites passed and 70 skipped; 5208 passed, 1012 skipped and 4 todo.TMPDIRis needed for the symlink and native-publication tests.npm run lint,lint:ts,lint:review-types,lint:cssandtypecheck: pass.i18n:verifyandi18n:check-usage: pass.docs:check: pass.build: pass.check:bundle-size: main.js is 4,801,603 bytes, below 5,000,000.large4-final-specv4.14.0 fixture:move_on_archive: true.false.false.mdbaseReleaseUpgrades)mdbaseReleaseUpgrades)generateLinkwith an Obsidian wikilink preference, andformatResolvedProjectReference(linkUtils)taskModalProjects)MdbaseSpecService,mdbaseSafeWrites)Manual upgrade testing (desk, Obsidian on gcp)
Four tester slices ran against 5.0.0-beta.6, candidate r1 (58ba266) and R2 (311534e). Every source was restored from the same pre-upgrade snapshot for each target.
_types/and_settings/; sync with last-writer-wins and with conflict copies; downgrade and re-upgrade; integrations; phone layoutFixes 1, 2 and 4 were verified through the real settings UI. Fix 3 is partial, as noted above. No task, frontmatter, template or Base rewrites were found, restarts were idempotent, and every downgrade to the source version still works.
Issues found but out of scope here; they are general v5 and also in beta.6:
Release dependencies
@tasknotes/model0.3.0-rc.20 is published to npm (tagnext, with provenance) and replaces the vendored tarball. Its integrity hash matches the tarball. Tests, lint, typecheck, build and bundle size were rerun on 10b5222.