feat(renderer): write when each step happens in a recipe on the calendar, and the sheet after it #84

Merged
abiwab merged 1 commit from feat/renderer-annotated-recipe into main 2026-10-04 18:00:31 +02:00
Owner

Variants A and C of the merged recipe + production sheet (`.notes/idees-fiche-fusionnee-et-suivi-temps-reel.md`), in the renderer. The CLI, the terminal view and the playground follow in the next PR.

  • A, the annotated recipe: new `projection` option on `toHTML`, `toMarkdown` and `toPrintHTML`. Read once in the shared traversal (`annotateRecipe`, `context._annotations`), so the three formats stay in step. At the top of the instructions: when it is served and what could not be fixed. Next to every step: a time ("around 21:40"). Between steps: the day when it changes (it comes back to a day already seen when the order of the recipe is not the order of the time), and what the step leaves resting, with the note of a stretched or shortened rest. The total and idle times of the header are those of the plan.
  • C, the sheet after the recipe: new `runSheet` option (needs a `projection`). `RenderBackend` gets a required `renderRunSheet` hook and `RenderSections.runSheet`, so a backend can't forget it (TypeScript enforces it, like the other hooks). Markdown puts it one heading level down; the print document gets the styles of the sheet and of the plan only when there is a projection (the existing print snapshot is untouched).
  • Same words and rounding as the sheet (`describeRunSheet`), EN and FR, everything from the recipe escaped. `annotateRecipe`, `stepKey` and the types are exported for other renderers: the terminal view uses them next.
  • `runSheetToPrintHTML` moved to its own file to avoid an import cycle with the print formatter (same public export).
  • Docs EN + FR (renderer reference) and the renderer changeset.

Tests (20): the words and the rounding, the day logic including a crafted plan where the order is not the time's, the three formats, the markdown structure, French, escaping of a hostile recipe, the sheet after the recipe, and that nothing changes without a projection.

Stacked on #83, itself on #82: base is `feat/cli-timezone-setting`; retarget to `main` as the others merge.

Variants A and C of the merged recipe + production sheet (\`.notes/idees-fiche-fusionnee-et-suivi-temps-reel.md\`), in the renderer. The CLI, the terminal view and the playground follow in the next PR. - **A, the annotated recipe**: new \`projection\` option on \`toHTML\`, \`toMarkdown\` and \`toPrintHTML\`. Read once in the shared traversal (\`annotateRecipe\`, \`context._annotations\`), so the three formats stay in step. At the top of the instructions: when it is served and what could not be fixed. Next to every step: a time ("around 21:40"). Between steps: the day when it changes (it comes back to a day already seen when the order of the recipe is not the order of the time), and what the step leaves resting, with the note of a stretched or shortened rest. The total and idle times of the header are those of the plan. - **C, the sheet after the recipe**: new \`runSheet\` option (needs a \`projection\`). \`RenderBackend\` gets a required \`renderRunSheet\` hook and \`RenderSections.runSheet\`, so a backend can't forget it (TypeScript enforces it, like the other hooks). Markdown puts it one heading level down; the print document gets the styles of the sheet and of the plan only when there is a projection (the existing print snapshot is untouched). - Same words and rounding as the sheet (\`describeRunSheet\`), EN and FR, everything from the recipe escaped. \`annotateRecipe\`, \`stepKey\` and the types are exported for other renderers: the terminal view uses them next. - \`runSheetToPrintHTML\` moved to its own file to avoid an import cycle with the print formatter (same public export). - Docs EN + FR (renderer reference) and the renderer changeset. Tests (20): the words and the rounding, the day logic including a crafted plan where the order is not the time's, the three formats, the markdown structure, French, escaping of a hostile recipe, the sheet after the recipe, and that nothing changes without a projection. **Stacked on #83**, itself on #82: base is \`feat/cli-timezone-setting\`; retarget to \`main\` as the others merge.
feat(renderer): write when each step happens in a recipe on the calendar, and the sheet after it
All checks were successful
CI / Build, Test & Publish (pull_request) Successful in 3m16s
e29a5a638b
abiwab changed target branch from feat/cli-timezone-setting to main 2026-10-04 18:00:16 +02:00
abiwab merged commit 5e0fc3395b into main 2026-10-04 18:00:31 +02:00
abiwab deleted branch feat/renderer-annotated-recipe 2026-10-04 18:00:31 +02:00
Sign in to join this conversation.
No description provided.