feat(vscode): serving time in the work plan panel (views phase 7, step 1) #107

Merged
abiwab merged 3 commits from feat/views-p7-vscode-serving into feat/views-architecture 2026-11-05 23:48:50 +01:00
Owner

Phase 7, step 1. The audit (Q2) widened phase 7 to the whole session in VS Code; it is split like phase 5: this PR is the serving time, step 2 will bring scale, stock and baker's reference to the panel bar.

  • Renderer: suggestServeTimes(input, { lang, days, limit, mealTimes }) puts the serving time search in words (times that work over the next days, why the others do not, the earliest). The playground now uses it instead of its own copy, and its "Earliest" label comes from i18n instead of a hard-coded fr/en.
  • Language server: a gram/serveTimes { uri } request (asked only while the suggestions are shown); mealTimes read from .gram/config.yaml as in the CLI; the initialize capability gives each view's needs and the words of the serving controls (strings.serving, en/fr).
  • VS Code: a "Served at" field, Clear, and "When to serve?" suggestions (earliest first, why not the others) on any view whose needs has runSheet, never by id. The serving time is kept per recipe in memory, forgotten on close, never written to the settings; stale answers are dropped. A test compiles the page's inline script.
  • Docs en/fr (VS Code, language server, planning in real time); pending changesets vscode-work-plan, lsp-views-protocol and renderer-prepare-views extended.

Build, typecheck, lint, test (2182), conformance green; playground 921.0 KB / 930 KB. Checked by hand in the extension host by the maintainer.

Phase 7, step 1. The audit (Q2) widened phase 7 to the whole session in VS Code; it is split like phase 5: this PR is the serving time, step 2 will bring scale, stock and baker's reference to the panel bar. - Renderer: `suggestServeTimes(input, { lang, days, limit, mealTimes })` puts the serving time search in words (times that work over the next days, why the others do not, the earliest). The playground now uses it instead of its own copy, and its "Earliest" label comes from i18n instead of a hard-coded fr/en. - Language server: a `gram/serveTimes { uri }` request (asked only while the suggestions are shown); `mealTimes` read from `.gram/config.yaml` as in the CLI; the `initialize` capability gives each view's `needs` and the words of the serving controls (`strings.serving`, en/fr). - VS Code: a "Served at" field, Clear, and "When to serve?" suggestions (earliest first, why not the others) on any view whose `needs` has `runSheet`, never by id. The serving time is kept per recipe in memory, forgotten on close, never written to the settings; stale answers are dropped. A test compiles the page's inline script. - Docs en/fr (VS Code, language server, planning in real time); pending changesets `vscode-work-plan`, `lsp-views-protocol` and `renderer-prepare-views` extended. Build, typecheck, lint, test (2182), conformance green; playground 921.0 KB / 930 KB. Checked by hand in the extension host by the maintainer.
abiwab merged commit 8375847ecc into feat/views-architecture 2026-11-05 23:48:50 +01:00
Sign in to join this conversation.
No description provided.