Skip to content

feat(plugin,devtools,testing,storybook): graduate four modules toward Stable (#145–#148) - #158

Merged
JosunLP merged 4 commits into
feat/i18n-a11y-dnd-media-stablefrom
feat/plugin-devtools-testing-storybook-stable
Jun 29, 2026
Merged

feat(plugin,devtools,testing,storybook): graduate four modules toward Stable (#145–#148)#158
JosunLP merged 4 commits into
feat/i18n-a11y-dnd-media-stablefrom
feat/plugin-devtools-testing-storybook-stable

Conversation

@JosunLP

@JosunLP JosunLP commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Collected PR for the next four open stabilization tickets, implemented on one branch.

Stacked on #157. Base is set to the #157 branch so this diff shows only the plugin/devtools/testing/storybook changes. It targets dev after #157 lands (GitHub auto-retargets to dev when #157 merges). Merge #157 first.

Closes #145
Closes #146
Closes #147
Closes #148

#145 — plugin toward Stable: frozen extension contract

  • New additive definePlugin() authoring helper (identity + install-options inference) — a single, stable entry point for third-party authors.
  • Hook-bus / DI / install-lifecycle / directive-registration surface frozen; plugin-author guide published (lifecycle, hook timing, DI resolution, directive namespacing).
  • Install/uninstall symmetry proven with tests: nothing a plugin registers (directives, filters, actions, DI bindings) leaks after uninstall(); re-install is clean.

#146 — devtools toward Stable: bridge protocol + browser extension

  • New stable, versioned bridge protocol: connectDevtoolsBridge() (over window.postMessage), the transport-agnostic createBridgeServer(), serializeComponentTree(), and BRIDGE_PROTOCOL_VERSION / BRIDGE_SOURCE / BRIDGE_CAPABILITIES. Built-in methods ping / getSnapshot / getTimeline / getComponentTree; timeline events stream as event messages.
  • Reference Manifest V3 extension in extension/ (component tree, signal/store inspection, live timeline) that connects over the protocol.
  • installBrowserBridge() advertises the protocol version (back-compatible).

#147 — testing toward Stable: runner-agnostic + shadow-DOM parity

  • Surface frozen; runner integration beyond bun:test documented (Vitest / Jest) with cleanup() / autoCleanup() guidance.
  • Shadow-DOM-aware screen / within queries, userEvent / fireEvent, and a mock are tested across light + shadow DOM. expectAccessible documented as sharing the a11y audit's rule definitions.

#148 — storybook toward Stable: pinned unsafeHtml contract

  • Helper surface frozen; the unsafeHtml security contract is pinned and documented — storyHtml/storySvg sanitize every interpolation via the security module, and only brand-checked, author-controlled fragments are inserted verbatim. Sanitization, the bypass, brand-spoofing rejection, and each helper's output are covered by tests.

Shared / build

  • README stability matrix, introduction.md stability paragraphs, CHANGELOG, and src/full.ts exports (definePlugin + the devtools bridge surface).

Verification

  • bun test2959 pass / 0 fail (30 new tests across 4 files).
  • tsc --noEmit clean; check:doc-exports 100% for plugin/devtools/testing/storybook; check:full-bundle passes; eslint clean; build:lib emits the devtools bundle.

🤖 Generated with Claude Code

… Stable (#145, #146, #147, #148)

Collected PR for the next four open stabilization tickets, implemented on one
branch (stacked on #157).

Closes #145
Closes #146
Closes #147
Closes #148

## #145 — plugin toward Stable: frozen extension contract

- New additive `definePlugin()` authoring helper (identity + install-options
  inference) — a single, stable entry point for third-party authors.
- Hook-bus / DI / install-lifecycle / directive-registration surface frozen.
- Plugin-author guide published (lifecycle, hook timing, DI resolution,
  directive namespacing) and install/uninstall **symmetry** proven with tests:
  nothing a plugin registers (directives, filters, actions, DI bindings) leaks
  after uninstall; re-install is clean.

## #146 — devtools toward Stable: bridge protocol + browser extension

- New stable, versioned **bridge protocol** (`connectDevtoolsBridge` over
  `window.postMessage`; transport-agnostic `createBridgeServer`;
  `serializeComponentTree`; `BRIDGE_PROTOCOL_VERSION`/`BRIDGE_SOURCE`/
  `BRIDGE_CAPABILITIES`). Built-in methods: `ping`, `getSnapshot`,
  `getTimeline`, `getComponentTree`; events stream on the timeline.
- Reference **Manifest V3 extension** in `extension/` (component tree,
  signal/store inspection, live timeline) that connects over the protocol.
- `installBrowserBridge()` now advertises the protocol version (back-compatible).

## #147 — testing toward Stable: runner-agnostic + shadow-DOM parity

- Surface frozen; runner integration documented beyond `bun:test`
  (Vitest / Jest), with `cleanup()`/`autoCleanup()` guidance.
- Shadow-DOM-aware `screen` / `within` queries, `userEvent` / `fireEvent`, and a
  mock are tested across light + shadow DOM. `expectAccessible` documented as
  sharing the a11y audit's rule definitions.

## #148 — storybook toward Stable: pinned unsafeHtml contract

- Helper surface frozen; the `unsafeHtml` **security contract** is pinned and
  documented — `storyHtml`/`storySvg` sanitize every interpolation via the
  security module, and only brand-checked, author-controlled fragments are
  inserted verbatim. Sanitization, the bypass, brand-spoofing rejection, and
  each helper's output are covered by tests.

## Shared

- README stability matrix, introduction.md stability paragraphs, CHANGELOG,
  and `src/full.ts` exports (`definePlugin` + the devtools bridge surface).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0f82d69-54e8-4dee-bdee-82f21ba7930b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/plugin-devtools-testing-storybook-stable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added docs Changes to the documentation tests Chenges to the tests plugin Changes to the plugin module devtools Changes to the devtools module testing Changes to the testing module storybook Changes to the storybook module labels Jun 29, 2026
JosunLP and others added 3 commits June 29, 2026 15:14
- a11y-stable: coalesce optional activeElement id to '' so toContain
  receives a string instead of `string | undefined` (TS2769).
- dnd-stable: drop the unsupported `keyboard` option from the
  useSortable() call. sortable() is pointer-only; keyboard a11y lives on
  draggable, which the first test already covers (TS2353).

The PR's local `tsc --noEmit` used the default tsconfig (excludes tests/);
CI runs tsconfig.component-test.json, which includes them and caught this.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@JosunLP
JosunLP merged commit 7484d58 into feat/i18n-a11y-dnd-media-stable Jun 29, 2026
8 checks passed
@JosunLP
JosunLP deleted the feat/plugin-devtools-testing-storybook-stable branch June 29, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devtools Changes to the devtools module docs Changes to the documentation plugin Changes to the plugin module storybook Changes to the storybook module testing Changes to the testing module tests Chenges to the tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant