feat(renderer): follow the choice of rests, draw a projected Gantt chart and write the production sheet #80

Merged
abiwab merged 2 commits from feat/renderer-schedule-projection into main 2026-10-04 12:32:26 +02:00
Owner

PR 4 of the 1.4.0 scheduler plan (`.notes/plan-scheduler-1-4.md`, section 11).

The renderer reads what the scheduler now produces. The renderer already went through `scheduleFor` (so through `layout()`) since the previous PR, which memoizes per choice; what changes here is the options and the two new outputs.

  • Options: `schedule` becomes `miseEnPlace` on `RendererOptions` and `GanttRenderOptions` (it was never published), with the new `rests` (`shortest` by default, `balanced`, `longest`). The CLI, the language server and the playground follow the rename; the `--rests` flag, the setting and the selector come with the consumers PR.
  • Projected Gantt: `projection?: ProjectedPlan` draws the plan's own blocks (a stretched rest at its new length, outlined, with a note in its tooltip), reads the axis in real days and times of the plan's zone, greys out the hours the cook is not available, and drops the T+/T-/target time modes that make no sense there. Tick labels and tooltips carry the wall clock; the interactivity script leaves them alone.
  • Production sheet: `runSheetToText`, `runSheetToMarkdown`, `runSheetToHTML`, `runSheetToPrintHTML` from the scheduler's `runSheet()`: days with their distance from the service (D-1, Day D), tasks in order, times rounded to 5 minutes for display only (`roundTo`), a note on every rest that was moved, and a "to fix" list from the projection diagnostics. English and French, dates through `Intl` in UTC with an explicit zone, everything that comes from the recipe escaped. A step with no hands-on time of its own is left out: the rest it starts carries its words.
  • i18n: the words of the sheet and of the chart, EN + FR (own commit).

Checks: new tests for the sheet (four formats, FR, escaping of a hostile recipe, rounding, diagnostics), the projected chart (labels, bands, adjusted rest, controls, language) and the `rests` option on the chart. 1605 tests, lint, typecheck, build, conformance, docs build (playground chunk 501 KB for 800 KB) pass.

Not in this PR: the docs still describe the `schedule` option and `schedules` (docs PR), and the `--rests` flag and the `gram plan` command come next.

PR 4 of the 1.4.0 scheduler plan (\`.notes/plan-scheduler-1-4.md\`, section 11). The renderer reads what the scheduler now produces. The renderer already went through \`scheduleFor\` (so through \`layout()\`) since the previous PR, which memoizes per choice; what changes here is the options and the two new outputs. - **Options**: \`schedule\` becomes \`miseEnPlace\` on \`RendererOptions\` and \`GanttRenderOptions\` (it was never published), with the new \`rests\` (\`shortest\` by default, \`balanced\`, \`longest\`). The CLI, the language server and the playground follow the rename; the \`--rests\` flag, the setting and the selector come with the consumers PR. - **Projected Gantt**: \`projection?: ProjectedPlan\` draws the plan's own blocks (a stretched rest at its new length, outlined, with a note in its tooltip), reads the axis in real days and times of the plan's zone, greys out the hours the cook is not available, and drops the T+/T-/target time modes that make no sense there. Tick labels and tooltips carry the wall clock; the interactivity script leaves them alone. - **Production sheet**: \`runSheetToText\`, \`runSheetToMarkdown\`, \`runSheetToHTML\`, \`runSheetToPrintHTML\` from the scheduler's \`runSheet()\`: days with their distance from the service (D-1, Day D), tasks in order, times rounded to 5 minutes for display only (\`roundTo\`), a note on every rest that was moved, and a "to fix" list from the projection diagnostics. English and French, dates through \`Intl\` in UTC with an explicit zone, everything that comes from the recipe escaped. A step with no hands-on time of its own is left out: the rest it starts carries its words. - **i18n**: the words of the sheet and of the chart, EN + FR (own commit). Checks: new tests for the sheet (four formats, FR, escaping of a hostile recipe, rounding, diagnostics), the projected chart (labels, bands, adjusted rest, controls, language) and the \`rests\` option on the chart. 1605 tests, lint, typecheck, build, conformance, docs build (playground chunk 501 KB for 800 KB) pass. Not in this PR: the docs still describe the \`schedule\` option and \`schedules\` (docs PR), and the \`--rests\` flag and the \`gram plan\` command come next.
abiwab merged commit 5603e86c24 into main 2026-10-04 12:32:26 +02:00
abiwab deleted branch feat/renderer-schedule-projection 2026-10-04 12:32:26 +02:00
Sign in to join this conversation.
No description provided.