feat(supply-chain): a product's description and documents on its box (#1054) #1059

Merged
sharang merged 1 commits from feat/supply-chain-docs into main 2026-11-19 10:35:22 +00:00
Owner

Part of #1054 (epic #1050). Stacked on #1058, the ghost boxes. It will be retargeted to main once #1058 merges.

The user decided on 2026-11-19 that the files live in the portal's Dokumentenablage. The decisions are on #1054.

What it adds

  • Agent: GET /api/v1/supply-chain/projects/{id}/documents returns, for a product project of the workspace:

    • the project's description, which the registry keeps and the portal edits;
    • its documents from the store, newest first: those whose project_ids hold the project, in product_public or internal. Each has its title, file name, size, an internal flag, and path, where the portal shows it (/{slug}/dokumente/{doc}/original). Legal web documents and BreakPilot's deliveries belong to no product and are left out;
    • store_path, the store's page in the portal, for adding a document.

    Prüfwerk keeps no copy of any file. Anything but a product project of the workspace gets 404; an unreachable registry gets 503; without a registry (dev) there is nothing to show.

  • Registry client: list_store reads GET /v1/tenants/{id}/store. It isn't cached, because it's read only when a product's box is opened.

  • The panel, for products and assemblies:

    • the description;
    • "Unterlagen", where an internal document is marked "intern" and every document shows its size ("1,2 MB" in German, "1.2 MB" in English);
    • each document opening in the portal in a new tab;
    • "In der Dokumentenablage hinzufügen" for those who may add.
  • Docs: guide/lieferkette, section "Beschreibung und Unterlagen eines Produkts".

Not in this PR:

  • The picture needs the store to take images: tenant-registry#140 (one per product project, up to 5 MB). The slot will show once that exists.
  • Components and suppliers get no slots, because the store files documents per product.

Checked

  • Locally, with a fake registry holding a description, two published documents, one internal document and one legal document:
    • the panel shows the description and the three product documents, newest first, with the internal one marked;
    • the links point to the portal and the legal document is left out;
    • an assembly with no documents shows the empty text and the add link.
  • Tests:
    • unit tests for the document filter, order and portal path, and for the size text;
    • the integration test covers the no-registry answer;
    • the OpenAPI, route and registry gates pass;
    • 210 dashboard tests pass, and clippy is clean on the agent and both dashboard builds.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Part of #1054 (epic #1050). **Stacked on #1058**, the ghost boxes. It will be retargeted to `main` once #1058 merges. The user decided on 2026-11-19 that the files live in the portal's Dokumentenablage. The decisions are on #1054. ## What it adds - **Agent:** `GET /api/v1/supply-chain/projects/{id}/documents` returns, for a product project of the workspace: - the project's `description`, which the registry keeps and the portal edits; - its `documents` from the store, newest first: those whose `project_ids` hold the project, in `product_public` or `internal`. Each has its title, file name, size, an `internal` flag, and `path`, where the portal shows it (`/{slug}/dokumente/{doc}/original`). Legal web documents and BreakPilot's deliveries belong to no product and are left out; - `store_path`, the store's page in the portal, for adding a document. Prüfwerk keeps no copy of any file. Anything but a product project of the workspace gets `404`; an unreachable registry gets `503`; without a registry (dev) there is nothing to show. - **Registry client:** `list_store` reads `GET /v1/tenants/{id}/store`. It isn't cached, because it's read only when a product's box is opened. - **The panel**, for products and assemblies: - the description; - "Unterlagen", where an internal document is marked "intern" and every document shows its size ("1,2 MB" in German, "1.2 MB" in English); - each document opening in the portal in a new tab; - "In der Dokumentenablage hinzufügen" for those who may add. - **Docs:** `guide/lieferkette`, section "Beschreibung und Unterlagen eines Produkts". **Not in this PR:** - The **picture** needs the store to take images: tenant-registry#140 (one per product project, up to 5 MB). The slot will show once that exists. - **Components and suppliers** get no slots, because the store files documents per product. ## Checked - **Locally, with a fake registry** holding a description, two published documents, one internal document and one legal document: - the panel shows the description and the three product documents, newest first, with the internal one marked; - the links point to the portal and the legal document is left out; - an assembly with no documents shows the empty text and the add link. - **Tests:** - unit tests for the document filter, order and portal path, and for the size text; - the integration test covers the no-registry answer; - the OpenAPI, route and registry gates pass; - 210 dashboard tests pass, and clippy is clean on the agent and both dashboard builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang changed target branch from feat/supply-chain-ghosts to main 2026-11-19 10:12:15 +00:00
sharang added 1 commit 2026-11-19 10:12:18 +00:00
feat(supply-chain): a product's description and documents on its box (#1054)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 5m38s
CI / Check (pull_request) Successful in 22m37s
69b476fd5f
A product's or assembly's box on the Lieferkette shows its description and
its documents from the portal's Dokumentenablage, where the user decided the
files live (2026-11-19):

- `GET /api/v1/supply-chain/projects/{id}/documents`: the project's
  description and the store's documents that belong to it (published with
  the product or internal), newest first, each with where the portal shows
  it (`/{slug}/dokumente/{doc}/original`) and the store's path for adding
  one; legal web documents and BreakPilot's deliveries belong to no product.
  Prüfwerk keeps no copy. 404 for anything but a product project of the
  workspace; nothing to show without a registry (dev).
- registry client: `list_store` reads `GET /v1/tenants/{id}/store`.
- the panel: the description, the documents (internal ones marked, with
  their size), each opening in the portal, and "In der Dokumentenablage
  hinzufügen" for those who may add.

The picture waits on the store taking images (tenant-registry#140).
Components and suppliers get no slots: the store files documents per product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang force-pushed feat/supply-chain-docs from 7e249ba46f to 69b476fd5f 2026-11-19 10:12:18 +00:00 Compare
sharang merged commit 1376efa249 into main 2026-11-19 10:35:22 +00:00
sharang deleted branch feat/supply-chain-docs 2026-11-19 10:35:22 +00:00
Sign in to join this conversation.