Skip to content

[docs] Product flows for 3.1: Add a product, Edit a product - #115

Draft
billjohnc wants to merge 4 commits into
mainfrom
docs/supply-product-flows-bfb8
Draft

billjohnc wants to merge 4 commits into
mainfrom
docs/supply-product-flows-bfb8

Conversation

@billjohnc

@billjohnc billjohnc commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What this changes (docs version 3.1 only)

Two Supply > Product flow pages, rewritten in place (same files, same URLs, same sidebar entries):

  • versioned_docs/version-3.1/flows/supply/product/add-product-instance.mdx: now Add a product (was "Add a product instance"). The old page described Settings > Product > Add Product. That button and its route are gone in 3.1 (care_fe 5df944909, #13735). In 3.1 a product is created only when you receive stock: store location > Inventory > External Supply > Purchase Deliveries > a Draft delivery > Add Item > a new batch > Save Changes. The page walks through that path, says when Care creates a new product (and sometimes a charge item definition), and says when it reuses an existing batch.
  • versioned_docs/version-3.1/flows/supply/product/edit-product-instance.mdx: now Edit a product (was "Edit a product instance"). Every step and label is re-verified. Fixes:
    • The sidebar entry is "Product", not "Products".
    • Rows open with View or Edit; the row itself is not clickable.
    • The save button is Update, not "Save".
    • The Charge Item Definition picker is described, including that a linked definition cannot be removed.
    • The full permission path is listed.
  • Media: a narrated video with subtitles for each page, plus step screenshots (static/media/supply/product/add-product-instance*, edit-product-instance*).

The titles drop "instance" because the screens never use the word; they say Product, Products and Edit Product. This also matches the Product concept rewrite in #114.

Verified against

  • care ddfd840 (develop, 2026-11-23) and care_fe 5e02f9a (develop, 2026-11-26).
  • From code: 120 backend facts and 152 frontend facts, each with its file, lines and quote.
  • At runtime: both flows were recorded on a local stack at those commits (care backend ddfd840; production build of care_fe 5e02f9a), as a Facility Admin in the facility's root organization (Administration). Each recording's API log was compared with the permission path; there were no 403s. That run surfaced one missed gate, the Services page (Can Read Healthcare Service), which is now listed. The result of "Add a product" was read back through the API:
    • The delivery item is In Progress and Normal.
    • The product is Active with lot number, pack size and purchase price (TPR ÷ Pack Size) from the row.
    • A charge item definition was copied from the earlier batch.
    • Stock is unchanged until the delivery is completed.
  • Not confirmed by execution with a reduced role: the permission tables come from code and the API logs.

Differences from the house style, on purpose

  • Language: STE rules for steps, prerequisites and tables; plain English for the Overview.
  • Versions: 3.1 only (verified against develop). 3.0 was not touched.
  • Permissions: each table lists the whole path to the action, not only the final permission: where each permission must be held (Administration vs. any department vs. the store location's departments) and the default roles. The default role named "Admin" is left out of role lists because facility role pickers do not offer it.
  • Media markup: a <track> for subtitles and step screenshots, the same markup as [docs] Definitions & Terminology for 3.1 #112.
  • Narration: the voice reads a short script per step: the step plus a sentence of context from the page. The subtitles show what it says. The voices are AI-generated with ElevenLabs (model eleven_v4) from cloned voices: "Add a product" in Bill's voice and "Edit a product" in Gauri's, continuing the alternation of the sibling Product Knowledge flows. Where a line is longer than its step, the video holds a settled frame and the subtitles are timed to match.

Depends on

Left out, or not settled

  • Create New in the edit form's charge item definition picker is not described. After it creates a definition, the picker does not show it, and Update may stay disabled (frontend; see below).
  • Whether clearing Standard Pack Size or Lot Number in the edit form removes the saved value: not settled, so not stated.
  • The add-items panel also loads request orders for its Select order picker. That needs Can Read Supply Request in the store's departments, which every default role that can open the delivery also holds. It is not listed, because this flow does not use that picker.
  • The page the store location card opens (Inventory summary for a Store service, Prescription Queue for a pharmacy service) was not traced; the reader continues from the location sidebar.

What the Ezhuthachan skill learned (separate commit)

Moved to the consolidated Ezhuthachan skill update, #141. This PR no longer changes .claude/skills/.

Suspected product issues (recorded, not filed)

  • care + care_fe: in the product edit form, "Clear Selection" on the charge item definition looks like it works, but the backend ignores the empty value. A product's charge item definition cannot be unlinked.
  • care_fe: "Create New" in the same picker does not show the new definition in the picker.
  • care_fe: the empty Products list says "Try adjusting your filters or adding a new product", but no add exists in 3.1.
  • care_fe: on a store's purchase delivery, the saved items table heads its columns "Dispatched Qty" / "Dispatched Date" (seen at runtime).
  • care_fe: Lot Number shows a required asterisk but accepts an empty value; Standard Pack Size accepts decimals though the backend expects a whole number.
  • care_fe: no frontend gate on Edit or Save Changes, so users without the write permission see the buttons and are refused on save.
  • care: Save Changes is not atomic: if the delivery item is refused, the product and charge item definition it created stay.
  • A possible cross-facility gap in product upsert was noted by the concept session; it is not described here and should be reported privately.

🤖 Generated with Claude Code

billjohnc and others added 2 commits November 28, 2026 02:24
Add a product: in 3.1 a product is created only when stock is received
in Purchase Deliveries (the Settings Add Product button is gone). Edit a
product: steps, labels and the full permission path re-verified against
care ddfd840 and care_fe 5e02f9a. Narrated videos and step screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uttons, rehearse saves)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Deploying coredocs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 08fe729
Status: ✅  Deploy successful!
Preview URL: https://727a2abc.coredocs.pages.dev
Branch Preview URL: https://docs-supply-product-flows-bf.coredocs.pages.dev

View logs

…tion

Care adds stock when delivery items are received (Receive & Update Stock);
Mark as Completed adds none (care ddfd840 delivery_order.py, sync_inventory_item.py).
Page sentence and narration line 8 corrected; video re-stitched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant