feat(create): remaining viewers — dependencies, jobs, macros, approvals #272

Merged
forbes merged 1 commits from feat/remaining-viewers into main 2026-02-19 00:54:26 +00:00
Owner

Summary

Add the four remaining viewer widgets for Silo tree nodes. Each opens in an MDI subwindow on double-click.

Changes

Modified file:

  • silo_viewers.py — 4 new viewer classes + prefix-based factory routing

Viewers added:

SiloApprovalsViewer (silo/approvals.json)

  • ECO ID header with state badge (reuses Catppuccin _BADGE_STYLES)
  • Approver status cards: green check (approved), circle (pending), red X (rejected)
  • "Open in Silo Web UI" button (reads silo_instance from manifest)

SiloDependencyTable (silo/dependencies.json)

  • QTableView with columns: Label, Part Number, Rev, Qty, Local
  • Resolution check: scans open documents for matching part_uuid

SiloJobViewer (silo/jobs/*.yaml)

  • Monospace QPlainTextEdit with Edit/Lock toggle
  • Dirty tracking + Save button + unsaved-changes close guard

SiloMacroEditor (silo/macros/*.py)

  • Monospace QPlainTextEdit (always editable)
  • Run Now button (exec() in FreeCAD context, output to Report View)
  • Dirty tracking + Save button + unsaved-changes close guard

Factory enhancement:

  • _VIEWER_PREFIX_REGISTRY dict for prefix-based routing (silo/jobs/SiloJobViewer, silo/macros/SiloMacroEditor)

Closes kindred/silo-mod#41
Depends on #268, #269, #270

Checklist

  • Commit messages follow conventional commits (feat:, fix:, chore:, docs:, art:)
  • Code follows project style (clang-format for C++, black for Python)
  • Changes are tested locally
  • Documentation updated (if applicable)
## Summary Add the four remaining viewer widgets for Silo tree nodes. Each opens in an MDI subwindow on double-click. ## Changes **Modified file:** - `silo_viewers.py` — 4 new viewer classes + prefix-based factory routing **Viewers added:** ### SiloApprovalsViewer (`silo/approvals.json`) - ECO ID header with state badge (reuses Catppuccin `_BADGE_STYLES`) - Approver status cards: green check (approved), circle (pending), red X (rejected) - "Open in Silo Web UI" button (reads `silo_instance` from manifest) ### SiloDependencyTable (`silo/dependencies.json`) - `QTableView` with columns: Label, Part Number, Rev, Qty, Local - Resolution check: scans open documents for matching `part_uuid` ### SiloJobViewer (`silo/jobs/*.yaml`) - Monospace `QPlainTextEdit` with Edit/Lock toggle - Dirty tracking + Save button + unsaved-changes close guard ### SiloMacroEditor (`silo/macros/*.py`) - Monospace `QPlainTextEdit` (always editable) - Run Now button (`exec()` in FreeCAD context, output to Report View) - Dirty tracking + Save button + unsaved-changes close guard **Factory enhancement:** - `_VIEWER_PREFIX_REGISTRY` dict for prefix-based routing (`silo/jobs/` → `SiloJobViewer`, `silo/macros/` → `SiloMacroEditor`) ## Related Issues Closes kindred/silo-mod#41 Depends on #268, #269, #270 ## Checklist - [x] Commit messages follow [conventional commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `chore:`, `docs:`, `art:`) - [x] Code follows project style (clang-format for C++, black for Python) - [x] Changes are tested locally - [ ] Documentation updated (if applicable)
forbes added 1 commit 2026-02-19 00:46:26 +00:00
feat(create): remaining viewers — dependencies, jobs, macros, approvals (#41)
All checks were successful
Build and Test / build (pull_request) Successful in 31m3s
bb14d7b0ef
Add four viewer widgets for the remaining Silo tree node types:

- SiloApprovalsViewer: ECO approval status cards with colored status
  icons, state badge, and Open in Silo Web UI button
- SiloDependencyTable: QTableView with resolution status (checks open
  documents for matching part_uuid)
- SiloJobViewer: YAML source editor with Edit/Lock toggle, monospace
  font, dirty tracking, and unsaved-changes guard
- SiloMacroEditor: Python source editor with Run Now (exec in FreeCAD
  context), Save button, and dirty tracking

Also extends the viewer factory with prefix-based routing for
silo/jobs/*.yaml and silo/macros/*.py entries.

Closes #41
forbes merged commit 0ea2622a73 into main 2026-02-19 00:54:26 +00:00
forbes deleted branch feat/remaining-viewers 2026-02-19 00:54:28 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#272