Skip to content

feat!: provide the inline-edit capability and render bar.actions (dune#97) - #5

Closed
zumbrunn wants to merge 3 commits into
mainfrom
feat/capabilities
Closed

zumbrunn wants to merge 3 commits into
mainfrom
feat/capabilities

Conversation

@zumbrunn

@zumbrunn zumbrunn commented Nov 5, 2026

Copy link
Copy Markdown
Member

Part of duneorg/dune#97 (step 4) and #64. Draft until @dune/core 0.36 is published; it also needs the core capability PRs (duneorg/dune#109, #110, #111).

Core 0.36 replaces DunePlugin.adminServices, adminBarActions and ResponseTransformContext.plugins with a typed capability registry. This moves the plugin over:

  • Provides the inline-edit capability in setup() (api.capabilities.provide("inline-edit", ...)), built from the capability context (storage, history, data dir, content dir, hooks). Core's /api/inline-edit/ws upgrades through it and the admin's content endpoints use it for commits and presence.
  • Renders bar.actions: transformResponse reads ResponseTransformContext.barActions, which carries what other plugins contributed with capabilities.contribute("bar.actions", fn). The bar still doesn't know what the buttons do.
  • README: a "How it plugs into core" section; the stated core requirement is now 0.36. CHANGELOG: BREAKING entry. Comments that referred to AdminServicesContext are reworded.

Not in this PR (release work): the version bump to 3.0.0 and the @dune/core pin to ^0.36.0. The pin cannot resolve until 0.36 is on JSR.

Tests. deno task check and deno task test pass (48, against the local capability-stack core). New: the slot is provided and its factory builds a working manager; transformResponse renders delivered barActions; visitors without edit rights get the response untouched; and tests/core_integration_test.ts runs against real core: without the plugin /api/inline-edit/ws answers 501, with it core resolves the slot (active, provider inline-edit) and the route proceeds to the WebSocket checks (426). deno.dev.json gains two local core mappings (bootstrap, fresh-app) for that test.

🤖 Generated with Claude Code

zumbrunn and others added 3 commits November 5, 2026 12:04
…eorg/dune#97)

setup() declares the inline-edit slot with api.capabilities.provide instead of
adminServices(); transformResponse collects the admin bar's buttons from
ResponseTransformContext.barActions instead of ctx.plugins[].adminBarActions.
Needs @dune/core 0.36; major version bump (3.0.0) at release.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eorg/dune#122)

Core 0.36 names the slot editor.inline, matching auth.session and
editor.content. No alias: a core without the rename will not find the manager.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t needs no admin.enabled override

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zumbrunn
zumbrunn marked this pull request as ready for review November 10, 2026 16:33
zumbrunn added a commit that referenced this pull request Nov 10, 2026
Lands the whole stack as one change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zumbrunn

Copy link
Copy Markdown
Member Author

Landed in 3.0.0 as part of #9 (one squash of the whole stack). Verified against the published @dune/core 0.36.0.

@zumbrunn zumbrunn closed this Nov 10, 2026
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