Repository navigation
Angular SDK 0.9.1: paid features unlocked on first paint, billing screens refresh, route flags as a live kill switch, guides (TBP-947) - #44
Merged
Conversation
…ens refresh, route flags are a live kill switch, guides follow "every gate is a flag" (TBP-947) Second wave of bridge-svelte parity for the Angular SDK. - TBP-810: provideBridge()'s app initializer reads the plan's features, the billing state and the flag definitions before the first render, each capped at 1.5 s (core/startup-reads.ts). Flags re-evaluate once per burst when the subscription, quota or entitlements stores move. - TBP-762: the billing refresh rule (billing/billing-refresh.ts, port of svelte core/billing-store.ts): re-read on a renewed sign-in, live billing events and tab focus after 30 s; one retry; re-reads keep the plan on screen. The plan picker offers "Try again" for an empty or failed list. - TBP-575: a flag a route rule names re-checks the current page when it changes on the wire (setOnFlagChange) or across a reconnect re-hydrate. - Guides: TBP-705 rule block + check gates, plan features as flags; TBP-763 seatsMetric; TBP-576 MCP tools beside the CLI, no "prefer the CLI"; TBP-642/675 live-update status reasons and the troubleshooting link. - Tests: guide drift (exports, selectors, inputs, config options a guide names must exist) and the doc-currency port; tests can no longer reach production Bridge. Refs: TBP-947, TBP-810, TBP-762, TBP-575, TBP-705, TBP-763, TBP-576, TBP-642, TBP-675
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.
Brings the Angular SDK up to the Svelte SDK on the items the 2026-11-10 parity audit found missing. Version 0.9.1. Ticket: TBP-947.
What changes for people using an Angular app
Paid features show as unlocked on the first paint (TBP-810). Before, a paying user briefly saw "Upgrade to use this" on a plan-gated feature after every page load, because the plan's features arrived about a second after the page was drawn. Now the app waits for the plan's features, the billing state and the flag definitions before Angular draws the first page. Each read waits 1.5 seconds at most, so a slow network still shows the page. Flags also re-check when the plan, its features or a plan limit change, so a feature unlocks straight after an upgrade and locks after a downgrade.
Billing screens stay current (TBP-762). The plan picker, the subscription badge and the billing notice re-read:
The current plan stays on screen while they re-read. If the plan list comes back empty or fails, the picker shows Try again instead of "No plans available." This follows the Svelte SDK's rule.
A flag on a route is a live kill switch (TBP-575). When someone is on a page whose route rule names a flag, switching that flag off now moves them to the rule's redirect within about a second, without a click. A flag that changed while live updates were down is picked up when they reconnect. Flags that no route on the current page names don't trigger a check.
Guides (mcp/ and learning/)
npx @nebulr-group/bridge-cli check gates. The billing guide no longer teachesentitlements.can()as the way to gate a paid feature. A paid feature is now a flag whose rule is the plan feature, and direct plan checks appear only in an "Exceptions" section. Two learning pages that compared a user's role in code now use a flag.seatsMetric, and the billing guide does too.onStatus, and links the Live Updates Troubleshooting page.New checks
Guide drift test (
src/guide-drift.spec.ts). It reads the package with the TypeScript compiler and fails if a guide names something that doesn't exist:<bridge-…>element that isn't a component;bridge.<member>or a config option that doesn't exist.It currently checks 233 component tags and 113 imports.
Doc-currency test (
src/doc-currency.spec.ts): a port of Svelte's TBP-705/TBP-763 test that keeps the "every gate is a flag" and seat rules true in the guides.Test safety net: a test request to a real Bridge host now fails instead of reaching production.
Checks run
@nebulr-group/bridge-angular@0.9.1, 95 files, no test files in the package.Not merged, published or tagged; the release is done separately.