feat(context): hierarchical context model with parent_id and context_stack #385
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?
Summary
Replace the flat priority-based context model with a hierarchical one that reflects real editing state nesting (e.g., sketch inside body inside assembly).
Current state (MISSING)
ContextDefinitionhas noparent_idfield.EditingContextResolverresolves to exactly one active context via priority. Breadcrumb segments display a visual hierarchy (Part > Body > Sketch > [editing]) but this is hardcoded display logic inBreadcrumbToolBar, not a queryable stack.Proposed design
parent_idparameter onregister_context()— declares that this context can only activate as a child of anothersdk.context_stack()— returns the active hierarchy as a list, e.g.["assembly.idle", "partdesign.body", "sketcher.edit"]Implementation notes
parent_idfield toContextDefinitionstruct inEditingContext.hEditingContextResolver::resolve()to build a stack, not a single resultEditingContextstruct gains astackfield (QStringList of context IDs)BreadcrumbToolBar::buildSegments()reads from stack instead of hardcoded logicparent_idparam toregister_context(), addcontext_stack()Roadmap
v0.2.0 — Context System