Repository navigation
Done
Labels
Description
Why
Recipe notes (> lines) show in the recipe page of cook server but cooking mode drops them. Recipes that explain technique in notes, such as the Cooklang cooking course, lose that text at the moment the cook is at the stove.
Today
src/web/templates.rs,cooking_mode_json:RecipeSectionItem::Note(_) => None, so notes never reach the cooking-mode data.static/js/cooking-mode.js,buildCards: onesectioncard per section, onestepcard per step, then thedonecard.
Wanted behaviour
Cook mode stays a pager. Within a section, pages follow the order of the file:
- The ingredients page, where one is shown today.
- Then the section's blocks in order: a step is a step page, a note is a note page.
Rules:
- Notes before the first step make a note page after the ingredients page and before step 1 (the same order as the recipe view).
- Notes after the last step make a note page after the last step.
- Adjacent notes share one page. Notes with no step between them make one note page, each note its own paragraph. In a sample of 16,268 recipes, 40% of notes sit after the last step, often two or three in a row; one page each would add a swipe per note at the end. Confirmed 2026-11-13: adjacent notes share one page.
- A section with notes and no steps gets its note page under the section's name.
- Step numbers do not change. A note page has no number; its header reads "Note", with the section name where one is shown.
- Progress counts pages, so it moves on a note page.
- Opening cook mode at step N still lands on step N.
- A note page has no timers, no ingredient list and no step photo. It scrolls when the text is long.
- Text is plain, styled like the note in the recipe view. A URL in a note is tappable and opens outside cook mode.
Out of scope here: showing a video link in a note as a play card. That comes later.
Acceptance recipe
= Sear
> A
Salt @chicken thighs{4}.
> B
> C
Fry in a #pan{} for ~{12%minutes}.
> D
= Rest
> EExpected pages: Ingredients (Sear) · Note A · Step 1 · Note B + C · Step 2 · Note D · Note E (Rest). Step 2 is still "Step 2". A recipe with no notes pages exactly as it does today.
In CookCLI the last note page comes before the "Bon Appetit!" card.
What changes
cooking_mode_jsonemits notes in order with the steps (for example anitemsarray of{type: "step" | "note", …}), keepingstepsif anything else reads it.buildCardspushes atype: 'note'card for each run of notes;renderCardgets a note branch; the live region announces "Note".- Note text comes from the JSON and goes through the existing
escapeHTML.
Watch out for
- Step text is captured from
.step-bodyelements only (captureStepHTML), so note cards must not advancestepHTMLIndex. totalInSectionkeeps counting steps.
Checks
- The acceptance recipe pages as listed.
- A recipe with no notes pages as before.
- Keyboard and swipe navigation, section pills and timers work across note cards.
Activity
jjohnnystwsss commentedon Nov 23, 2026
I'd like to take this on, following the acceptance recipe and the page order described above. I'll keep adjacent notes on one card, preserve step numbers and opening at a specific step, and cover navigation, section pills, timers, and escaping/link handling in tests. I'll also check that recipes without notes behave as before.
I'll use Codex to help with implementation and tests and disclose the assistance in the PR.