Skip to content

Add the nodeTypes and treeItemActions extension contribution kinds (extension API 2.2) - #3619

Merged
mstomar125 merged 4 commits into
mainfrom
issue-3414-frontend-contributions
Oct 5, 2026
Merged

mstomar125 merged 4 commits into
mainfrom
issue-3414-frontend-contributions

Conversation

@mstomar125

@mstomar125 mstomar125 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Part of #3414 (the "Frontend contribution kinds" section, plus the host-API reconcile items in the same files).

What changes

nodeTypes. An extension's nodeTypes: [{ plugin }] registers each PluginDefinition with core's pluginRegistry when the extension registers. The type's lazy node component, viewer, schema form and slash commands then resolve like any plugin type's. Unregistering the extension removes the types it registered.

  • An extension only adds types. A plugin whose id is a core node type (from the generated registry, so it covers types without a frontend plugin, such as database-settings) is dropped and logged. So is a type another extension already registered, where the first registration is kept.
  • Each extension's contribution lists are read before any of its types reach the plugin registry, so an extension that fails to register leaves no plugin behind. A plugin the registry fails to take is dropped on its own.
  • The schema-plugin loader leaves an extension's type alone. It doesn't overwrite it when the subtype's schema is registered, and it doesn't remove it on a schema delete or a database switch. Without this guard, the loader's startup registration would have replaced the extension's plugin with a schema-derived one, which has no component, because an extension subtype's schema is non-core.

treeItemActions. A new TreeItemActionsOutlet renders each item's actions inside its row in the navigation panel's collection tree (all three levels), with props { nodeId, nodeType }.

  • CollectionItem now carries nodeType, so a subtype collection passes its own type.
  • The row shows the actions while it is hovered or holds focus. The reveal uses opacity, so the actions stay in the tab order.
  • when(item) is asked once per item, inside a derivation.
  • Failures follow ADR-082 §3.4. A throwing when() hides the action. It is logged once per contribution, and again only after it has returned normally for every item it threw for, so a predicate that fails on some rows doesn't log on every re-evaluation. A rejected load(), or a component that throws, empties only that action's outlet.
  • An optimistic, not yet confirmed item gets no actions, because its id is temporary.
  • With nothing registered or visible, no container renders.

Fixture extension. It now covers both kinds: a collection subtype with a lazy node component, and tree-item actions for every §3.4 failure row. Its action opens an item-modal app-shell-modal contribution for the clicked item, the flow ADR-082's permissions example uses. The fixture names no product.

Host API reconcile (ADR-082 §3.6).

  • @nodespace/extension-api now exports the pluginRegistry registration types a node-type contribution needs: NodeTypeContribution, PluginDefinition, NodeComponent, NodeComponentProps. It also exports TreeItemActionContribution and TreeItemActionProps.
  • The compatibility policy lists node-type registration as versioned.
  • The surface snapshot's type hash now also follows the plugin and node-component types the API reaches (plugins/types.ts, types/node-viewers.ts). A change to PluginDefinition therefore needs a version bump, as ADR-082 §8 versions the node-type contribution.

A decision to confirm

