Repository navigation
feat(vue): add typed composables with app and provider isolation - #211
CarsonCCHsieh wants to merge 3 commits into
Conversation
|
@CarsonCCHsieh is attempting to deploy a commit to the cstrnt's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Runtime and public API packages/vue/src/index.ts |
createAbby creates app- and provider-specific runtimes, initializes the core client, and exposes reactive test, flag, and remote-config accessors. The runtime handles project-data loading, snapshots, and cleanup. |
Cookie storage and consent packages/vue/src/index.ts, packages/vue/src/storage.ts, packages/vue/tests/integration.test.ts |
Cookie overrides are gated by runtime state and validated against configured types. Storage supports browser cookies, in-memory assignments, expiry settings, and consent. Tests cover consent and project-specific cookie behavior. |
Runtime and type validation packages/vue/tests/fixtures.ts, packages/vue/tests/integration.test.ts, packages/vue/tests/ssr.test.ts, packages/vue/tests/types.ts, packages/vue/tsconfig.json, packages/vue/vite.config.ts |
Tests cover reactivity, loading, app and provider isolation, cleanup, SSR rendering, and typed defaults. Type assertions check valid and invalid API usage. |
Package and playground .changeset/bright-vue-composables.md, packages/vue/package.json, packages/vue/tsup.config.ts, packages/vue/README.md, packages/vue/demo/*, packages/vue/index.html, packages/vue/LICENSE, packages/vue/public/*, packages/vue/.gitignore |
Adds package metadata and build scripts, usage documentation, license and third-party notices, and a playground. The playground uses synthetic data, captures events in memory, and blocks project-data and network requests. |
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant VueApplication
participant AbbyVuePlugin
participant AbbyCoreClient
VueApplication->>AbbyVuePlugin: Install with optional initialData
AbbyVuePlugin->>AbbyCoreClient: Initialize client and subscribe to snapshots
AbbyVuePlugin->>AbbyCoreClient: Load project data when initialData is absent in browser
AbbyCoreClient-->>AbbyVuePlugin: Provide initial or updated snapshot
AbbyVuePlugin-->>VueApplication: Expose reactive flags, config, and test values
Possibly related PRs
- tryabby/abby#202: Adds an alternative implementation of the same
@tryabby/vuepackage and composable API. - tryabby/abby#206: Implements overlapping
createAbby, plugin, andinitialDataAPIs in the same package. - tryabby/abby#210: Implements overlapping Vue APIs, including per-provider isolation and SSR-safe loading.
Merge Risk: 
Minimal · up to a8fe4
-
No actionable merge-blocking risk remains in the reviewed changes.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "feat(vue): add typed composables with app and provider isolation" matches the main change. The PR adds the
@tryabby/vuepackage. Its core features are typed reactive composables for flags, remote config, and A/B variants, plus isolation per app and per provider. The changeset, source files, and tests all reflect these points. The title is specific and uses a conventional commit prefix.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 10 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Adds
@tryabby/vuefor #68. Vue applications can consume reactive feature flags, typed remote configuration and A/B variants through the existing@tryabby/coreimplementation.createAbbyreturns an app plugin, an isolated subtree provider and composables. Configuration literals determine valid flag, experiment, variant, remote-config and user-property types. Both app installations and nested providers keep separate core state. Component and app cleanup remove subscriptions and stop retained action callbacks.Variant selection waits for client data and mount. SSR can render supplied flag/config data without fetching, selecting a variant, tracking events or touching browser storage. Consent-aware storage uses project-scoped keys. The README includes a per-request Nuxt plugin example; this change does not include a dedicated Nuxt module or a Nuxt application test suite.
The change adds the package, a changeset, workspace lock entries, tests and an original demonstration. Existing non-Vue package source is unchanged.
Demo
The playground uses synthetic initial data and intercepts telemetry in memory. It exercises the real Vue integration while making no Abby project-data or telemetry requests. This instrumentation belongs to the demonstration; the SDK uses the core transport normally. The captioned walkthrough is an edited sequence of actual browser captures, rather than a continuous recording of a live Abby project.
Validation
Previously executed on Windows with Node 24.14.0 and pnpm 9.9.0 at the submitted source snapshot:
Additional checks used Windows with the upstream-specified Node 22.8.0 and pnpm 9.9.0:
pnpm run build:packagespassed: 10 successful tasks, including one cached task.ci .passed on clean LF tracked-source archives of both this head and the upstream base.The original full test command failed in the CLI suite. A diagnostic continuation and an Angular-only run using the installed ChromeHeadless produced 141 passed, 6 failed and 7 skipped tests in total, counted once. All six CLI failures compare Windows backslash paths against slash literals; the same six failures reproduced against the upstream CLI source using the same installed dependencies. That comparison did not independently install the base lockfile.
The lint workflow installs floating Biome
latest; the checked 2.6.4 release rejects the unchanged v1 configuration before inspecting source. Neither that workflow nor the upstream Ubuntu package workflow is established as passing. Type checking and interactive demo QA remain the previously recorded checks; no separate Nuxt application suite was run.Reproduction from the repository root, after installing workspace dependencies:
Authorship and limits
This contribution was prepared with Codex assistance and original local tests and demo material. No competing Vue PR implementation was copied. Package licensing and third-party notices are included. Configuration flags are presentation inputs; applications must enforce privileged access on the server.
/claim #68
Summary by CodeRabbit