Commit Graph

45648 Commits

Author SHA1 Message Date
forbes
f6fa2f0d2c fix(editing-context): trust parentId chain without re-checking ancestor match()
Parent match() functions are designed for flat priority resolution and
may not return true when a more specific child is active (e.g.
assembly.idle checks getActivePartObject() which may not return the
assembly during edit mode). The parentId declaration is the author's
assertion of structural containment — the leaf already matched, so
we walk the full chain unconditionally.
2026-03-04 16:16:05 -06:00
forbes
74b0073327 feat(editing-context): hierarchical context system with stack, guards, and breadcrumb injection (#385, #386, #387)
Some checks failed
Build and Test / build (pull_request) Has been cancelled
Replaces the flat context model with a tree-structured hierarchy:

- ContextDefinition gains parentId field for declaring parent-child
  relationships between contexts
- Resolver builds a context stack by walking parentId links from
  leaf to root, verifying each ancestor matches current state
- Breadcrumb is now auto-built from the stack — each level
  contributes its expanded label and color, replacing all hardcoded
  special cases
- EditingContext gains stack field (QStringList, root to leaf)

Transition guards (#386):
- addTransitionGuard() / removeTransitionGuard() on resolver
- Guards run synchronously before applyContext(); first rejection
  cancels the transition and emits contextTransitionBlocked signal
- Full SDK/pybind11/Python bindings

Breadcrumb injection (#387):
- injectBreadcrumb() / removeBreadcrumbInjection() on resolver
- Addons can append segments to any context's breadcrumb display
- Active only when the target context is in the current stack
- Full SDK/pybind11/Python bindings

Built-in parent assignments:
- partdesign.body → partdesign.workbench
- partdesign.feature → partdesign.body
- partdesign.in_assembly → assembly.edit
- sketcher.edit → partdesign.body
- assembly.idle → assembly.workbench
- assembly.edit → assembly.idle
- Workbench-level and root contexts have no parent

SDK surface:
- Types.h: parentId on ContextDef, stack on ContextSnapshot
- SDKRegistry: guard/injection delegation, snapshotFromGui helper
- kcsdk_py: parent_id param, context_stack(), guard/injection bindings
- kindred_sdk: context_stack(), add/remove_transition_guard(),
  inject/remove_breadcrumb_injection(), parent_id on register_context()

Closes #385, closes #386, closes #387
2026-03-04 14:23:45 -06:00
6ac0c4af54 Merge pull request 'feat(sdk): addon load timing diagnostics — addon_diagnostics() (#390)' (#402) from feat/sdk-addon-diagnostics into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #402
2026-03-04 19:51:35 +00:00
forbes
2127d2c904 feat(sdk): addon load timing diagnostics — addon_diagnostics() (#390)
Some checks failed
Build and Test / build (pull_request) Has been cancelled
Add kindred_sdk.addon_diagnostics() returning per-addon load state,
timing, and error info as a list of dicts. Reads name, state,
load_time_ms, and error from AddonManifest via AddonRegistry.

Add _print_load_summary() to addon_loader.py that prints a formatted
summary table to the console after each load phase (Init.py and
InitGui.py), replacing interleaved individual log lines with a
consolidated view.

Closes #390
2026-03-04 13:50:37 -06:00
844dab8875 Merge pull request 'feat(sdk): addon asset path resolution — addon_resource() (#389)' (#401) from feat/sdk-addon-resource into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #401
2026-03-04 19:47:48 +00:00
forbes
85ae0effc9 feat(sdk): addon asset path resolution — addon_resource() (#389)
Some checks failed
Build and Test / build (pull_request) Has been cancelled
Add kindred_sdk.addon_resource(name, relative_path) that resolves
bundled asset paths relative to an addon's root directory. Looks up
the addon manifest from AddonRegistry for the install root, joins
the relative path, and validates existence on disk.

Raises LookupError if the addon is not registered, FileNotFoundError
if the resolved path does not exist.

Closes #389
2026-03-04 13:46:25 -06:00
e0653ed2a9 Merge pull request 'feat(sdk): context introspection — available_contexts and context_history (#383)' (#400) from feat/sdk-context-introspection into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #400
2026-03-04 19:44:02 +00:00
forbes
519d5b4436 feat(sdk): add context introspection — available_contexts and context_history (#383)
All checks were successful
Build and Test / build (pull_request) Successful in 25m9s
C++ layer:
- EditingContextResolver::registeredContexts() returns static metadata
  (id, labelTemplate, color, priority) for all registered contexts
- SDKRegistry::registeredContexts() wraps with Qt-to-std conversion
- kcsdk.available_contexts() pybind11 binding returns list of dicts

Python layer:
- kindred_sdk.available_contexts() wraps kcsdk binding
- kindred_sdk.context_history(limit=10) returns recent transitions
  from a 50-entry ring buffer tracked in lifecycle.py, with timestamps

Closes #383
2026-03-04 13:42:34 -06:00
73d14b82ba Merge pull request 'feat(sdk): add context lifecycle callbacks (#381)' (#399) from feat/sdk-lifecycle-callbacks into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #399
2026-03-04 19:34:52 +00:00
forbes
d2ec22f5ff feat(sdk): add context lifecycle callbacks (#381)
All checks were successful
Build and Test / build (pull_request) Successful in 29m7s
Expose EditingContextResolver::contextChanged to Python addons via
two-layer design:

C++ layer:
- SDKRegistry::onContextChanged() stores callbacks and lazily connects
  to the Qt signal on first registration
- pybind11 binding kcsdk.on_context_changed() wraps Python callables
  with GIL-safe invocation

Python layer:
- kindred_sdk.on_context_enter(context_id, callback) subscribes to
  context activation ("*" wildcard supported)
- kindred_sdk.on_context_exit(context_id, callback) subscribes to
  context deactivation
- Internal tracking of previous context derives enter/exit transitions
- Emits context.enter / context.exit on the SDK event bus

Closes #381
2026-03-04 10:01:00 -06:00
9f71d0efe6 Merge pull request 'feat(sdk): add event bus for inter-addon communication (#382)' (#398) from feat/sdk-event-bus into main
All checks were successful
Build and Test / build (push) Successful in 29m41s
Reviewed-on: #398
2026-03-04 15:48:17 +00:00
forbes
54b926a925 feat(sdk): add event bus for inter-addon communication (#382)
All checks were successful
Build and Test / build (pull_request) Successful in 28m56s
New module kindred_sdk/events.py provides lightweight publish-subscribe
so addons can signal each other without direct imports.

New public API:
- sdk.on(event, handler) — subscribe to a named event
- sdk.off(event, handler) — unsubscribe
- sdk.emit(event, data) — publish event with dict payload

Pure Python, synchronous dispatch, snapshot-safe iteration.
Handlers that raise are logged and skipped without breaking the chain.
2026-03-04 09:47:43 -06:00
ba1b612628 Merge pull request 'feat(sdk): add addon registry wrappers to kindred_sdk (#384)' (#397) from feat/sdk-registry-wrappers into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #397
2026-03-04 15:37:29 +00:00
forbes
8c5d259e79 feat(sdk): add addon registry wrappers to kindred_sdk (#384)
All checks were successful
Build and Test / build (pull_request) Successful in 29m35s
New module kindred_sdk/registry.py wraps FreeCAD.KindredAddons so
addons use a stable SDK import instead of reaching into FreeCAD
internals directly.

New public API:
- sdk.is_addon_loaded(name) — boolean check
- sdk.addon_version(name) — version string or None
- sdk.loaded_addons() — list of loaded addon names in load order
2026-03-04 09:36:17 -06:00
0ac0d4dd8e Merge pull request 'chore(git): normalize author identities with .mailmap' (#380) from chore/git-identity-cleanup into main
Some checks failed
Build and Test / build (push) Successful in 30m2s
Sync Silo Server Docs / sync (push) Failing after 49s
Reviewed-on: #380
2026-03-03 20:22:13 +00:00
forbes
9ca8809b55 chore(git): normalize author identities with .mailmap
All checks were successful
Build and Test / build (pull_request) Successful in 28m58s
Add .mailmap to parent repo and all submodules (silo, gears, datums,
solver) to normalize historical author/committer display.

Maps stale identities (forbes-0023, josephforbes23, Zoe Forbes, admin)
and old emails to: forbes <contact@kindred-systems.com>
2026-03-03 14:19:20 -06:00
d84049b905 Merge pull request 'docs: comprehensive documentation refresh' (#379) from docs/user-docs-refresh into main
Some checks failed
Deploy Docs / build-and-deploy (push) Failing after 46s
Build and Test / build (push) Has been cancelled
Reviewed-on: #379
2026-03-03 19:56:15 +00:00
forbes
7f02fd182e docs: comprehensive documentation refresh — remove stale references, add missing content
All checks were successful
Build and Test / build (pull_request) Successful in 24m46s
Root documentation:
- README.md: add Datums description, update addon load order and SDK references,
  fix project structure tree, update issue reporting guidance
- CONTRIBUTING.md: update submodule table (remove ztools, add gears/datums/solver),
  fix QSS guidance (single canonical source, not three copies)
- docs/ARCHITECTURE.md: update bootstrap flow (5 addons, split deferred timers
  between Create core and Silo addon), update load order and source layout
- docs/COMPONENTS.md: add Datums and Solver sections, update Gears description,
  fix Silo origin registration reference
- docs/KNOWN_ISSUES.md: create missing file referenced by CLAUDE.md and CONTRIBUTING.md
- docs/INTEGRATION_PLAN.md: update layer 5 diagram, fix load order references,
  update Phase 6 install rules, fix Layer 2/3/5 descriptions
- docs/OVERVIEW.md: add datums submodule entry
- docs/UPSTREAM.md: update Phase 1 directory table and Phase 4 submodule list

mdBook documentation (docs/src/):
- SUMMARY.md: replace dead architecture/ links with existing reference pages,
  remove deleted silo-server files, add new silo-server pages
- introduction.md: rewrite — replace ztools with current addons (Silo, Gears,
  Datums, KCSDK), update version to v0.1.5/FreeCAD 1.2.0
- guide/getting-started.md: update first-run addon list
- guide/installation.md: update verification console output
- guide/workbenches.md: rewrite — replace ztools with Gears, Datums, Solver
- guide/building.md: update submodule table, fix error message guidance
- development/contributing.md: fix scope example and issue reporting
- development/repo-structure.md: rewrite — add SDK, datums, gears, solver,
  reference/ folder; update submodule and key files tables
- development/writing-an-addon.md: fix priority range table
- reference/create-module-bootstrap.md: rewrite — reflect addon_loader system,
  split deferred timers between Create core and Silo addon
- reference/datum-creator.md: update from ZTools to datums addon paths and naming
- reference/glossary.md: add KCSDK entry, update FreeCAD version, remove ztools
  entry, update repository URLs table
2026-03-03 13:52:53 -06:00
ce2da47d5b Merge pull request 'docs: update CLAUDE.md with current repository context' (#378) from docs/claude-md-update into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #378
2026-03-03 19:43:16 +00:00
forbes
5336cde0de docs: update CLAUDE.md with current repository context
All checks were successful
Build and Test / build (pull_request) Successful in 25m3s
- Update project overview: five addon modules, KCSDK C++ layer
- Add KCSDK C++ architecture section (SDK/, IPanelProvider, ThemeEngine, etc.)
- Update repository structure tree (SDK/, datums, gears, reference/ for archived addons)
- Update addon load order: sdk(0) → solver(10) → gears(40) → datums(45) → silo(60)
- Update deferred init: Create core now only handles kc_format + update checker
- Add detailed Gears, Datums, Solver addon module descriptions
- Update Silo section to reflect self-contained deferred setup
- Replace ztools/quicknav references with datums/gears/sdk throughout
- Update submodules table (remove archived, add gears/datums)
- Update commit scopes list
- Update known issues (remove stale ztools references, add archived addons note)
- Point editing context and origin APIs to kindred_sdk wrappers
2026-03-03 13:42:20 -06:00
53f39d6368 Merge pull request 'docs: update server docs' (#377) from fix/rattler-build-submodules into main
Some checks are pending
Deploy Docs / build-and-deploy (push) Successful in 36s
Build and Test / build (push) Has started running
Reviewed-on: #377
2026-03-03 19:36:39 +00:00
forbes
ceaa3acffe docs: update server docs
Some checks failed
Build and Test / build (pull_request) Failing after 2m18s
2026-03-03 13:35:35 -06:00
95142a0b0a Merge pull request 'fix(ci): clone submodule content in rattler-build package' (#376) from fix/rattler-build-submodules into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #376
2026-03-03 14:30:16 +00:00
79e2929cc1 Merge pull request 'chore(datums): convert datums addon to submodule' (#375) from chore/datums-submodule into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #375
2026-03-03 14:29:47 +00:00
forbes
784d172a61 fix(ci): clone submodule content in rattler-build package
Some checks failed
Build and Test / build (pull_request) Has been cancelled
rattler-build's source.path copy does not include submodule contents —
directories like mods/silo/, mods/solver/, mods/gears/, and mods/datums/
end up empty in the work directory, causing cmake --install to fail
when it tries to install files from those paths.

Add a clone_if_empty helper to build.sh that detects empty submodule
directories and shallow-clones them from their remotes before CMake
runs. Add git to build requirements in recipe.yaml.

This fixes the release build (AppImage) failure where cmake --install
failed at the silo addon install step after successfully installing
the silo tree-node icons from src/Mod/Create/resources/.
2026-03-03 08:28:17 -06:00
forbes
3f688873c6 chore(datums): convert datums addon to submodule
Some checks failed
Build and Test / build (pull_request) Has been cancelled
Convert mods/datums/ from tracked files to a git submodule pointing
to https://git.kindred-systems.com/kindred/datums.git (branch: main).

Follows the same submodule pattern as silo, solver, and gears.
The datums remote repo was initialized from the existing tracked files
with the package.xml repository URL updated to point to the new repo.

CMake install targets in src/Mod/Create/CMakeLists.txt continue to
work unchanged since the files remain at the same paths.
2026-03-03 08:27:31 -06:00
c60b4dbee1 Merge pull request 'chore(silo): add root package.xml and migrate setup to silo addon (#373)' (#374) from chore/silo-sdk-standardize into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #374
2026-03-03 14:25:45 +00:00
forbes
4d94857883 chore(silo): add root package.xml and migrate setup to silo addon (#373)
Some checks failed
Build and Test / build (pull_request) Has been cancelled
Update silo submodule to include root-level package.xml, Init.py, and
InitGui.py following the standard addon layout used by sdk, gears,
datums, and solver.

Move five Silo-specific deferred setup functions from
src/Mod/Create/InitGui.py into the silo addon's own InitGui.py:
- Document observer registration (600ms)
- Auth dock panel via kindred_sdk.register_dock_panel() (2000ms)
- First-start settings check (3000ms)
- Activity dock panel via kindred_sdk.register_dock_panel() (4000ms)
- Remove duplicate origin registration (was 1500ms, already done in
  SiloWorkbench.Initialize())

Update CMake install targets to include root-level silo files.

Create core InitGui.py now only handles kc_format (500ms) and
update_checker (10000ms).
2026-03-03 08:24:45 -06:00
4e1e2ca46d Merge pull request 'fix(silo): pull assembly dependencies on all open paths (#337)' (#371) from fix/silo-assembly-deps into main
Some checks failed
Build and Test / build (push) Failing after 1m42s
Sync Silo Server Docs / sync (push) Successful in 35s
Reviewed-on: #371
2026-03-02 19:22:29 +00:00
0a86a93e1b fix(silo): update silo submodule — pull assembly deps on all open paths (#337)
Some checks failed
Build and Test / build (pull_request) Failing after 1m47s
2026-03-02 13:14:10 -06:00
10dd66fc29 Merge pull request 'feat(datums): add unified datum creator addon' (#370) from feat/unified-datum-creator into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #370
2026-03-02 19:04:08 +00:00
177a5eec67 Merge pull request 'docs: remove stale documentation and update for post-ztools architecture' (#369) from docs/stale-doc-cleanup into main
Some checks failed
Build and Test / build (push) Has been cancelled
Deploy Docs / build-and-deploy (push) Successful in 43s
Reviewed-on: #369
2026-03-02 19:03:50 +00:00
e160b07b00 Merge pull request 'feat(sdk): KCSDK v1.0.0 — complete SDK implementation (#346)' (#366) from feat/kcsdk-finalize into main
Some checks failed
Build and Test / build (push) Has been cancelled
Reviewed-on: #366
2026-03-02 19:03:15 +00:00
470e6f3cf6 Merge remote-tracking branch 'origin/main' into feat/kcsdk-finalize
All checks were successful
Build and Test / build (pull_request) Successful in 29m7s
# Conflicts:
#	mods/sdk/kindred_sdk/context.py
#	mods/sdk/kindred_sdk/dock.py
#	mods/sdk/kindred_sdk/menu.py
#	mods/sdk/kindred_sdk/origin.py
#	mods/sdk/kindred_sdk/toolbar.py
2026-03-02 12:32:48 -06:00
e3de2c0e71 feat(datums): add unified datum creator addon
All checks were successful
Build and Test / build (pull_request) Successful in 29m22s
Introduces mods/datums/ — a standalone addon that replaces the three
stock PartDesign datum commands (Plane, Line, Point) with a single
unified Create_DatumCreator command.

Features:
- 16 smart creation modes (7 plane, 4 axis, 5 point)
- Auto-detection engine: selects best mode from geometry selection
- Mode override combo for manual selection
- Dynamic parameter UI (offset, angle, position, XYZ)
- Datums_Type/Params/SourceRefs metadata for edit panel
- Edit panel with real-time parameter updates via AttachExtension
- Catppuccin Mocha themed plane styling via SDK theme tokens
- Injected into partdesign.body and partdesign.feature contexts

Also adds CMake install targets for gears and datums addons.

Ported from archived ztools with key changes:
- Property prefix: ZTools_ -> Datums_
- No document-level datums (Body-only)
- PySide -> PySide6
- SDK integration (register_command, inject_commands, get_theme_tokens)
2026-03-02 12:15:18 -06:00
de1b79255c docs: remove stale documentation and update for post-ztools architecture
All checks were successful
Build and Test / build (pull_request) Successful in 28m56s
Remove critically stale docs:
- docs/REPOSITORY_STATE.md — snapshot from 2026-01-31, all data outdated
- docs/MULTI_USER_CLIENT.md — duplicate of DAG_CLIENT_INTEGRATION.md
- docs/src/guide/ztools.md — describes removed addon
- docs/KNOWN_ISSUES.md — replaced by Gitea issue tracker

Update docs for ztools removal (#344), gears addition, and KCSDK progress:
- OVERVIEW.md: fix version (v0.1.5), FreeCAD base (1.2.0), submodule table
- ARCHITECTURE.md: replace ztools with gears in bootstrap flow and source layout
- COMPONENTS.md: remove ztools section, add gears, remove stale missing-icons note
- INTEGRATION_PLAN.md: mark Phase 7 #353-#356 as DONE, update Layer 5 diagram
- README.md: update project structure, load order, feature descriptions
- CI_CD.md: add context for disabled macOS/Windows builds (#164)
- SUMMARY.md: remove ztools guide from mdBook navigation
2026-03-02 11:48:37 -06:00
b0621f9731 Merge pull request 'chore: native repository conversion — remove FreeCAD/GitHub artifacts (#367)' (#368) from chore/repo-cleanup into main
All checks were successful
Build and Test / build (push) Successful in 28m57s
Reviewed-on: #368
2026-03-02 14:08:39 +00:00
forbes
1b01762a1c chore: rebrand XDGData and icon installs to Kindred Create (#367)
All checks were successful
Build and Test / build (pull_request) Successful in 29m26s
- Replace org.freecad.FreeCAD.desktop with kindred-create.desktop
- Replace org.freecad.FreeCAD.metainfo.xml.in with Kindred Create
  metainfo (new description, Kindred URLs, kindred-create app ID)
- Replace org.freecad.FreeCAD.xml with kindred-create.xml (adds .kc
  MIME type alongside .fcstd)
- Replace FreeCAD.thumbnailer.in with kindred-create.thumbnailer.in
- Update XDGData/CMakeLists.txt for new filenames
- Update src/Gui/CMakeLists.txt icon installs: use kindred-create
  icons from resources/ (all sizes 16-512 + SVG) instead of renaming
  freecad-icon-*.png to org.freecad.FreeCAD.png
- Update freecad-thumbnailer.in default icon to kindred-create.png
- Update AppImage create_bundle.sh to use kindred-create desktop/icon

Remaining org.freecad.FreeCAD references are macOS bundle IDs
(MainWindow.cpp, MacAppBundle/) and packaging fallbacks — separate
rebranding tasks.
2026-03-02 08:06:36 -06:00
forbes
fa9c9ba761 chore: native repository conversion — remove FreeCAD/GitHub artifacts (#367)
All checks were successful
Build and Test / build (pull_request) Successful in 29m36s
- Delete .github/ directory (60 files, ~4600 lines of unused GitHub
  Actions workflows, FreeCAD-branded issue/PR templates, problem
  matchers, scripts, and images)
- Delete .packit.yaml (Fedora COPR packaging, unused)
- Delete SECURITY.md (FreeCAD-specific security policy)
- Update .pre-commit-config.yaml to remove .github file pattern
- Update .gitignore to remove .github/ whitelist
- Rewrite CODE_OF_CONDUCT.md for Kindred Create community
- Rewrite PRIVACY_POLICY.md covering Silo integration, update
  checker, origin system, and local storage

Gitea equivalents (.gitea/workflows/, .gitea/ISSUE_TEMPLATE/,
.gitea/pull_request_template.md) are already in place.

Closes #367
2026-03-02 08:01:38 -06:00
forbes
79f69e2856 feat(sdk): remove fallbacks, add deprecation warnings, bump v1.0.0 (#357)
All checks were successful
Build and Test / build (pull_request) Successful in 28m54s
- Bump SDK_VERSION to 1.0.0 in version.py and package.xml
- Remove <pure_python> tag from package.xml (kcsdk is C++)
- Remove all FreeCADGui.* fallback paths in context.py, dock.py,
  toolbar.py, menu.py; require kcsdk module
- Remove query fallbacks in origin.py (keep register/unregister
  which still need FreeCADGui.addOrigin/removeOrigin)
- Add deprecation warnings to 11 superseded FreeCADGui methods
  in ApplicationPy.cpp (not addOrigin/removeOrigin)
- All 39 Tier 1 tests pass
2026-03-01 14:42:00 -06:00
forbes
a6a6cefc16 feat(sdk): add status bar widget wrapper and origin query bindings (#356)
register_status_widget(): pure Python wrapper that adds a live widget
to the main window status bar with context menu discoverability.

Origin query bindings (kcsdk.list_origins, active_origin, get_origin,
set_active_origin): thin C++ forwarding to OriginManager with Python
wrappers using kcsdk-first routing.

IOriginProvider and IStatusBarProvider C++ interfaces dropped — existing
FileOrigin stack is already complete, and status bar widgets don't need
C++ lifecycle management.
2026-03-01 14:42:00 -06:00
forbes
747c458e23 feat(sdk): add IMenuProvider interface and register_command wrapper (#355)
IMenuProvider: declarative menu placement with optional context awareness.
C++ interface with pybind11 bindings + GIL-safe holder. SDKMenuManipulator
(shared WorkbenchManipulator) injects menu items on workbench switch,
filtered by editing context when context_ids() is non-empty.

register_command(): thin Python wrapper around FreeCADGui.addCommand()
that standardizes the calling convention within the SDK contract.

Python wrappers (kindred_sdk.register_menu, kindred_sdk.register_command)
use kcsdk-first routing with FreeCADGui fallback.
2026-03-01 14:42:00 -06:00
forbes
4eb643a26f feat(sdk): add IToolbarProvider interface to kcsdk (#354) 2026-03-01 14:42:00 -06:00
forbes
ab4054eb9e docs(sdk): add KCSDK API reference and addon developer guide
- docs/src/reference/kcsdk-python.md: full kcsdk Python API reference
- docs/src/development/writing-an-addon.md: step-by-step addon guide
- docs/INTEGRATION_PLAN.md: add Phase 7 KCSDK section
- docs/ARCHITECTURE.md: add src/Gui/SDK/ to source layout
- docs/src/SUMMARY.md: add new pages to mdBook navigation
2026-03-01 14:42:00 -06:00
forbes
5f8557fc83 fix(editing-context): resolve initial context on construction
EditingContextResolver constructor did not call refresh(), leaving
d->current as a default empty EditingContext. When BreadcrumbToolBar
queried currentContext() on creation, it received an empty context
with no breadcrumb segments, causing the navbar to appear blank.

Add refresh() at end of constructor so the initial state is resolved
before any View3DInventor queries it.
2026-03-01 14:42:00 -06:00
forbes
64644eb623 feat(sdk): add panel provider and theme engine to kcsdk (#352, #353)
- IPanelProvider: abstract interface for dock panels with PySide widget bridging
- PyIPanelProvider/PyProviderHolder: pybind11 trampoline + GIL-safe holder
- WidgetBridge: PySide QWidget → C++ QWidget* conversion via Shiboken
- SDKRegistry: panel registration, creation, and lifecycle management
- ThemeEngine: C++ singleton with minimal YAML parser, palette cache,
  getColor/allTokens/formatQss matching Python Palette API
- kcsdk bindings: DockArea, PanelPersistence enums, panel functions,
  theme_color, theme_tokens, format_qss, load_palette
- dock.py: kcsdk delegation with FreeCADGui fallback
- theme.py: kcsdk delegation with Python YAML fallback
2026-03-01 14:42:00 -06:00
forbes
60c0489d73 feat(sdk): migrate editing context API to kcsdk (#351)
Add context/overlay registration, injection, query, and refresh to the
KCSDK C++ library and kcsdk pybind11 module.

New files:
- src/Gui/SDK/Types.h — ContextDef, OverlayDef, ContextSnapshot structs
  (plain C++, no Qt in public API)

Modified:
- src/Gui/SDK/SDKRegistry.h/.cpp — register_context/overlay, unregister,
  inject_commands, current_context, refresh (delegates to
  EditingContextResolver with std↔Qt conversion)
- src/Gui/SDK/CMakeLists.txt — add Types.h, link FreeCADGui
- src/Gui/SDK/bindings/kcsdk_py.cpp — bind all context functions with
  GIL-safe match callable wrapping and dict-based snapshot return
- mods/sdk/kindred_sdk/context.py — try kcsdk first, fall back to
  FreeCADGui for backwards compatibility
2026-03-01 14:42:00 -06:00
forbes
63e591a626 feat(sdk): scaffold KCSDK library + kcsdk pybind11 module (#350)
Add the KCSDK C++ shared library and kcsdk pybind11 module, establishing
the build infrastructure for the C++-backed addon SDK.

New files:
- src/Gui/SDK/KCSDKGlobal.h — DLL export macros
- src/Gui/SDK/SDKRegistry.h/.cpp — empty singleton with API_VERSION_MAJOR=1
- src/Gui/SDK/CMakeLists.txt — builds KCSDK shared library
- src/Gui/SDK/bindings/kcsdk_py.cpp — pybind11 module exposing version + available()
- src/Gui/SDK/bindings/CMakeLists.txt — builds kcsdk pybind11 module

Modified:
- src/Gui/CMakeLists.txt — add_subdirectory(SDK)

Verified: import kcsdk; kcsdk.API_VERSION_MAJOR == 1; kcsdk.available() == []
2026-03-01 14:42:00 -06:00
9778d0dd1b Merge pull request 'feat(sdk): add status bar widget wrapper and origin query bindings (#356)' (#364) from feat/gears-addon into main
All checks were successful
Build and Test / build (push) Successful in 29m22s
Sync Silo Server Docs / sync (push) Successful in 37s
Reviewed-on: #364
2026-03-01 20:16:45 +00:00
forbes
ab8519c272 feat(sdk): add status bar widget wrapper and origin query bindings (#356)
All checks were successful
Build and Test / build (pull_request) Successful in 29m13s
register_status_widget(): pure Python wrapper that adds a live widget
to the main window status bar with context menu discoverability.

Origin query bindings (kcsdk.list_origins, active_origin, get_origin,
set_active_origin): thin C++ forwarding to OriginManager with Python
wrappers using kcsdk-first routing.

IOriginProvider and IStatusBarProvider C++ interfaces dropped — existing
FileOrigin stack is already complete, and status bar widgets don't need
C++ lifecycle management.
2026-03-01 14:13:31 -06:00