Skip to content

T-C8F3-profile-notes-template-token-syntax

State: planning/draft · Impact: medium · Complexity: small

One placeholder syntax across the app. The profile notes template uses {profile_name}; the vault templates use {{profile}}. Move the profile template to the vault token set so one cheat sheet serves both forms. Decided in D-W3KP-pumice-profile-kinds-and-settings-layout.

LocationRole today
apps/pumice/crates/pumice/src/timer/effects.rsrender_notes_template substitutes {profile_name}, {planned_minutes}, {started_at}
apps/pumice/src-nuxt/app/components/TimerProfileForm.vuethe label lists the three single-brace placeholders

render_notes_template substitutes {{profile}}, {{planned}}, {{start}}, {{date}}, {{kind}} and {{title}} with the vault templates’ spelling. {{planned}} is empty for a tracked session. At config upgrade the three old placeholders are rewritten in place, once, with a one-time notice. The profile form’s hint comes from the shared token list.

  1. Share the token table between vault-note and render_notes_template (a small tokens module in pumice the crate can depend on).
  2. Rewrite the three placeholders at upgrade; fixture.
  3. Point the form hint at the shared list.
AreaNote
apps/pumice/crates/pumice/src/timer/effects.rsnew token names, {{planned}} empty when tracked
apps/pumice/src-tauri/tests/config_upgrades.rsplaceholder rewrite fixture
apps/pumice/src-nuxt/app/components/TimerProfileForm.vuehint from the shared token list
  • A profile template Worked on {profile_name} upgrades to Worked on {{profile}} and renders the same text.
  • {{planned}} renders empty for a tracked session and 25 for a 25-minute focus.
  • moon run pumice:check and pumice:test green.
  • Logic in templates. Substitution only, as before.

← Back to Tasks