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.
| Location | Role today |
|---|---|
apps/pumice/crates/pumice/src/timer/effects.rs | render_notes_template substitutes {profile_name}, {planned_minutes}, {started_at} |
apps/pumice/src-nuxt/app/components/TimerProfileForm.vue | the label lists the three single-brace placeholders |
Proposed
Section titled “Proposed”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.
Approach
Section titled “Approach”- Share the token table between
vault-noteandrender_notes_template(a smalltokensmodule inpumicethe crate can depend on). - Rewrite the three placeholders at upgrade; fixture.
- Point the form hint at the shared list.
| Area | Note |
|---|---|
apps/pumice/crates/pumice/src/timer/effects.rs | new token names, {{planned}} empty when tracked |
apps/pumice/src-tauri/tests/config_upgrades.rs | placeholder rewrite fixture |
apps/pumice/src-nuxt/app/components/TimerProfileForm.vue | hint from the shared token list |
Acceptance criteria
Section titled “Acceptance criteria”- A profile template
Worked on {profile_name}upgrades toWorked on {{profile}}and renders the same text. -
{{planned}}renders empty for a tracked session and25for a 25-minute focus. -
moon run pumice:checkandpumice:testgreen.
Out of scope
Section titled “Out of scope”- Logic in templates. Substitution only, as before.