feat(cli): show when each step happens in view, export and print, and the sheet after the recipe #85

Merged
abiwab merged 2 commits from feat/cli-annotated-views into main 2026-10-04 18:00:43 +02:00
Owner

The second half of variants A and C (`.notes/idees-fiche-fusionnee-et-suivi-temps-reco...`): the renderer part is #84.

  • Shared plan flags: `services/plan-options.ts` holds `--serve`, `--tz`, `--available`, `--now` (`PLAN_FLAG_ARGS`) and `resolvePlanContext`, now used by `gram plan` and by `view`, `export` and `print`. A plan flag without `--serve` is refused instead of silently ignored, as is `--with-sheet` without it.
  • `gram view` (terminal): the model gets the plan (served at, what could not be fixed) and, per step, `when`, `day` and `rests`, from the renderer's `annotateRecipe` (same words as the sheet and the exports). The terminal prints the day between steps, the time after each step, the rests with their note; the total time is the plan's. The `(~8h)` timer chip is dropped on a step with a rest, since the line below gives the real length. Without `--serve`, nothing changes.
  • `gram export` / `gram print`: `--serve` annotates the recipe (A); `--with-sheet` also writes the sheet after it (C). `timesOf` is exported from the renderer for the header total.
  • Playground: the preview and the Markdown view pass the plan, and the "Plan" settings are shown there too.
  • Docs EN + FR (CLI reference, plan-a-meal step 6, the planning page) and the `gram plan` changeset.

Tests: `resolvePlanContext` (order, the refused cases), and the real CLI end to end: `view`, `export` md and html, `print`, the refused flags, the project time zone, and that nothing changes without `--serve`. 1688 tests, lint, typecheck, build, docs build.

Not covered: VS Code (a serving time is per recipe, with no setting to hold it) and `gram cook` (1.5.0).

Stacked on #84 (renderer), which is on #83 and #82. Retarget as the others merge.

The second half of variants A and C (\`.notes/idees-fiche-fusionnee-et-suivi-temps-reco...\`): the renderer part is #84. - **Shared plan flags**: \`services/plan-options.ts\` holds \`--serve\`, \`--tz\`, \`--available\`, \`--now\` (\`PLAN_FLAG_ARGS\`) and \`resolvePlanContext\`, now used by \`gram plan\` and by \`view\`, \`export\` and \`print\`. A plan flag without \`--serve\` is refused instead of silently ignored, as is \`--with-sheet\` without it. - **\`gram view\` (terminal)**: the model gets the plan (served at, what could not be fixed) and, per step, \`when\`, \`day\` and \`rests\`, from the renderer's \`annotateRecipe\` (same words as the sheet and the exports). The terminal prints the day between steps, the time after each step, the rests with their note; the total time is the plan's. The \`(~8h)\` timer chip is dropped on a step with a rest, since the line below gives the real length. Without \`--serve\`, nothing changes. - **\`gram export\` / \`gram print\`**: \`--serve\` annotates the recipe (A); \`--with-sheet\` also writes the sheet after it (C). \`timesOf\` is exported from the renderer for the header total. - **Playground**: the preview and the Markdown view pass the plan, and the "Plan" settings are shown there too. - Docs EN + FR (CLI reference, plan-a-meal step 6, the planning page) and the \`gram plan\` changeset. Tests: \`resolvePlanContext\` (order, the refused cases), and the real CLI end to end: \`view\`, \`export\` md and html, \`print\`, the refused flags, the project time zone, and that nothing changes without \`--serve\`. 1688 tests, lint, typecheck, build, docs build. Not covered: VS Code (a serving time is per recipe, with no setting to hold it) and \`gram cook\` (1.5.0). **Stacked** on #84 (renderer), which is on #83 and #82. Retarget as the others merge.
abiwab changed target branch from feat/renderer-annotated-recipe to main 2026-10-04 18:00:31 +02:00
abiwab merged commit 6726beb769 into main 2026-10-04 18:00:43 +02:00
abiwab deleted branch feat/cli-annotated-views 2026-10-04 18:00:44 +02:00
Sign in to join this conversation.
No description provided.