Skip to content

inventory: make Inventory a standalone top-level surface separate from Bookkeeping - #482

Merged
alexeygrigorev merged 1 commit into
mainfrom
inventory-standalone-surface
Nov 18, 2026
Merged

alexeygrigorev merged 1 commit into
mainfrom
inventory-standalone-surface

Conversation

@alexeygrigorev

Copy link
Copy Markdown
Member

Problem

Clicking Inventory in the sidebar highlighted both Bookkeeping and Inventory (screenshot reported by the user), because /invertory was still routed to view: "bookkeeping" and Inventory was a hidden secondary section inside the bookkeeping surface, with its nav entry patched in via data-bookkeeping-view special cases.

Fix

Inventory becomes a genuinely separate top-level surface:

  • /invertory maps to its own inventory view (WORKSPACE_ROUTE_DEFINITIONS, WORKSPACE_PATH_BY_VIEW), and joins SELF_LOADING_VIEWS.
  • The sidebar button targets data-workspace-view="inventory"; the generic nav pass lights exactly one entry. All data-bookkeeping-view special-casing (nav sync skip, click-path override, bookkeeping's own nav pass) is deleted.
  • New frontend/src/surfaces/finance/inventory.js surface fetches the items and owns a record dialog that fetches the original ledger transaction (GET /transactions/:id) plus documents/links, reusing createBookkeepingTransactionModal — provenance (vendor, date, price, VAT, invoice links) works without mounting bookkeeping.
  • Bookkeeping surface drops the inventory section, SECONDARY_VIEWS entry, and inventory wiring.
  • src/surfaces/finance/inventory.js is registered in the deployed-asset manifest (backend/src/docs/frontend-assets.json), which the backend requires to serve /src/** files.

Verification

  • Unit: routing, inventory-nav, finance-surface (rewritten standalone-surface tests incl. record-dialog fetch), startup-orchestration, runtime-shell, bookkeeping suites, frontend-convergence + bookkeeping-production-frontend — all green.
  • Real Chromium at this commit, seeded MacBook purchase: sidebar click → /invertory with h1 "Inventory" and only Inventory highlighted; row click → record dialog with the original transaction; deep link renders standalone; back to Bookkeeping → only Bookkeeping highlighted, ledger renders. ALL FLOWS PASS (evidence in .tmp/inv-live-check-probe/).

…m Bookkeeping

/invertory resolved to a bookkeeping sub-view, so the sidebar lit both
Bookkeeping and Inventory at once and Inventory read as a child of the
ledger. Inventory is now its own workspace view and surface: the route
maps /invertory to view 'inventory', the nav button targets that view,
and a new inventory surface fetches the items and renders the original
ledger record in its own dialog without mounting bookkeeping. The
bookkeeping surface drops the inventory section, its SECONDARY_VIEWS
entry, and the sidebar nav ownership; the deployed-asset manifest
registers the new module.
@alexeygrigorev
alexeygrigorev merged commit 5d17ffa into main Nov 18, 2026
2 of 3 checks passed
@alexeygrigorev
alexeygrigorev deleted the inventory-standalone-surface branch November 18, 2026 14:48
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