#25 added the project link to the new-paper scaffold only — a deliberate scope decision at the time. The consequence is that every project created before 2.4.0-beta.5, and every project created by any other route, still has no project: key and stays invisible to Project Manager's deliverable count.
There is currently no way to set it except editing frontmatter by hand in four separate notes.
Scope
Somewhere to pick or change the project for an existing paper, writing project: into every draft index note of that project (and removing it when cleared). Two plausible homes:
src/view/metadata-modal/ — already the place you edit a project's metadata, and it round-trips unknown JSON fields. But project: lives in note frontmatter, not metadata.json, so this modal would be writing outside its current remit.
src/view/explorer/ProjectDetails.svelte — sits in the project pane, already project-scoped.
Notes
- Use
app.fileManager.processFrontMatter rather than rewriting note text — the same approach src/commands/convert-to-project.ts uses for longform:.
- Reuse
projectOptions() and the host/free-text fallback from the new-paper modal rather than growing a second copy of that logic. That may mean lifting the control-swap out of new-paper-modal/index.ts into something shared.
- Must handle both project forms: legacy (a
longform: note per draft) and the single format: project index. In project form the drafts' own notes carry no longform:, so where project: belongs needs deciding — probably the index note only.
- Reuse
yamlScalar (src/model/scaffold/parts.ts) if writing raw text anywhere.
#25 added the project link to the new-paper scaffold only — a deliberate scope decision at the time. The consequence is that every project created before
2.4.0-beta.5, and every project created by any other route, still has noproject:key and stays invisible to Project Manager's deliverable count.There is currently no way to set it except editing frontmatter by hand in four separate notes.
Scope
Somewhere to pick or change the project for an existing paper, writing
project:into every draft index note of that project (and removing it when cleared). Two plausible homes:src/view/metadata-modal/— already the place you edit a project's metadata, and it round-trips unknown JSON fields. Butproject:lives in note frontmatter, notmetadata.json, so this modal would be writing outside its current remit.src/view/explorer/ProjectDetails.svelte— sits in the project pane, already project-scoped.Notes
app.fileManager.processFrontMatterrather than rewriting note text — the same approachsrc/commands/convert-to-project.tsuses forlongform:.projectOptions()and the host/free-text fallback from the new-paper modal rather than growing a second copy of that logic. That may mean lifting the control-swap out ofnew-paper-modal/index.tsinto something shared.longform:note per draft) and the singleformat: projectindex. In project form the drafts' own notes carry nolongform:, so whereproject:belongs needs deciding — probably the index note only.yamlScalar(src/model/scaffold/parts.ts) if writing raw text anywhere.