feat(silo): part registration dialog for unresolved BOM components #75

Open
opened 2026-02-09 00:16:42 +00:00 by forbes · 0 comments
Owner

Phase 3 — Part Registration Dialog for Unresolved BOM Components

Ref: docs/BOM_MERGE.md Phase 3 & Section 6, issue #68
Depends on: #73 (link extraction returns unresolved list)

Summary

When resolve_part_numbers() returns unresolved components (linked documents without a SiloItemId property), present a registration dialog so the user can create Silo items for them before they are included in the BOM.

Requirements

Registration Dialog (bom_sync.py or new bom_register_dialog.py)

  • Modal dialog shown after BOM sync when unresolved entries exist
  • For each unresolved component, display:
    • Document filename (from BomEntry.doc_path)
    • Auto-detected type: Assembly or Part (check if document contains an Assembly container)
    • Checkbox to include/skip
    • Register button per row
  • "Register Selected" and "Skip All" actions

Registration Flow (per component)

  • Use existing _client.create_item(schema, category, description, projects) — same API as Silo_New command
  • Pre-fill:
    • Schema: "kindred-rd" (hardcoded, same as Silo_New)
    • Category: Auto-select based on document type (Assembly -> assembly category, Part -> appropriate category from schema segments)
    • Description: Pre-fill from document label (doc.Label)
  • After creation, call set_silo_properties() on the tracked object with SiloItemId, SiloPartNumber, SiloRevision
  • Save the document to canonical path via _sync.save_to_canonical_path()

Post-Registration

  • Newly registered items are re-added to the resolved BOM entries
  • BOM merge continues with the updated resolved list
  • Skipped items remain visible as "unregistered" in the Activity pane (not silently dropped)
  • On next Silo_Commit, unresolved components are re-checked and prompted again

Existing Code to Reuse

  • Silo_New.Activated() in silo_commands.py — category selection dialog, project tagging, create_item() call
  • set_silo_properties() — sets SiloItemId, SiloPartNumber, SiloRevision on FreeCAD objects
  • _sync.save_to_canonical_path() — saves document to ~/projects/cad/ canonical location
  • _client.get_schema() — fetches category list for schema selection

Out of Scope

  • Link extraction (Phase 1, #73)
  • Diff/merge + Activity pane (Phase 2)
  • Web UI merge resolution (Phase 4)
## Phase 3 — Part Registration Dialog for Unresolved BOM Components Ref: `docs/BOM_MERGE.md` Phase 3 & Section 6, issue #68 Depends on: #73 (link extraction returns unresolved list) ### Summary When `resolve_part_numbers()` returns unresolved components (linked documents without a `SiloItemId` property), present a registration dialog so the user can create Silo items for them before they are included in the BOM. ### Requirements #### Registration Dialog (`bom_sync.py` or new `bom_register_dialog.py`) - Modal dialog shown after BOM sync when unresolved entries exist - For each unresolved component, display: - Document filename (from `BomEntry.doc_path`) - Auto-detected type: Assembly or Part (check if document contains an Assembly container) - Checkbox to include/skip - Register button per row - "Register Selected" and "Skip All" actions #### Registration Flow (per component) - Use existing `_client.create_item(schema, category, description, projects)` — same API as `Silo_New` command - Pre-fill: - **Schema:** `"kindred-rd"` (hardcoded, same as `Silo_New`) - **Category:** Auto-select based on document type (Assembly -> assembly category, Part -> appropriate category from schema segments) - **Description:** Pre-fill from document label (`doc.Label`) - After creation, call `set_silo_properties()` on the tracked object with `SiloItemId`, `SiloPartNumber`, `SiloRevision` - Save the document to canonical path via `_sync.save_to_canonical_path()` #### Post-Registration - Newly registered items are re-added to the resolved BOM entries - BOM merge continues with the updated resolved list - Skipped items remain visible as "unregistered" in the Activity pane (not silently dropped) - On next `Silo_Commit`, unresolved components are re-checked and prompted again #### Existing Code to Reuse - `Silo_New.Activated()` in `silo_commands.py` — category selection dialog, project tagging, `create_item()` call - `set_silo_properties()` — sets `SiloItemId`, `SiloPartNumber`, `SiloRevision` on FreeCAD objects - `_sync.save_to_canonical_path()` — saves document to `~/projects/cad/` canonical location - `_client.get_schema()` — fetches category list for schema selection ### Out of Scope - Link extraction (Phase 1, #73) - Diff/merge + Activity pane (Phase 2) - Web UI merge resolution (Phase 4)
forbes added the enhancement label 2026-02-09 00:16:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#75