feat(plugin,devtools,testing,storybook): graduate four modules toward Stable (#145–#148) - #158
Merged
JosunLP merged 4 commits intoJun 29, 2026
Conversation
… 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]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…ols-testing-storybook-stable
- 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]>
…ols-testing-storybook-stable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collected PR for the next four open stabilization tickets, implemented on one branch.
Closes #145
Closes #146
Closes #147
Closes #148
#145 — plugin toward Stable: frozen extension contract
definePlugin()authoring helper (identity + install-options inference) — a single, stable entry point for third-party authors.uninstall(); re-install is clean.#146 — devtools toward Stable: bridge protocol + browser extension
connectDevtoolsBridge()(overwindow.postMessage), the transport-agnosticcreateBridgeServer(),serializeComponentTree(), andBRIDGE_PROTOCOL_VERSION/BRIDGE_SOURCE/BRIDGE_CAPABILITIES. Built-in methodsping/getSnapshot/getTimeline/getComponentTree; timeline events stream aseventmessages.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
bun:testdocumented (Vitest / Jest) withcleanup()/autoCleanup()guidance.screen/withinqueries,userEvent/fireEvent, and a mock are tested across light + shadow DOM.expectAccessibledocumented as sharing the a11y audit's rule definitions.#148 — storybook toward Stable: pinned
unsafeHtmlcontractunsafeHtmlsecurity contract is pinned and documented —storyHtml/storySvgsanitize 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
introduction.mdstability paragraphs, CHANGELOG, andsrc/full.tsexports (definePlugin+ the devtools bridge surface).Verification
bun test— 2959 pass / 0 fail (30 new tests across 4 files).tsc --noEmitclean;check:doc-exports100% for plugin/devtools/testing/storybook;check:full-bundlepasses; eslint clean;build:libemits the devtools bundle.🤖 Generated with Claude Code