Skip to content

Add folder-aware Markdown templates - #269

Draft
bholmesdev wants to merge 3 commits into
mainfrom
switchback-petroglyph
Draft

Add folder-aware Markdown templates#269
bholmesdev wants to merge 3 commits into
mainfrom
switchback-petroglyph

Conversation

@bholmesdev

Copy link
Copy Markdown
Owner

Description

Adds visible, cascading templates folders for Markdown notes. Users can apply templates through /template, choose folder defaults for new notes, and save an existing note as a template. File Properties merge additively, template Assets copy with rebased links and rollback safety, and Command-P keeps templates searchable while preferring ordinary notes on ties.

Closes #221

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update

Testing

  • Existing tests pass
  • Added new tests for changes
  • Tested manually (describe below)

Manual Testing Details:

  • Ran pnpm check, pnpm check:react-compiler, all editor/UI/desktop tests, and pnpm build:desktop.
  • Drove the Electron playground through CDP: opened /template, confirmed focused searchable choices and Default badges, applied additive properties/body, created a default-backed note with Cmd-N, and saved that note as a template. Confirmed default-template is stripped on application and forced false on saved templates.
  • Confirmed the dev app and watcher processes were stopped after testing.

Checklist

  • I discussed this change in a GitHub issue before submitting this PR
  • I have run the linter, formatter, and tests to ensure my code is ready for review

Known limitations

  • Template actions remain Desktop-only; synced templates stay visible and editable on web as specified.

bholmesdev and others added 2 commits August 16, 2026 21:38
Co-Authored-By: Warp Factory Agent <oz-agent@warp.dev>
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hubble-md-web Ready Ready Preview Aug 17, 2026 2:07am

Co-Authored-By: Warp Factory Agent <oz-agent@warp.dev>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Folder-aware Markdown templates: cascading templates/ libraries, /template apply with additive front matter + asset materialization/rollback, default-template for new notes, Save as template, and Command-P ordinary-note preference. Specs, desktop IPC, editor host contract, and solid unit coverage match the product plan.

Concerns

  • Sibling default normalization only fires on false → true, so checking default-template when the key was absent (common File Properties path) leaves other library defaults checked.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes


Reviewed by a Warp Factory agent.

const next = readDefaultTemplateDirective(
parseMarkdownFrontMatter(nextContent),
);
return previous === false && next === true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] Sibling uncheck only runs when the prior directive is exactly false. Adding/checking default-template with no prior key (null → true) — the usual File Properties path — skips normalizeDefaultTemplateSiblings, so other library defaults stay true.

Suggested change
return previous === false && next === true;
return previous !== true && next === true;

@bholmesdev
bholmesdev marked this pull request as draft August 17, 2026 02:57
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.

Create Markdown files from folder-aware templates

1 participant