feat(web): metadata tab + list filters + backfill endpoint (Phase 7) #147

Open
opened 2026-02-18 20:59:54 +00:00 by forbes · 0 comments
Owner

Add .kc metadata integration to the Silo web UI and the admin backfill endpoint, as specified in KC_SERVER.md Sections 7 and 8.

Depends on: #141 (Phase 1 -- metadata API)
Independent of: client/viewport development

Web UI Changes (Section 7)

Items Page -- Metadata Tab (Section 7.1)

Add a Metadata tab to the item detail panel (alongside Main, Properties, Revisions, BOM, Where Used). Displays the schema-driven form from GET /api/items/{pn}/metadata. Editable for users with editor role.

  • Show schema fields, lifecycle state badge, tags
  • Inline editing for fields with PUT /metadata write-back
  • Lifecycle transition dropdown with PATCH /lifecycle
  • Tag chips with add/remove via PATCH /tags

Items List -- Filters (Section 7.2)

Add filterable columns to the items list:

  • lifecycle_state column with filter dropdown
  • tags column with filter

Extend the search endpoint to support metadata-aware filtering:

GET /api/items?lifecycle=released&tag=aluminum
GET /api/items/search?q=bracket&lifecycle=draft

Approvals Page (Section 7.3)

New page accessible from top navigation (gated behind future approvals module). Lists all active ECOs with approval progress. This is a placeholder/scaffold -- full UI depends on Phase 5 (approvals API).

Backfill Endpoint (Section 8.2)

Admin-only endpoint to re-index metadata from existing .kc files:

POST /api/admin/reindex-metadata

Iterates all items with .kc files on disk, opens each ZIP, and runs the extraction pipeline. Idempotent -- safe to run multiple times. Returns count of items processed and any errors.

Implementation scope

Backend

  • Extend item list query to support lifecycle and tag filter params
  • Extend search endpoint with same filters
  • internal/api/admin_handlers.go -- reindex-metadata handler
  • Register admin route (admin auth required)

Frontend (web/)

  • New MetadataTab component for item detail
  • Add lifecycle_state and tags columns to items table
  • Filter controls for lifecycle and tags
  • Approvals page scaffold

Acceptance criteria

  • Metadata tab shows schema fields, lifecycle, tags for items with .kc metadata
  • Metadata tab shows empty/placeholder state for items without metadata
  • Fields are editable inline for editors
  • Items list can be filtered by lifecycle state and tags
  • Search supports lifecycle and tag parameters
  • POST /api/admin/reindex-metadata processes existing .kc files and populates item_metadata
  • Backfill is idempotent
Add .kc metadata integration to the Silo web UI and the admin backfill endpoint, as specified in [KC_SERVER.md](docs/KC_SERVER.md) Sections 7 and 8. **Depends on:** #141 (Phase 1 -- metadata API) **Independent of:** client/viewport development ## Web UI Changes (Section 7) ### Items Page -- Metadata Tab (Section 7.1) Add a **Metadata** tab to the item detail panel (alongside Main, Properties, Revisions, BOM, Where Used). Displays the schema-driven form from `GET /api/items/{pn}/metadata`. Editable for users with editor role. - Show schema fields, lifecycle state badge, tags - Inline editing for fields with PUT /metadata write-back - Lifecycle transition dropdown with PATCH /lifecycle - Tag chips with add/remove via PATCH /tags ### Items List -- Filters (Section 7.2) Add filterable columns to the items list: - `lifecycle_state` column with filter dropdown - `tags` column with filter Extend the search endpoint to support metadata-aware filtering: ``` GET /api/items?lifecycle=released&tag=aluminum GET /api/items/search?q=bracket&lifecycle=draft ``` ### Approvals Page (Section 7.3) New page accessible from top navigation (gated behind future approvals module). Lists all active ECOs with approval progress. This is a placeholder/scaffold -- full UI depends on Phase 5 (approvals API). ## Backfill Endpoint (Section 8.2) Admin-only endpoint to re-index metadata from existing .kc files: ``` POST /api/admin/reindex-metadata ``` Iterates all items with .kc files on disk, opens each ZIP, and runs the extraction pipeline. Idempotent -- safe to run multiple times. Returns count of items processed and any errors. ## Implementation scope ### Backend - Extend item list query to support `lifecycle` and `tag` filter params - Extend search endpoint with same filters - `internal/api/admin_handlers.go` -- reindex-metadata handler - Register admin route (admin auth required) ### Frontend (`web/`) - New MetadataTab component for item detail - Add lifecycle_state and tags columns to items table - Filter controls for lifecycle and tags - Approvals page scaffold ## Acceptance criteria - Metadata tab shows schema fields, lifecycle, tags for items with .kc metadata - Metadata tab shows empty/placeholder state for items without metadata - Fields are editable inline for editors - Items list can be filtered by lifecycle state and tags - Search supports lifecycle and tag parameters - POST /api/admin/reindex-metadata processes existing .kc files and populates item_metadata - Backfill is idempotent
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo#147