ADR-082 §3.2 sketches TreeItemActionContribution = Contribution<{ nodeId; nodeType }>, whose when takes no arguments. The worked example needs when() to decide per item ("a lock button when the signed-in user has a role that may edit that collection's permissions"), so when receives the item: when?: (item: TreeItemActionProps) => boolean. A zero-argument predicate still type-checks. If the ADR should spell this out, that is a one-line amendment to §3.2 (flagged for #3414's Docs item). §3.4's failure rule is kept as written.

Follow-up (pre-existing, from review)

Viewer resolution and viewerTabsFor match the node type exactly, so a collection subtype opens in BaseNodeViewer without collection's viewer tabs. This belongs to the typed-subtype work: fall back through isA.

Not changed here (remaining §3.6 gap)

§3.6 lists nodes.updateNode. The nodes facade from #3409 still has getNode, fetchNode and createNode only. It isn't a contribution kind, so it is left for the remaining #3414 work.

Extension API

EXTENSION_API_VERSION 2.1 → 2.2, a minor bump: two new optional contribution kinds (nodeTypes, treeItemActions) and new exports. Rust (app-lib/src/extensions/mod.rs, its fixture test) and TypeScript move together, and the surface snapshot is re-recorded. Release notes: "Extension API 2.2: nodeTypes and treeItemActions contribution kinds; the host API exports the plugin registration types."

Documentation

Tests

New and changed Vitest tests:

  • plugins/ui-extensions.test.ts:
    • node types: registration into the given plugin registry, core-type refusal (a type with a plugin and one without), first-wins across and within extensions, malformed lists, nothing registered for a refused extension or one whose list getter throws, per-plugin failure isolation, unregister cleanup and ownership, the default singleton;
    • tree actions: keys, priority order, id uniqueness across lists, key collisions, malformed lists, unregister, when() not evaluated by lookups;
    • getActiveTreeItemActions: when(item) gets the item, per-item visibility, priority, throw hidden with warn-once and re-arm.
  • plugins/tree-item-actions-outlet.test.ts:
    • no container with nothing registered or visible;
    • props { nodeId, nodeType }, per-item when, reactivity, priority order;
    • §3.4: a throwing when, a rejected load, and a throwing component each leave the sibling rendering.
  • components/navigation-sidebar-tree-item-actions.test.ts:
    • actions in each row at all three levels with each item's own id and type (subtype included), when(item) false for one item, an optimistic item gets none until confirmed;
    • the fixture's hover action opens the fixture's app-shell-modal contribution for the clicked item, and the modal closes.
  • plugins/extension-node-types.test.ts: NodeComponentLoader (the viewer's loader) resolves the extension's lazy component, which renders with node props; the type is gone after unregister; core's collection plugin can't be replaced.
  • plugins/schema-plugin-loader.test.ts: register, delete and switch (with and without the type) keep the extension's plugin; after unregister the schema registers it as usual.
  • stores/collections.test.ts: buildCollectionsTree carries nodeType at every level.
  • extension-api/extension-api-surface.test.ts: the hash covers PluginDefinition, NodeTypeConfig and NodeComponentProps, resolves a name declared twice to the plugin types' declaration, and skips unreachable plugin types.

Mutation check: 27 source mutations, each run against its targeted tests, and all 27 were killed. 23 come from the first pass, and 4 more from review rounds, covering the failing-item set's re-arm and warn rules. They cover:

  • the core-type check, the taken-type check, plugin registration, unregister cleanup and ownership, per-plugin isolation, and registration order;
  • dropping, unsorting, and not reserving tree actions;
  • when() not given the item, when() ignored, and warn re-arm;
  • the empty container and props in the outlet;
  • the pending guard and the level 2/3 hosts in the sidebar;
  • nodeType in the tree builder;
  • both schema-loader guards;
  • the hash's file list and name precedence.

Runs:

  • bun run --cwd packages/desktop-app test over src/tests/{plugins,extension-api,stores,components,services,build}: 229 files, 3670 tests passed.
  • quality:fix: eslint, design tokens, svelte-check, 0 errors and 0 warnings.
  • scripts/check-pro-boundary.ts: clean.
  • cargo clippy -p nodespace-app-lib --all-targets -- -D warnings: passed (run under the machine slot).

Not verified in a running app. The hover reveal is a CSS rule (:hover/:focus-within), and happy-dom doesn't apply component CSS, so no test observes it. The app wasn't launched on this shared machine, because starting the daemon loads a model.

🤖 Generated with Claude Code

@mstomar125

Copy link
Copy Markdown
Contributor Author

Pragmatic code review (round 1)

Review Type: Initial Review (medium depth). Scope: the "Frontend contribution kinds" section of #3414, plus the #3409 host-API reconcile items in the same files. Checked against ADR-082 §2.1, §3.2–§3.4, §3.6, §8 and §9, and the CLAUDE.md Pro / Sync Boundary section.

Local verification: the 10 directly affected Vitest files (plugins/{ui-extensions,tree-item-actions-outlet,extension-node-types,schema-plugin-loader}, components/navigation-sidebar-tree-item-actions, extension-api/*, stores/collections) ran 256/256 green. A grep of the added lines for product, sync, tenant or permission wording found no hits.

Requirements Check

  • ✅ nodeTypes: NodespaceExtension.nodeTypes: [{ plugin }] registers each PluginDefinition with pluginRegistry, and the registry is injected through the UiExtensionRegistry constructor, which keeps tests isolated. Core types are refused using the generated registry, so types without a plugin, such as database-settings, are covered too. Across extensions the first registration wins. Plugins are registered only after every list has been read, so a refused extension leaves no plugin behind. Unregister removes only plugins the extension still owns. The schema-plugin loader guards register, delete and database switch, so the startup schema registration cannot overwrite the extension's plugin with a component-less one. That would have been a real bug, and the PR catches it.
  • ✅ treeItemActions: TreeItemActionsOutlet is mounted in the row at all three tree levels with props { nodeId, nodeType }. CollectionItem.nodeType carries the subtype. Contributions are keyed <ext>/<id> and sorted by priority. When nothing is registered or visible, no container renders. The §3.4 cases are covered: a throwing when (hidden and warned once), a rejected load and a throwing component each empty only their own ExtensionOutlet. Optimistic (pending) items get no actions, which is right because their id is temporary. Residual risk: the hover/focus reveal is CSS only, and happy-dom doesn't apply it, so no test observes it. Please do a quick visual check in the running app once the machine is free.
  • ✅ Fixtures cover both kinds, and a hover action opens an app-shell-modal: the fixture adds a collection subtype with a lazy node component, tree actions for every §3.4 row, and an item-modal chrome contribution. The click opens it for the clicked item, and the test closes it again. It goes through ChromeSlotOutlet name="app-shell-modal", the same outlet app-shell.svelte:750 mounts. No product is named.
  • ✅ Host API reconcile (§3.6, where this section touches it): the PR exports NodeTypeContribution, PluginDefinition, NodeComponent, NodeComponentProps, TreeItemActionContribution and TreeItemActionProps. The policy comment now lists node-type registration as versioned (§8). The surface hash now follows plugins/types.ts and types/node-viewers.ts, so a change to PluginDefinition forces a version bump. nodes.updateNode is still missing, and the PR defers it explicitly. That is acceptable because it is not a contribution kind.
  • ✅ EXTENSION_API_VERSION 2.1 → 2.2: Rust and TypeScript move together. The snapshot is re-recorded (new exports plus hash), and the version-agreement test passes. The PR notes that clippy is still pending, though the Rust change is only two literals. One stale test name is listed under the findings.

Code Review Findings

1. 🟡 Important (non-blocking): the when(item) deviation is sound, but ADR-082 §3.2 should be amended rather than left as "if"
📁 packages/desktop-app/src/lib/plugins/ui-extensions.ts:246-248

  • Is it sound? Yes. §3.2's own text ("its when() decides whether it shows, so any role check stays in the extension") and its worked example (a role on that collection) both need a per-item decision. With a zero-argument when, the only place to decide per item would be inside the component, which would return nothing. Every row would then mount an outlet and an empty .tree-item-actions container, which breaks §3.3 ("with nothing visible, a host renders nothing") and wastes N×M mounts. Omit<Contribution<P>, 'when'> & { when?: (item) => boolean } is a strict superset of the sketch, so an extension written to the ADR's literal shape still type-checks.
  • The issue: ADR-082 is the source of truth for a versioned API, and the extension package codes against the ADR. Right now the contract exists only in this PR body.
  • Recommendation: land the one-line §3.2 amendment (type TreeItemActionContribution = Omit<Contribution<{ nodeId; nodeType }>, 'when'> & { when?: (item: { nodeId; nodeType }) => boolean }, plus a sentence saying when receives the item) with Pro rebuild (after core release): finish core's extension points for typed subtypes, edge fields and Pro UI (ADR-082) #3414's Docs item, or before this merges, and link it from the PR.
  • Principle: single source of truth for a public contract.

2. 🟢 Suggestion: with per-item when, the warn-once rule re-arms on sibling items, so a mixed throw/return predicate logs on every reactive pass
📁 packages/desktop-app/src/lib/plugins/ui-extensions.svelte.ts:40-55, 86-93

  • The issue: warnedKeys is keyed by contribution key only. Every tree row has its own derivation, so a when(item) that throws for some items and returns for others alternates in DOM order: A throws and warns, B returns and re-arms, C throws and warns again, and so on. That is about N/2 warnings at mount and again on every change to the state the predicate reads. A predicate that does roles.get(item.nodeId).canEdit and hits a collection missing from the map is the likely real-world case. This behaviour is intended and tested ("Returning normally, on any item, re-arms the warning"), but it defeats the purpose of §3.4's "logged once until it next returns normally", which is to bound the noise.
  • Recommendation: for tree actions, key the warned set by ${key}\u0000${item.nodeId}. A throw is then logged once per (contribution, item) until that item's when recovers. That is bounded by the tree size instead of the number of renders. isContributionActive can keep the per-key form.
  • Principle: §3.4's failure-isolation intent (bounded logging), and least surprise.

3. 🟢 Follow-up (out of scope, pre-existing; for the remaining #3414 work)
📁 packages/desktop-app/src/lib/components/layout/pane-content.svelte:53-61, packages/desktop-app/src/lib/plugins/ui-extensions.ts:589-593

  • The issue: viewer resolution (pluginRegistry.hasViewer / getViewer) and viewerTabsFor both match nodeType exactly. A collection subtype opened from the tree therefore renders with BaseNodeViewer, not core's collection viewer, and viewer tabs registered for collection don't appear on it. The only way around that is for the subtype's plugin to supply a viewer, and an extension can't import core's collection viewer through the host API. This PR doesn't make it worse, since a schema-derived plugin has no viewer either. It does matter for the §3.2 worked example and for §2.1 ("core's collection UI lists [subtype] nodes as collections").
  • Recommendation: track a base-type (isA) fallback for viewer and viewer-tab resolution as part of the typed-subtype work.

4. 🟢 Nit: stale Rust test name
📁 packages/desktop-app/app-lib/src/extensions/fixture_tests.rs:116

  • fn extension_api_version_is_two_one() now asserts (2, 2). Rename it (for example extension_api_version_is_two_two) so a failure message isn't misleading.

What's good

  • Node-type registration is designed carefully: it reads every list before registering, refuses core types from the generated registry rather than the plugin list, removes only plugins it still owns, and isolates failures per plugin.
  • The schema-loader guard is a non-obvious catch. Without it, the startup schema registration would have silently replaced the extension's component with a component-less plugin.
  • Moving the hash to follow REGISTRY_FILES puts PluginDefinition under the §8 versioning gate. The test asserts precedence for names declared twice (ViewerRegistration).
  • Revealing actions with opacity, plus :focus-within, keeps them keyboard reachable.
  • Test coverage is solid: every §3.4 row, per-item when, all three tree levels, the pending guard, and the end-to-end flow from the action to the modal. The PR also reports 23 of 23 mutations killed.

Recommendation

APPROVE. Nothing blocks the merge. Finding 1 needs a one-line ADR amendment tracked alongside the Docs item. Findings 2–4 are optional polish or follow-ups.

@mstomar125 mstomar125 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review round 1: APPROVE (posted as a comment because GitHub blocks self-review). Full findings in the review comment above.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Address review (round 1)

Commit c86c3d1 handles round 1 (verdict APPROVE, 4 findings).

Addressed

  • 🟢 2. Warn-once keyed per item. A tree-item action's failing when(item) is now tracked by contribution and item (ui-extensions.svelte.ts).
    • A predicate that throws for some items and not others logs each failing item once. Before, every sibling that returned normally re-armed the warning, so it logged again on each re-evaluation.
    • An item re-arms its own warning only by returning normally.
    • The log carries nodeId. Other contribution kinds keep the per-key rule.
    • New test: "warns once per failing item, re-armed only by that item returning normally". The mutation that drops the item from the key is killed (2 failures).
  • 🟢 4. Stale Rust test name. Renamed to extension_api_version_is_two_two. cargo clippy -p nodespace-app-lib --all-targets -- -D warnings passes.

Skipped

  • 🟡 1. ADR-082 §3.2 amendment for when(item). This needs an edit to an accepted ADR in nodespace-docs, which is Pro rebuild (after core release): finish core's extension points for typed subtypes, edge fields and Pro UI (ADR-082) #3414's Docs item and outside this code PR. The amendment is one line: TreeItemActionContribution's when takes (item: { nodeId; nodeType }). It's flagged to the coordinator to land with the Docs item. The code already type-checks extensions written to the ADR's sketch.
  • 🟢 3. Viewer resolution and viewerTabsFor match the node type exactly. This is pre-existing and belongs to the typed-subtype work, not the contribution kinds. Reported as a follow-up: fall back through isA for the viewer and for viewer tabs, so a collection subtype gets the collection viewer and its tabs.

Checks:

  • Vitest over src/tests/plugins, src/tests/extension-api and the sidebar tree-action test: 425 passed.
  • quality:fix: 0 errors and 0 warnings.
  • The push check passed.

Re-Review Decision

Decision: RE-REVIEW NEEDED

Rationale: The change is small and tested. It does change the documented failure-logging rule (ADR-082 §3.4) of a versioned contribution kind, so a short round 2 on c86c3d1 confirms it.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Pragmatic code review (round 2)

Review Type: Re-Review (medium depth). Scope: only commit c86c3d1, "Address review: log a tree-item action's failing when() once per item". Checked against ADR-082 §3.2 and §3.4, and against the round-1 findings and the round-1 address-review.

Local verification: I ran src/tests/plugins/ui-extensions.test.ts and src/tests/plugins/tree-item-actions-outlet.test.ts, and 113 of 113 passed. I also traced three mutations of the new test by hand, and the test catches each one:

  • With the item dropped from the warn key, research returning normally re-arms ops, so the first assertion gets 2 instead of 1.
  • With warned.delete(key) instead of warnKey, ops is never re-armed, so the last assertion gets 2 instead of 3.
  • With nodeId dropped from the log payload, the objectContaining({ nodeId: 'engineering' }) assertion fails.

Vitest runs each file with its own module state (singleFork, no isolate: false), so the module-wide warned set can't leak into tree-item-actions-outlet.test.ts.

Previous Review Summary

Round 1 made 4 recommendations. 2 were addressed and 2 were skipped, and both skips are justified. This round found 1 new 🟡 issue (non-blocking) and 1 🟢 nit.

# Round-1 finding Status
1 🟡 Amend ADR-082 §3.2 for when(item) Skipped, justified. It's an edit to an accepted ADR in nodespace-docs, which belongs to #3414's Docs item. The code type-checks against the ADR's sketch. Its scope now needs to widen: see new finding A.
2 🟢 Key warn-once per item Addressed. holds() keys by `${key}\n${nodeId}` for tree actions and by key for every other kind, and the log carries nodeId. The test covers all three behaviours: a sibling item can't re-arm the warning, a second failing item is warned about separately, and an item re-arms only its own warning. The doc comments in ui-extensions.svelte.ts and ui-extensions.ts match the code.
3 🟢 Fall back through isA for viewer and viewer-tab resolution Skipped, justified. It's pre-existing and belongs to the typed-subtype work, and round 1 itself called it out of scope. It was passed to the coordinator. Please make sure it lands somewhere durable, either an issue or the #3414 checklist, rather than only in this thread.
4 🟢 Stale Rust test name Addressed. It's renamed to extension_api_version_is_two_two, and a grep finds no other references to the old name.

Code Review Findings

A. 🟡 Important (non-blocking): the per-item rule now differs from ADR-082 §3.4's text, so the deferred ADR amendment must cover §3.4 as well as §3.2
📁 packages/desktop-app/src/lib/plugins/ui-extensions.svelte.ts:13-19, 51-67

  • The issue: §3.4 says a throwing when() is "logged once per contribution until it next returns normally". For tree-item actions the code now logs once per (contribution, item). In the mixed case round 1 targeted, that is fewer logs. In the most likely real failure, though, it is more. Take a predicate that throws on every item: for example, the extension's role map isn't loaded yet and roles.get(item.nodeId)!.canEdit throws. Before this commit that logged 1 warning. Now it logs one per tree row, so N at mount, and N again each time the whole tree recovers and fails again (say, across a database switch). The total stays bounded by tree size, which is what round 1 asked for, so this isn't a defect. But it is a second departure from the documented failure contract of a versioned contribution kind. The round-1 address-review describes the deferred amendment as one line about when's signature, which wouldn't cover it. The PR body's failure bullet also still says "logged once".
  • Recommendation: pick one of these:
    • (a) Preferred: keep the code as it is and widen the Docs-item amendment. Change the §3.4 row to: "logged once per contribution (for a tree-item action, once per contribution and item) until it next returns normally (for that item)". Also update the PR body's failure bullet so the contract matches until the ADR lands. The per-item logs carry nodeId, which is the useful diagnostic.
    • (b) Keep §3.4 literal: keep a Map<key, Set<nodeId>> of failing items, warn when a contribution's set goes from empty to non-empty, and re-arm when it empties. That logs once per contribution in both the all-throw and the mixed case, but loses the per-item nodeId detail.
  • Principle: single source of truth for a public, versioned contract. The same rule as round-1 finding 1, applied to the second section the change now touches.

B. 🟢 Nit (no action needed): warned can now accumulate stale per-item entries
📁 packages/desktop-app/src/lib/plugins/ui-extensions.svelte.ts:45

  • An item whose when threw and which then disappears from the tree (deleted, or after a database switch) stays in warned for the life of the webview. Before this commit the set was bounded by the number of contributions. Now it is bounded by contributions × distinct failing items, which is still tiny short strings. If that item comes back and still fails, it stays silent. That matches "until it next returns normally", so the behaviour is correct as written. I'm noting it only so it's a known property, not a surprise later.

What's good

  • The change is minimal and well-contained. Other contribution kinds keep the per-key rule unchanged, because nodeId is optional and only getActiveTreeItemActions passes it.
  • Adding nodeId to the warning payload is a real improvement in diagnostics, since the log now says which collection the predicate failed on.
  • The new test's comments explain why each step matters, including why it uses fresh item ids, and its assertions are tight enough to catch the obvious mutations.

Recommendation

APPROVE. Nothing blocks the merge. Finding A comes down to adding §3.4 to the ADR amendment already planned for #3414's Docs item, plus a one-line PR-body tweak. Finding B needs no action.

@mstomar125 mstomar125 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review round 2: APPROVE (posted as a comment because GitHub blocks self-review). Full findings in the review comment above.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Address review (round 2)

Commit 05beed9 handles round 2 (verdict APPROVE, 1 🟡 and 1 🟢).

Addressed

  • 🟡 A. Per-item logging departed from ADR-082 §3.4's text. I took your option (b), so the code follows the accepted ADR as written instead of widening the amendment.
    • Each contribution key holds the set of items its when() threw for and hasn't returned normally for since. It logs when that set goes from empty to non-empty, and re-arms once the set is empty again.
    • The result is one warning per contribution, whether the predicate fails for some rows or for all of them.
    • Contributions asked about no item use a single '' item, so their behaviour is unchanged. The existing per-key tests still pass.
    • The test "warns once per contribution while any item fails, re-armed once every item recovers" runs on a contribution of its own, so module-wide state can't leak between tests.
    • Four mutations were all killed: re-arm on any normal return, never re-arm, warn on every newly failing item, and no re-arm in the success path.
    • The deferred ADR amendment is back to the §3.2 when(item) signature only. The PR body is updated.
  • 🟢 B. Stale entries. These are now items left in a contribution's failing set. As you noted, this is bounded and correct under "until it next returns normally". No change.

Follow-ups recorded in the PR body: the §3.2 amendment (for #3414's Docs item), and an isA fallback for viewer and viewer-tab resolution (typed-subtype work).

Checks:

  • Vitest over plugins, extension-api, components/settings, the collection viewer's extension test and the sidebar tree-action test: 545 passed.
  • quality:fix: 0 errors and 0 warnings.
  • The push check passed.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: The change implements round 2's own option (b) as specified, and only holds() plus its doc comments changed. The behaviour is pinned by mutation-killing tests, and every other contribution kind keeps its tested semantics. Both review rounds returned APPROVE.

mstomar125 and others added 4 commits October 5, 2026 14:34
- nodeTypes: registering an extension registers each PluginDefinition
  with the plugin registry, after every contribution list has been read;
  unregistering removes the types it still owns. A core type, or a type
  another extension already added, is dropped and logged.
- The schema-plugin loader neither replaces nor removes a type an
  extension registered.
- treeItemActions: TreeItemActionsOutlet renders each collection-tree
  item's actions in its row with { nodeId, nodeType }, revealed on hover
  or focus. when(item) is asked per item; failures follow ADR-082 §3.4.
  Optimistic items get no actions.
- CollectionItem carries nodeType.
- Host API exports NodeTypeContribution, TreeItemActionContribution,
  TreeItemActionProps, PluginDefinition, NodeComponent and
  NodeComponentProps; the surface hash follows the plugin and
  node-component types the API reaches.
- The fixture extension adds a collection subtype and tree-item actions
  whose action opens an app-shell-modal contribution.

Part of #3414

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ns kinds

A minor bump: two new optional contribution kinds and new host-API type
exports. The Rust and TypeScript constants move together, and the
host-API surface snapshot is re-recorded.

Part of #3414

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A tree-item action's when(item) failure is tracked by contribution
  and item, so a predicate that fails for some items and not others no
  longer re-arms its warning on every sibling that returns normally.
- Rename the Rust version test to match the 2.2 value it asserts.

Part of #3414

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A tree-item action's when(item) is tracked as the set of items it threw
for. It is logged when that set goes from empty to non-empty and armed
again once every item has returned normally, which keeps ADR-082 §3.4's
"logged once per contribution until it next returns normally" for a
predicate asked about many items. Contributions asked about no item keep
their behaviour.

Part of #3414

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant