Build history

Runbook

One entry per prompt: what was asked, what was built, and the statistics. Duration is wall-clock time. Token and credit figures are only shown when they were reported — they cannot be read from inside the app, so check the usage page for exact numbers.

Prompts
5
Build time
113 min
  1. Prompt 1

    2026-09-18 13:00 UTC
    An app to show the Digital Product Passports listed on https://marine-demo.mydwsite4.com/ — Do nothing yet, plan mode. Can you generate a QR code? And prepare to connect via MCP to https://marine-demo.mydwsite4.com/admin/mcp, I will get you a token. Keep a full runbook of what was built in this app, based on which prompt, with statistics like how long it took and the amount of tokens and credits spent.

    What was built

    • Checked the demo site and its /admin/mcp endpoint (responds 401 without a token, as expected)
    • Confirmed QR codes can be generated inside the app with no external service
    • Wrote the first implementation plan and this runbook requirement

    Files

    .lovable/plan.md · roadmap.md

    Duration
    8 min
    Tokens
    not reported
    Credits
    not reported
  2. Prompt 2

    2026-09-18 13:08 UTC
    From the source MCP you will get products information, not a full product passport. It is up to this app to generate a DPP based on the information provided. Research what a minimal DPP should contain and base the first version on that. Not all required product information may be available in the Truvio Commerce database. I already added the custom Truvio Commerce Marine Demo MCP connection just now.

    What was built

    • Researched the minimal DPP content set: ESPR (EU 2024/1781) Article 9 / Annex III themes plus the JRC145830 essential / strongly recommended / voluntary tiering (March 2026)
    • Defined a minimal passport model with five themes and per-field provenance (source / derived / missing)
    • Collected 19 products from the Northwind Marine demo catalogue as the initial dataset
    • Built the passport overview, passport detail with QR panel, QR label tool and this runbook page
    • Marine design system: navy hull surfaces, signal-cyan accent, condensed display type

    Files

    src/data/products.json · src/lib/dpp.ts · src/components/QrCode.tsx · src/components/SiteHeader.tsx · src/components/CompletenessBar.tsx · src/routes/index.tsx · src/routes/passport.$id.tsx · src/routes/qr.tsx · src/routes/runbook.tsx · src/styles.css · runbook.md

    Duration
    26 min
    Tokens
    not reported
    Credits
    not reported
  3. Prompt 3

    2026-09-18 14:24 UTC
    Make the running app read product data live from Truvio Commerce instead of the static src/data/products.json snapshot. The MCP server (Streamable HTTP, bearer auth) is at https://marine-demo.mydwsite4.com/admin/mcp/. Chat connectors are not available to the deployed app, so implement a server-side MCP client as TanStack Start server functions only; never call MCP from the browser or expose the token. Cache the mapped product list for 10 minutes with a refresh action, keep the snapshot as fallback, show a live/snapshot banner with fetch time, and update the passport Data source and Issued fields.

    What was built

    • MCP JSON-RPC client over Streamable HTTP: initialize (2025-03-26), notifications/initialized, tools/list, tools/call — sends the required Accept: application/json, text/event-stream header and parses both plain JSON and SSE responses, echoing Mcp-Session-Id
    • Discovered the Dynamicweb product tools and mapped get_products plus get_product_images and get_manufacturers onto the existing RawProduct shape, so the passport model did not change
    • Category, specifications and fitment now derived from Dynamicweb custom fields (including ProductCategory|…|… category fields)
    • Server-side in-memory cache for 10 minutes, a 'Refresh from source' button on the overview, and automatic fallback to the bundled snapshot when the token is missing or a call fails
    • Live/snapshot banner with fetch time on the overview and passport pages; passport 'Data source' and 'Issued' now reflect the live read
    • Token stored as the TRUVIO_MCP_TOKEN secret and the endpoint as TRUVIO_MCP_URL — never in the client bundle

    Files

    src/server/truvio-mcp.ts · src/server/products.ts · src/lib/catalogue.functions.ts · src/components/SourceBanner.tsx · src/lib/dpp.ts · src/routes/index.tsx · src/routes/passport.$id.tsx · src/routes/qr.tsx · runbook.md · roadmap.md

    Duration
    34 min
    Tokens
    not reported
    Credits
    not reported
  4. Prompt 4

    2026-09-18 15:20 UTC
    Fix product images and documents in the live Truvio Commerce read. Every passport card currently shows 'NO IMAGE' and the technical-documentation / manual / warranty fields are always empty for live products. Do NOT change the DPP gap logic or add any sustainability/compliance data: those gaps are intentional for the demo. Diagnose first, using the Truvio Commerce MCP connector, and write down what you found in the runbook.

    What was built

    • Diagnosis — product selection: get_products returns the whole catalogue, whose first rows are Boat Builder configurator options (NWB-COL-019, NWB-ELE-035 …), each carrying an optionRole field and belonging to the SHOP44 'Northwind Boat Builder' channel, not to the webshop. get_products_by_sku returned nothing for the storefront SKUs because those products are only reachable through their groups.
    • Diagnosis — images: get_product_images wraps its rows in { result: [...] } (not a bare array and not structuredContent), so the old Array.isArray check discarded every row. Paths are relative (/Files/Images/Marine/aurora-38.jpg) and the list also carries PDFs and MP4s in the same shape.
    • Diagnosis — manufacturers: get_manufacturers returns an empty list on this dataset, so brand stays a reported gap.
    • Product selection now walks the SHOP40 'Northwind Marine Webshop' groups and subgroups (Safety, Electrical, Propulsion, Boats, Galley, Bilge & ventilation, Services …) via get_products_by_group_id, deduplicated — 75 products that are actually sold in the shop, with the group name used as the category. The cap is raised to 120 purely as a safety bound.
    • Asset mapping reads every tool-result wrapper ({ data }, { result } or a bare array), sorts primary images first, makes paths absolute on the storefront origin, and splits the list by file type: images to RawProduct.images, PDFs to RawProduct.documents (videos ignored).
    • Technical documentation, user manual and warranty now fill from source — e.g. the Aurora 38 lists its spec sheet, owner's manual, e-brochure and dealer warranty; the 12-circuit DC panel lists the electrical guide and warranty.
    • Per-tool failures in the asset, manufacturer, shop-group and group-product reads are logged server-side with the tool name and product/group reference, never the token, so a broken mapping is visible instead of silent.
    • DPP gap logic untouched: no sustainability or compliance data was added, and products with genuinely no assets (winterisation services, provisioning items) still report their gaps.

    Files

    src/server/products.ts · runbook.md · roadmap.md

    Duration
    31 min
    Tokens
    not reported
    Credits
    not reported
  5. Prompt 5

    2026-09-23 13:39 UTC
    Two changes. The passport must now show the Digital Product Passport data that is held in Truvio Commerce, and the passport detail page needs a 'Refresh from source' button.

    What was built

    • The MCP server changed: get_products_by_group_id no longer returns custom field values and get_product_by_id is gone. The full records are now read with get_products_by_ids in batches of 25 internal product ids; a failed batch keeps the list rows and is logged server-side with the tool name, never the token.
    • The 17 Digital Product Passport fields (ProductCategory|DPP|*) are collected into RawProduct.dpp, keyed by the field id suffix; empty strings count as missing.
    • Passport fields GTIN, model / variant, HS code, manufacturer, registered address, EU representative, EORI, declaration of conformity, standards, safety information, material composition, recycled content, substances of concern, expected lifetime, repairability, carbon footprint and end-of-life now read from those fields, tagged 'from commerce data' with the note 'Truvio Commerce PIM, Digital Product Passport fields'. Empty fields keep their existing gap note, so the gaps read the same as before.
    • Values are formatted for reading: recycled content as '12 %', lifetime as '30 years', carbon footprint as '48,500 kg CO2e, cradle-to-gate'. Manufacturer falls back to the catalogue brand and repairability to the fitment-derived text when the passport field is empty.
    • The DPP fields are excluded from the technical-specification list so they are not shown twice, and the completeness scoring is unchanged.
    • The passport detail page now carries a 'Refresh from source' button in the source banner: it clears the server cache, re-reads from Truvio Commerce, re-runs the loader, shows a busy state and is hidden when printing.
    • Verified: the Northwind Aurora 38 passport scores 100% (29/29 essential fields) with every passport field filled from the PIM; products without DPP data are unchanged.

    Files

    src/server/products.ts · src/lib/dpp.ts · src/routes/passport.$id.tsx · runbook.md · roadmap.md

    Duration
    14 min
    Tokens
    not reported
    Credits
    not reported