feat(context): breadcrumb customization — addon-injected segments #387

Open
opened 2026-03-03 23:03:09 +00:00 by forbes · 0 comments
Owner

Summary

Allow addons to contribute additional segments to the breadcrumb display without owning the entire context.

Current state (MISSING)

BreadcrumbToolBar builds segments entirely from the EditingContext struct. No public API for addons to inject or append segments. segmentClicked() calls resetEdit() with no addon hooks.

Proposed API

import kindred_sdk as sdk

sdk.inject_breadcrumb("partdesign.body", ["Silo: locked"], ["#f38ba8"])
  • Segments are additive; the context owner's segments come first
  • Per-segment colors follow existing pattern (hex strings)
  • Injections are active only while the target context is active

Implementation notes

  • Add injectBreadcrumb(contextId, segments, colors) to EditingContextResolver
  • Store injections as a map of context_id -> [(segments, colors)]
  • BreadcrumbToolBar::buildSegments() appends injected segments after the context's own
  • Python SDK: inject_breadcrumb() / remove_breadcrumb_injection() in kindred_sdk/context.py
  • Consider: custom click handlers for injected segments (stretch goal)

Roadmap

v0.2.0 — Context System

## Summary Allow addons to contribute additional segments to the breadcrumb display without owning the entire context. ## Current state (MISSING) `BreadcrumbToolBar` builds segments entirely from the `EditingContext` struct. No public API for addons to inject or append segments. `segmentClicked()` calls `resetEdit()` with no addon hooks. ## Proposed API ```python import kindred_sdk as sdk sdk.inject_breadcrumb("partdesign.body", ["Silo: locked"], ["#f38ba8"]) ``` - Segments are additive; the context owner's segments come first - Per-segment colors follow existing pattern (hex strings) - Injections are active only while the target context is active ## Implementation notes - Add `injectBreadcrumb(contextId, segments, colors)` to `EditingContextResolver` - Store injections as a map of `context_id -> [(segments, colors)]` - `BreadcrumbToolBar::buildSegments()` appends injected segments after the context's own - Python SDK: `inject_breadcrumb()` / `remove_breadcrumb_injection()` in `kindred_sdk/context.py` - Consider: custom click handlers for injected segments (stretch goal) ## Roadmap v0.2.0 — Context System
forbes added the enhancement label 2026-03-03 23:03:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#387