Skip to content

feat(vue): add typed composables with app and provider isolation - #211

Open
CarsonCCHsieh wants to merge 3 commits into
tryabby:mainfrom
CarsonCCHsieh:feat/vue-integration
Open

CarsonCCHsieh wants to merge 3 commits into
tryabby:mainfrom
CarsonCCHsieh:feat/vue-integration

Conversation

@CarsonCCHsieh

@CarsonCCHsieh CarsonCCHsieh commented Nov 2, 2026 •

Copy link
Copy Markdown

Adds @tryabby/vue for #68. Vue applications can consume reactive feature flags, typed remote configuration and A/B variants through the existing @tryabby/core implementation.

createAbby returns 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:

  • 22 Vue tests passed: 20 DOM and 2 SSR tests.
  • Type checking passed for source, positive/negative type assertions, tests and demo.
  • Core prerequisite, Vue ESM/CJS/declarations and static demo builds passed.
  • Filtered frozen installation and scoped Biome checks passed.
  • Browser checks covered reactive controls, raw PING/ACT events, unmount/remount, mobile overflow and deployed asset hashes.

Additional checks used Windows with the upstream-specified Node 22.8.0 and pnpm 9.9.0:

  • Packages-only frozen installation with lifecycle scripts disabled; lockfile unchanged.
  • pnpm run build:packages passed: 10 successful tasks, including one cached task.
  • Vue's 22 tests and core's 29 tests ran with cache misses in this verification. A later diagnostic continuation replayed those same results.
  • Biome 1.9.4 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:

pnpm --filter @tryabby/core build
pnpm --filter @tryabby/vue typecheck
pnpm --filter @tryabby/vue test
pnpm --filter @tryabby/vue build
pnpm --filter @tryabby/vue exec vite build

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

  • New Features
    • Added a Vue 3.5 integration with reactive feature flags, remote configuration, and A/B testing.
    • Supports isolated app instances, server-side rendering, consent-aware cookie persistence, and automatic cleanup.
    • Includes a local demo for exploring reactive updates and experiment variants.
  • Documentation
    • Added setup and usage guidance, including SSR and Nuxt integration.
  • Chores
    • Added package licensing and third-party notices.

@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

@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.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 070807d5-f0b3-4cf1-a0c1-3858956741ce
Commits

Reviewing files that changed from the base of the PR and between 37f07e2 and a8fe4ac.

Files selected for processing: 1
  • packages/vue/README.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Walkthrough

This pull request adds @tryabby/vue, a Vue 3.5 integration with per-app and provider runtimes, reactive composables, consent-aware cookie storage, SSR-aware initialization, tests, and a synthetic-data playground.

Changes

Vue Integration

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
Loading

Possibly related PRs

  • tryabby/abby#202: Adds an alternative implementation of the same @tryabby/vue package and composable API.
  • tryabby/abby#206: Implements overlapping createAbby, plugin, and initialData APIs 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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(vue): add typed composables with app and provider isolation" matches the main change. The PR adds the @tryabby/vue package. Its core features are typed reactive composables for flags, …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
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/vue package. 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.

Share

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread packages/vue/README.md Resolved
Comment thread packages/vue/src/index.ts Resolved

This branch has not been deployed

No deployments
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