Epic: Unified File Origin System #8
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Replace the current dual command system (standard FreeCAD file operations + Silo workbench commands) with a unified origin-based architecture. Users select their file origin (Local Files, Silo instances) from a dropdown, and all file operations work contextually based on that selection.
Key Insight: Origins don't change where files are stored—all documents are always saved locally. Origins change the workflow and identity model:
Problem Statement
Currently, Kindred Create has two parallel file operation systems:
Std_New,Std_Open,Std_Save→ local filesystemSilo_New,Silo_Open,Silo_Save→ database + MinIO storage (with local cache)This creates several UX issues:
Silo_ToggleModebutton doesn't make it obvious which "mode" is activeProposed Solution
Origin Selector Dropdown
A compact toolbar widget in the top-left that determines the workflow for file operations:
Key Behavioral Differences
SiloPartNumberproperty)Silo's Hybrid Local-Remote Model
Silo documents are always stored locally in
~/projects/cad/{category}/{part_number}_{desc}.FCStd. The database and MinIO provide:This means:
SiloPartNumberproperty, not file pathDynamic Toolbar
When a Silo origin is selected, additional Silo-specific commands appear:
When Local Files is selected, these commands are hidden.
Mixed Origin Workflows
Since all files are local, "mixed origin" means:
Multi-Instance Support
Users can configure multiple Silo instances with nicknames:
Benefits
Implementation Phases
Phase 1: Core Architecture
Phase 2: Command Integration
Phase 3: Enhanced Features
Migration Path
Silo_ToggleModepreferences migrate automaticallySilo_*commands remain for backwards compatibility (delegate to OriginManager)Design Principles
All phases complete. Closing with code references:
Phase 1 — Core Architecture:
src/Gui/FileOrigin.h/.cpp— Origin abstraction layer + LocalFileOrigin (#9, #10)src/Gui/OriginManager.h/.cpp— Singleton origin manager (#9)src/Gui/FileOriginPython.h/.cpp— Python wrapper for Silo adapter (#11)Phase 2 — Command Integration:
src/Gui/CommandDoc.cpp:83-119,650-805— Std_New/Open/Save/SaveAs delegate to current origin (#12)src/Gui/OriginSelectorWidget.h/.cpp— Toolbar dropdown widget (#13)src/Gui/CommandOrigin.cpp— Origin_Commit/Pull/Push/Info/BOM commands (#14)src/Gui/Action.cpp:1476-1493— OriginSelectorAction toolbar integrationPhase 3 — Enhanced Features:
src/Gui/OriginManagerDialog.h/.cpp— Multi-instance config UI (#15)src/Gui/MDIView.cpp:520-534— Document origin display in window title (#16)src/Gui/CommandDoc.cpp:780-804— Mixed origin Save As workflows (#17)All files registered in
src/Gui/CMakeLists.txt. Sub-issues #9–#17 all implemented.