Skip to content

feat: add runtime release feature gates - #14245

Closed
huang47 wants to merge 10 commits into
mainfrom
codex/release-feature-gate
Closed

huang47 wants to merge 10 commits into
mainfrom
codex/release-feature-gate

Conversation

@huang47

@huang47 huang47 commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Use any PostHog key without Cloud registration.

  • useFeatureGate(key) requests Cloud evaluation and defaults to false.
  • Missing, timed-out, or failed evaluations fail closed.
  • Registered keys refresh every 30 seconds.
  • Exposure records the resolved boolean in PostHog and Datadog once per tab.
  • The demo calls /api/fastlane-demo only when enabled.

Depends on https://github.com/Comfy-Org/cloud/pull/5711.

Validation

  • 145 focused tests pass.
  • Typecheck, lint, format, knip, and local CodeRabbit pass.
  • CI is running on c3fc1c4ff7c80b978ff2dadda831926fd67ef010.

Created by Codex

@huang47 huang47 added the preview-cpu Creates a preview ephemeral environment for this PR (CPU only) label Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 07/30/2026, 06:47:46 PM UTC

Links

🎭 Playwright: ✅ 1763 passed, 0 failed · 4 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1742 / ❌ 0 / ⚠️ 4 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

📦 Bundle: 8.19 MB gzip 🔴 +2.45 kB

Details

Summary

  • Raw size: 34.4 MB baseline 34.4 MB — 🔴 +7.03 kB
  • Gzip: 8.19 MB baseline 8.19 MB — 🔴 +2.45 kB
  • Brotli: 5.67 MB baseline 5.67 MB — 🔴 +2.19 kB
  • Bundles: 426 current • 424 baseline • 8 added / 6 removed

Category Glance
Utilities & Hooks 🔴 +4.42 kB (391 kB) · Panels & Settings 🔴 +1.53 kB (555 kB) · Other 🔴 +1.08 kB (12.6 MB) · Vendor & Third-Party ⚪ 0 B (15.7 MB) · Data & Services ⚪ 0 B (3.43 MB) · Graph Workspace ⚪ 0 B (1.29 MB) · + 5 more

App Entry Points — 3.66 kB (baseline 3.66 kB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CZ3Oi0WC.js (removed) 3.66 kB — 🟢 -3.66 kB 🟢 -1.84 kB 🟢 -1.59 kB
assets/index-gQVr6ZNE.js (new) — 3.66 kB 🔴 +3.66 kB 🔴 +1.84 kB 🔴 +1.6 kB

Status: 1 added / 1 removed

Graph Workspace — 1.29 MB (baseline 1.29 MB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

Status: 2 unchanged

Views & Navigation — 112 kB (baseline 112 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

Status: 16 unchanged

Panels & Settings — 555 kB (baseline 554 kB) • 🔴 +1.53 kB

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/refreshRemoteConfig-iL0KrZGe.js (new) — 3.87 kB 🔴 +3.87 kB 🔴 +1.46 kB 🔴 +1.3 kB
assets/refreshRemoteConfig-3y0n78ou.js (removed) 2.97 kB — 🟢 -2.97 kB 🟢 -1.27 kB 🟢 -1.11 kB
assets/cloudRemoteConfig-h9u-Szfm.js (new) — 1.61 kB 🔴 +1.61 kB 🔴 +744 B 🔴 +628 B
assets/cloudRemoteConfig-De9-yFaB.js (removed) 988 B — 🟢 -988 B 🟢 -536 B 🟢 -461 B
assets/refreshRemoteConfig-B5AKaMuO.js (new) — 110 B 🔴 +110 B 🔴 +89 B 🔴 +83 B
assets/refreshRemoteConfig-BBgyAwrf.js (removed) 110 B — 🟢 -110 B 🟢 -89 B 🟢 -85 B

Status: 3 added / 3 removed / 23 unchanged

User & Accounts — 29.1 kB (baseline 29.1 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

Status: 10 unchanged

Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

Status: 7 unchanged

UI Components — 70.7 kB (baseline 70.7 kB) • ⚪ 0 B

Reusable component library chunks

Status: 15 unchanged

Data & Services — 3.43 MB (baseline 3.43 MB) • ⚪ 0 B

Stores, services, APIs, and repositories

Status: 17 unchanged

Utilities & Hooks — 391 kB (baseline 386 kB) • 🔴 +4.42 kB

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useFeatureGate-CDUvzoEd.js (new) — 4.42 kB 🔴 +4.42 kB 🔴 +1.5 kB 🔴 +1.31 kB

Status: 1 added / 36 unchanged

Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 B

External libraries and shared vendor chunks

Status: 16 unchanged

Other — 12.6 MB (baseline 12.6 MB) • 🔴 +1.08 kB

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/main-BB5J02TO.js (new) — 46.7 kB 🔴 +46.7 kB 🔴 +13.8 kB 🔴 +11.9 kB
assets/main-COQ92C04.js (removed) 46.7 kB — 🟢 -46.7 kB 🟢 -13.8 kB 🟢 -11.9 kB
assets/initHostTelemetry-DhVjN-6d.js (new) — 23.9 kB 🔴 +23.9 kB 🔴 +5.72 kB 🔴 +4.75 kB
assets/initHostTelemetry-BjPavo6H.js (removed) 23.8 kB — 🟢 -23.8 kB 🟢 -5.7 kB 🟢 -4.73 kB
assets/fastLaneFeatureFlagDemo-BCWCK6JE.js (new) — 960 B 🔴 +960 B 🔴 +531 B 🔴 +491 B

Status: 3 added / 2 removed / 276 unchanged

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.5 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.9 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.3 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 53.3 MB heap
large-graph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.3 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.2 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.7 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 65.6 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 53.9 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.1 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 46.4 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 140ms TBT · 71.3 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 66.8 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 159.4 MB heap
vue-large-graph-pan: · 56.2 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 200ms TBT · 159.0 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.9 MB heap

⚠️ 6 regressions detected

Show regressions
Metric Baseline PR (median) Δ Sig
canvas-idle: task duration 624ms 505ms -19% ⚠️ z=3.5
canvas-zoom-sweep: task duration 445ms 404ms -9% ⚠️ z=3.3
large-graph-idle: task duration 793ms 687ms -13% ⚠️ z=2.7
large-graph-pan: task duration 1444ms 1278ms -11% ⚠️ z=4.6
minimap-idle: task duration 790ms 734ms -7% ⚠️ z=4.4
subgraph-idle: task duration 570ms 497ms -13% ⚠️ z=4.0
All metrics
Metric Baseline PR (median) Δ Sig
canvas-idle: avg frame time 17ms 17ms +0% z=-0.1
canvas-idle: p95 frame time 17ms 17ms +0% —
canvas-idle: layout duration 0ms 0ms +0% —
canvas-idle: style recalc duration 8ms 9ms +19% z=-1.5
canvas-idle: layout count 0 0 +0% —
canvas-idle: style recalc count 8 10 +25% z=-2.1
canvas-idle: task duration 624ms 505ms -19% ⚠️ z=3.5
canvas-idle: script duration 24ms 21ms -13% z=-2.0
canvas-idle: TBT 0ms 0ms +0% —
canvas-idle: heap used 68.9 MB 56.5 MB -18% —
canvas-idle: DOM nodes 16 -129 -903% z=-118.5
canvas-idle: event listeners 4 -72 -1900% z=-17.7
canvas-mouse-sweep: avg frame time 17ms 17ms +0% z=-0.9
canvas-mouse-sweep: p95 frame time 17ms 17ms +0% —
canvas-mouse-sweep: layout duration 4ms 4ms -7% z=-0.5
canvas-mouse-sweep: style recalc duration 43ms 38ms -12% z=-1.4
canvas-mouse-sweep: layout count 12 12 +0% —
canvas-mouse-sweep: style recalc count 75 74 -1% z=-2.0
canvas-mouse-sweep: task duration 996ms 878ms -12% z=0.2
canvas-mouse-sweep: script duration 125ms 125ms +1% z=-1.6
canvas-mouse-sweep: TBT 0ms 0ms +0% —
canvas-mouse-sweep: heap used 50.7 MB 56.9 MB +12% —
canvas-mouse-sweep: DOM nodes -281 -114 -60% z=-68.0
canvas-mouse-sweep: event listeners -148 -72 -51% z=-19.3
canvas-zoom-sweep: avg frame time 17ms 17ms +0% z=0.5
canvas-zoom-sweep: p95 frame time 17ms 17ms -0% —
canvas-zoom-sweep: layout duration 1ms 1ms +2% z=0.8
canvas-zoom-sweep: style recalc duration 19ms 18ms -9% z=-1.1
canvas-zoom-sweep: layout count 6 6 +0% —
canvas-zoom-sweep: style recalc count 30 32 +5% z=0.5
canvas-zoom-sweep: task duration 445ms 404ms -9% ⚠️ z=3.3
canvas-zoom-sweep: script duration 25ms 23ms -10% z=-1.5
canvas-zoom-sweep: TBT 0ms 0ms +0% —
canvas-zoom-sweep: heap used 72.3 MB 72.3 MB +0% —
canvas-zoom-sweep: DOM nodes 76 78 +2% z=-2.2
canvas-zoom-sweep: event listeners 19 19 +0% z=-0.9
dom-widget-clipping: avg frame time 17ms 17ms -0% z=-0.6
dom-widget-clipping: p95 frame time 17ms 17ms -1% —
dom-widget-clipping: layout duration 0ms 0ms +0% —
dom-widget-clipping: style recalc duration 8ms 7ms -7% z=-3.1
dom-widget-clipping: layout count 0 0 +0% —
dom-widget-clipping: style recalc count 11 11 +0% z=-4.2
dom-widget-clipping: task duration 415ms 369ms -11% z=0.3
dom-widget-clipping: script duration 61ms 58ms -5% z=-3.0
dom-widget-clipping: TBT 0ms 0ms +0% —
dom-widget-clipping: heap used 53.2 MB 53.3 MB +0% —
dom-widget-clipping: DOM nodes 18 18 +0% z=-2.9
dom-widget-clipping: event listeners 0 1 — variance too high
large-graph-idle: avg frame time 17ms 17ms +0% z=-0.6
large-graph-idle: p95 frame time 17ms 17ms +0% —
large-graph-idle: layout duration 0ms 0ms +0% —
large-graph-idle: style recalc duration 8ms 8ms -2% z=-3.7
large-graph-idle: layout count 0 0 +0% —
large-graph-idle: style recalc count 9 9 -6% z=-9.9
large-graph-idle: task duration 793ms 687ms -13% ⚠️ z=2.7
large-graph-idle: script duration 109ms 113ms +3% z=1.0
large-graph-idle: TBT 0ms 0ms +0% —
large-graph-idle: heap used 64.2 MB 64.3 MB +0% —
large-graph-idle: DOM nodes -280 -282 +1% z=-338.8
large-graph-idle: event listeners -144 -144 +0% z=-27.9
large-graph-pan: avg frame time 17ms 17ms -0% z=-0.2
large-graph-pan: p95 frame time 17ms 17ms +0% —
large-graph-pan: layout duration 0ms 0ms +0% —
large-graph-pan: style recalc duration 15ms 14ms -5% z=-3.9
large-graph-pan: layout count 0 0 +0% —
large-graph-pan: style recalc count 69 69 -1% z=-1.7
large-graph-pan: task duration 1444ms 1278ms -11% ⚠️ z=4.6
large-graph-pan: script duration 455ms 425ms -7% z=0.9
large-graph-pan: TBT 0ms 0ms +0% —
large-graph-pan: heap used 59.8 MB 61.2 MB +2% —
large-graph-pan: DOM nodes -284 -286 +1% z=-184.6
large-graph-pan: event listeners -144 -143 -1% z=-178.6
large-graph-zoom: avg frame time 17ms 17ms -0% —
large-graph-zoom: p95 frame time 17ms 17ms -0% —
large-graph-zoom: layout duration 8ms 7ms -11% —
large-graph-zoom: style recalc duration 16ms 15ms -6% —
large-graph-zoom: layout count 60 60 +0% —
large-graph-zoom: style recalc count 65 66 +1% —
large-graph-zoom: task duration 1701ms 1523ms -10% —
large-graph-zoom: script duration 574ms 530ms -8% —
large-graph-zoom: TBT 0ms 0ms +0% —
large-graph-zoom: heap used 70.7 MB 56.7 MB -20% —
large-graph-zoom: DOM nodes -288 -286 -1% —
large-graph-zoom: event listeners -148 -148 +0% —
minimap-idle: avg frame time 17ms 17ms +0% z=0.1
minimap-idle: p95 frame time 17ms 17ms -1% —
minimap-idle: layout duration 0ms 0ms +0% —
minimap-idle: style recalc duration 7ms 8ms +8% z=-2.2
minimap-idle: layout count 0 0 +0% —
minimap-idle: style recalc count 7 8 +7% z=-3.0
minimap-idle: task duration 790ms 734ms -7% ⚠️ z=4.4
minimap-idle: script duration 113ms 115ms +2% z=1.7
minimap-idle: TBT 0ms 0ms +0% —
minimap-idle: heap used 66.0 MB 65.6 MB -1% —
minimap-idle: DOM nodes -283 -285 +1% z=-222.0
minimap-idle: event listeners -142 -144 +1% z=-225.0
subgraph-dom-widget-clipping: avg frame time 17ms 17ms -0% z=-0.4
subgraph-dom-widget-clipping: p95 frame time 17ms 17ms -1% —
subgraph-dom-widget-clipping: layout duration 0ms 0ms +0% —
subgraph-dom-widget-clipping: style recalc duration 11ms 10ms -9% z=-2.8
subgraph-dom-widget-clipping: layout count 0 0 +0% —
subgraph-dom-widget-clipping: style recalc count 46 47 +2% z=-1.6
subgraph-dom-widget-clipping: task duration 445ms 403ms -10% z=1.3
subgraph-dom-widget-clipping: script duration 129ms 116ms -11% z=-2.0
subgraph-dom-widget-clipping: TBT 0ms 0ms +0% —
subgraph-dom-widget-clipping: heap used 53.6 MB 53.9 MB +0% —
subgraph-dom-widget-clipping: DOM nodes 18 20 +11% z=-1.9
subgraph-dom-widget-clipping: event listeners 8 7 -13% z=-1.6
subgraph-idle: avg frame time 17ms 17ms +0% z=0.4
subgraph-idle: p95 frame time 17ms 17ms +1% —
subgraph-idle: layout duration 0ms 0ms +0% —
subgraph-idle: style recalc duration 8ms 8ms -5% z=-3.1
subgraph-idle: layout count 0 0 +0% —
subgraph-idle: style recalc count 9 10 +6% z=-2.1
subgraph-idle: task duration 570ms 497ms -13% ⚠️ z=4.0
subgraph-idle: script duration 20ms 13ms -34% z=-2.7
subgraph-idle: TBT 0ms 0ms +0% —
subgraph-idle: heap used 69.0 MB 69.1 MB +0% —
subgraph-idle: DOM nodes 18 19 +6% z=-1.9
subgraph-idle: event listeners 4 4 +0% variance too high
subgraph-mouse-sweep: avg frame time 17ms 17ms +0% z=0.4
subgraph-mouse-sweep: p95 frame time 17ms 17ms +0% —
subgraph-mouse-sweep: layout duration 5ms 4ms -15% z=-1.1
subgraph-mouse-sweep: style recalc duration 43ms 40ms -7% z=-0.7
subgraph-mouse-sweep: layout count 16 16 +0% —
subgraph-mouse-sweep: style recalc count 77 77 -1% z=-1.9
subgraph-mouse-sweep: task duration 922ms 840ms -9% z=1.1
subgraph-mouse-sweep: script duration 96ms 95ms -2% z=-0.9
subgraph-mouse-sweep: TBT 0ms 0ms +0% —
subgraph-mouse-sweep: heap used 60.3 MB 46.4 MB -23% —
subgraph-mouse-sweep: DOM nodes 63 -279 -543% z=-154.8
subgraph-mouse-sweep: event listeners 4 -148 -3800% variance too high
subgraph-transition-enter: avg frame time 17ms 17ms +0% —
subgraph-transition-enter: p95 frame time 17ms 17ms +1% —
subgraph-transition-enter: layout duration 12ms 12ms +2% —
subgraph-transition-enter: style recalc duration 29ms 29ms +3% —
subgraph-transition-enter: layout count 16 14 -13% —
subgraph-transition-enter: style recalc count 20 18 -10% —
subgraph-transition-enter: task duration 969ms 904ms -7% —
subgraph-transition-enter: script duration 39ms 32ms -17% —
subgraph-transition-enter: TBT 139ms 140ms +1% —
subgraph-transition-enter: heap used 71.4 MB 71.3 MB -0% —
subgraph-transition-enter: DOM nodes 13673 13673 +0% —
subgraph-transition-enter: event listeners 2371 2371 +0% —
viewport-pan-sweep: avg frame time 17ms 17ms +0% —
viewport-pan-sweep: p95 frame time 17ms 17ms -1% —
viewport-pan-sweep: layout duration 0ms 0ms +0% —
viewport-pan-sweep: style recalc duration 41ms 37ms -10% —
viewport-pan-sweep: layout count 0 0 +0% —
viewport-pan-sweep: style recalc count 250 250 +0% —
viewport-pan-sweep: task duration 5133ms 4511ms -12% —
viewport-pan-sweep: script duration 1463ms 1392ms -5% —
viewport-pan-sweep: TBT 0ms 0ms +0% —
viewport-pan-sweep: heap used 62.1 MB 66.8 MB +7% —
viewport-pan-sweep: DOM nodes -280 -282 +1% —
viewport-pan-sweep: event listeners -128 -127 -1% —
vue-large-graph-idle: avg frame time 17ms 18ms +3% —
vue-large-graph-idle: p95 frame time 17ms 17ms -0% —
vue-large-graph-idle: layout duration 0ms 0ms +0% —
vue-large-graph-idle: style recalc duration 0ms 0ms +0% —
vue-large-graph-idle: layout count 0 0 +0% —
vue-large-graph-idle: style recalc count 0 0 +0% —
vue-large-graph-idle: task duration 15734ms 16740ms +6% —
vue-large-graph-idle: script duration 558ms 546ms -2% —
vue-large-graph-idle: TBT 0ms 0ms +0% —
vue-large-graph-idle: heap used 159.8 MB 159.4 MB -0% —
vue-large-graph-idle: DOM nodes -8312 -8314 +0% —
vue-large-graph-idle: event listeners -16387 -16386 -0% —
vue-large-graph-pan: avg frame time 18ms 18ms +0% —
vue-large-graph-pan: p95 frame time 17ms 17ms +0% —
vue-large-graph-pan: layout duration 0ms 0ms +0% —
vue-large-graph-pan: style recalc duration 18ms 17ms -4% —
vue-large-graph-pan: layout count 0 0 +0% —
vue-large-graph-pan: style recalc count 125 142 +13% —
vue-large-graph-pan: task duration 18972ms 20497ms +8% —
vue-large-graph-pan: script duration 921ms 897ms -3% —
vue-large-graph-pan: TBT 74ms 200ms +170% —
vue-large-graph-pan: heap used 159.6 MB 159.0 MB -0% —
vue-large-graph-pan: DOM nodes -8312 -8312 +0% —
vue-large-graph-pan: event listeners -16385 -16381 -0% —
workflow-execution: avg frame time 17ms 17ms +0% z=0.6
workflow-execution: p95 frame time 17ms 17ms +0% —
workflow-execution: layout duration 1ms 1ms +33% z=-4.2
workflow-execution: style recalc duration 20ms 16ms -21% z=-3.8
workflow-execution: layout count 3 3 +0% z=-3.6
workflow-execution: style recalc count 10 10 +0% z=-3.8
workflow-execution: task duration 127ms 96ms -24% z=-2.5
workflow-execution: script duration 10ms 8ms -23% z=-7.2
workflow-execution: TBT 0ms 0ms +0% —
workflow-execution: heap used 48.9 MB 57.9 MB +18% —
workflow-execution: DOM nodes 115 130 +13% z=-4.4
workflow-execution: event listeners 65 49 -25% z=-0.7
Historical variance (last 15 runs)
Metric μ σ CV
canvas-idle: avg frame time 17ms 0ms 0.0%
canvas-idle: layout duration 0ms 0ms 0.0%
canvas-idle: style recalc duration 11ms 1ms 8.2%
canvas-idle: layout count 0 0 0.0%
canvas-idle: style recalc count 11 1 5.0%
canvas-idle: task duration 395ms 31ms 7.9%
canvas-idle: script duration 25ms 2ms 8.8%
canvas-idle: TBT 0ms 0ms 0.0%
canvas-idle: DOM nodes 23 1 5.6%
canvas-idle: event listeners 12 5 40.9%
canvas-mouse-sweep: avg frame time 17ms 0ms 0.0%
canvas-mouse-sweep: layout duration 4ms 0ms 5.4%
canvas-mouse-sweep: style recalc duration 43ms 3ms 7.4%
canvas-mouse-sweep: layout count 12 0 0.0%
canvas-mouse-sweep: style recalc count 79 2 3.0%
canvas-mouse-sweep: task duration 865ms 58ms 6.7%
canvas-mouse-sweep: script duration 136ms 6ms 4.8%
canvas-mouse-sweep: TBT 0ms 0ms 0.0%
canvas-mouse-sweep: DOM nodes 62 3 4.2%
canvas-mouse-sweep: event listeners 8 4 49.4%
canvas-zoom-sweep: avg frame time 17ms 0ms 0.0%
canvas-zoom-sweep: layout duration 1ms 0ms 7.0%
canvas-zoom-sweep: style recalc duration 19ms 2ms 8.0%
canvas-zoom-sweep: layout count 6 0 0.0%
canvas-zoom-sweep: style recalc count 31 0 1.5%
canvas-zoom-sweep: task duration 327ms 23ms 7.1%
canvas-zoom-sweep: script duration 27ms 3ms 11.1%
canvas-zoom-sweep: TBT 0ms 0ms 0.0%
canvas-zoom-sweep: DOM nodes 79 1 1.0%
canvas-zoom-sweep: event listeners 24 5 21.8%
dom-widget-clipping: avg frame time 17ms 0ms 0.0%
dom-widget-clipping: layout duration 0ms 0ms 0.0%
dom-widget-clipping: style recalc duration 10ms 1ms 8.0%
dom-widget-clipping: layout count 0 0 0.0%
dom-widget-clipping: style recalc count 13 0 3.8%
dom-widget-clipping: task duration 365ms 16ms 4.5%
dom-widget-clipping: script duration 68ms 3ms 4.8%
dom-widget-clipping: TBT 0ms 0ms 0.0%
dom-widget-clipping: DOM nodes 22 1 6.4%
dom-widget-clipping: event listeners 8 6 81.2%
large-graph-idle: avg frame time 17ms 0ms 0.0%
large-graph-idle: layout duration 0ms 0ms 0.0%
large-graph-idle: style recalc duration 12ms 1ms 8.6%
large-graph-idle: layout count 0 0 0.0%
large-graph-idle: style recalc count 12 0 2.7%
large-graph-idle: task duration 542ms 54ms 10.0%
large-graph-idle: script duration 102ms 11ms 10.3%
large-graph-idle: TBT 0ms 0ms 0.0%
large-graph-idle: DOM nodes 25 1 3.7%
large-graph-idle: event listeners 26 6 23.2%
large-graph-pan: avg frame time 17ms 0ms 0.0%
large-graph-pan: layout duration 0ms 0ms 0.0%
large-graph-pan: style recalc duration 17ms 1ms 4.6%
large-graph-pan: layout count 0 0 0.0%
large-graph-pan: style recalc count 70 1 0.9%
large-graph-pan: task duration 1082ms 43ms 4.0%
large-graph-pan: script duration 408ms 20ms 4.8%
large-graph-pan: TBT 0ms 0ms 0.0%
large-graph-pan: DOM nodes 19 2 8.7%
large-graph-pan: event listeners 5 1 16.8%
minimap-idle: avg frame time 17ms 0ms 0.0%
minimap-idle: layout duration 0ms 0ms 0.0%
minimap-idle: style recalc duration 10ms 1ms 8.6%
minimap-idle: layout count 0 0 0.0%
minimap-idle: style recalc count 10 1 7.1%
minimap-idle: task duration 527ms 47ms 9.0%
minimap-idle: script duration 98ms 10ms 10.1%
minimap-idle: TBT 0ms 0ms 0.0%
minimap-idle: DOM nodes 19 1 7.1%
minimap-idle: event listeners 5 1 14.4%
subgraph-dom-widget-clipping: avg frame time 17ms 0ms 0.0%
subgraph-dom-widget-clipping: layout duration 0ms 0ms 0.0%
subgraph-dom-widget-clipping: style recalc duration 13ms 1ms 7.4%
subgraph-dom-widget-clipping: layout count 0 0 0.0%
subgraph-dom-widget-clipping: style recalc count 48 1 1.2%
subgraph-dom-widget-clipping: task duration 378ms 18ms 4.9%
subgraph-dom-widget-clipping: script duration 128ms 6ms 4.9%
subgraph-dom-widget-clipping: TBT 0ms 0ms 0.0%
subgraph-dom-widget-clipping: DOM nodes 22 1 5.0%
subgraph-dom-widget-clipping: event listeners 16 6 36.0%
subgraph-idle: avg frame time 17ms 0ms 0.0%
subgraph-idle: layout duration 0ms 0ms 0.0%
subgraph-idle: style recalc duration 10ms 1ms 7.5%
subgraph-idle: layout count 0 0 0.0%
subgraph-idle: style recalc count 11 1 6.0%
subgraph-idle: task duration 370ms 31ms 8.5%
subgraph-idle: script duration 20ms 3ms 13.2%
subgraph-idle: TBT 0ms 0ms 0.0%
subgraph-idle: DOM nodes 22 1 6.9%
subgraph-idle: event listeners 10 7 64.5%
subgraph-mouse-sweep: avg frame time 17ms 0ms 0.0%
subgraph-mouse-sweep: layout duration 5ms 0ms 6.8%
subgraph-mouse-sweep: style recalc duration 42ms 3ms 7.8%
subgraph-mouse-sweep: layout count 16 0 0.0%
subgraph-mouse-sweep: style recalc count 80 2 2.4%
subgraph-mouse-sweep: task duration 766ms 69ms 9.0%
subgraph-mouse-sweep: script duration 101ms 7ms 6.5%
subgraph-mouse-sweep: TBT 0ms 0ms 0.0%
subgraph-mouse-sweep: DOM nodes 67 2 3.3%
subgraph-mouse-sweep: event listeners 8 4 52.6%
workflow-execution: avg frame time 17ms 0ms 0.0%
workflow-execution: layout duration 2ms 0ms 9.4%
workflow-execution: style recalc duration 24ms 2ms 9.1%
workflow-execution: layout count 5 1 11.0%
workflow-execution: style recalc count 18 2 11.5%
workflow-execution: task duration 123ms 11ms 8.8%
workflow-execution: script duration 29ms 3ms 10.2%
workflow-execution: TBT 0ms 0ms 0.0%
workflow-execution: DOM nodes 161 7 4.4%
workflow-execution: event listeners 52 4 8.4%
Trend (last 15 commits on main)
Metric Trend Dir Latest
canvas-idle: avg frame time ▆▃▆▁▆▃▆█▆▆▄▃▃▄▃ ➡️ 17ms
canvas-idle: p95 frame time ➡️ NaNms
canvas-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-idle: style recalc duration ▇▇▆▆▃█▄▃▄▃▇▄▁▆▇ ➡️ 11ms
canvas-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
canvas-idle: style recalc count █▃▅▂▅▆▃▁▂▁▂▅▆▅▆ ➡️ 12
canvas-idle: task duration ▃▃▃▆▂▃▃▅▆▂█▃▁▃▃ ➡️ 391ms
canvas-idle: script duration ▄▃▅▇▂▅▃▆▇▅█▄▁▅▆ ➡️ 27ms
canvas-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-idle: heap used ➡️ NaN MB
canvas-idle: DOM nodes █▇▆▅▃▇▃▁▂▂▅▆▆▆▇ ➡️ 24
canvas-idle: event listeners ▅█▅▄▁▅▁▁▁▄▅▅▁▅▄ 📉 11
canvas-mouse-sweep: avg frame time ▆█▆▃▁▃▁▆▆▁▃▆▆▃▃ ➡️ 17ms
canvas-mouse-sweep: p95 frame time ➡️ NaNms
canvas-mouse-sweep: layout duration ▁▃▂▄▁▂▁▃▆▂█▇▆▄▃ ➡️ 4ms
canvas-mouse-sweep: style recalc duration ▄▄▂▄▁▂▃▃▅▄█▆▂▄▄ ➡️ 43ms
canvas-mouse-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 12
canvas-mouse-sweep: style recalc count █▅▄▃▂▂▁▄▄▅▆▅▂▇▄ ➡️ 79
canvas-mouse-sweep: task duration █▆▄▂▂▃▂▄▄▅█▆▁▆▄ ➡️ 868ms
canvas-mouse-sweep: script duration ▄▅▄▆▄▆▆▆▅▅█▆▁▅▆ ➡️ 139ms
canvas-mouse-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-mouse-sweep: heap used ➡️ NaN MB
canvas-mouse-sweep: DOM nodes █▅▃▃▁▂▂▃▂▄▆▅▃▅▅ ➡️ 64
canvas-mouse-sweep: event listeners █▁▁▁▁▁▇▁▁▁██▇▁█ 📈 13
canvas-zoom-sweep: avg frame time ▅▅█▄▅▁▁▁▅▁▁▅▄▅▁ ➡️ 17ms
canvas-zoom-sweep: p95 frame time ➡️ NaNms
canvas-zoom-sweep: layout duration ▆▅▅▄▁▁█▅▃▅▇▆▁▂▆ ➡️ 1ms
canvas-zoom-sweep: style recalc duration ▆▅▄▆▅▃█▆▇▅▇▄▁▃▅ ➡️ 20ms
canvas-zoom-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 6
canvas-zoom-sweep: style recalc count ▁▁▃▄▆▃▆█▄▄▆▁▆▁▆ ➡️ 32
canvas-zoom-sweep: task duration ▄▂▁▇▂▂▄▅▆▃█▄▁▁▅ ➡️ 338ms
canvas-zoom-sweep: script duration ▃▃▂▇▂▂▅▇▆▅█▄▁▂▆ ➡️ 30ms
canvas-zoom-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-zoom-sweep: heap used ➡️ NaN MB
canvas-zoom-sweep: DOM nodes ▄▃▁▅█▁▃▆▄▅▅▃▃▄▃ ➡️ 79
canvas-zoom-sweep: event listeners ▁▁▂▅█▂▁▅▁▅▅▄▁▅▁ ➡️ 19
dom-widget-clipping: avg frame time ▂▄▅▅▂▄█▇▅▇▇▅▅▁▇ ➡️ 17ms
dom-widget-clipping: p95 frame time ➡️ NaNms
dom-widget-clipping: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-clipping: style recalc duration ▆▆▂▆▄▃██▄▁▆▇▆▃▅ ➡️ 10ms
dom-widget-clipping: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-clipping: style recalc count ▇█▅█▅▄█▇▇▁▇▄▇▂▅ ➡️ 13
dom-widget-clipping: task duration ▃▃▁▅▄▃▅▆▅▂▇█▁▅▅ ➡️ 371ms
dom-widget-clipping: script duration ▅▄▄▆▆▅▇▇▆▃█▇▁▇▇ ➡️ 71ms
dom-widget-clipping: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-clipping: heap used ➡️ NaN MB
dom-widget-clipping: DOM nodes ▇▇▄▇▅▄█▇▅▁▅▄▇▃▄ ➡️ 21
dom-widget-clipping: event listeners ▅▅▅▅▁▅██▁▁▁▁█▁▁ 📉 2
large-graph-idle: avg frame time ▅▅▅▅▅▂▁▂▄▅▄▂▂▅█ ➡️ 17ms
large-graph-idle: p95 frame time ➡️ NaNms
large-graph-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-idle: style recalc duration ▅▅▅▆▄▅▃▄▅▅▆█▁▄▆ ➡️ 13ms
large-graph-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
large-graph-idle: style recalc count █▆█▃▃▁▃▆▃▆▆▃▆██ ➡️ 12
large-graph-idle: task duration ▂▃▂▆▂▃▃▇▅▃██▁▂▅ ➡️ 569ms
large-graph-idle: script duration ▄▅▄▆▄▅▅▇▆▅█▆▁▃▆ ➡️ 110ms
large-graph-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-idle: heap used ➡️ NaN MB
large-graph-idle: DOM nodes ▆█▅▂▅▃▁▂▃▅▅▆▂▆▅ ➡️ 25
large-graph-idle: event listeners ███▇██▄▁▄▇▇█▂█▇ ➡️ 29
large-graph-pan: avg frame time ▆▃▃▆█▃▁█▆▆▆▆█▁▆ ➡️ 17ms
large-graph-pan: p95 frame time ➡️ NaNms
large-graph-pan: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-pan: style recalc duration ▃▂▄▄▁▅▂▂▁▄▄█▃▁▂ ➡️ 17ms
large-graph-pan: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
large-graph-pan: style recalc count ▆▃█▂▃▂▂▂▁▇▅▃█▆▃ ➡️ 69
large-graph-pan: task duration ▄▃▄▆▄▄▄▆▄▄█▆▁▂▅ ➡️ 1100ms
large-graph-pan: script duration ▅▄▅▆▆▅▄▆▄▅█▄▁▄▅ ➡️ 413ms
large-graph-pan: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-pan: heap used ➡️ NaN MB
large-graph-pan: DOM nodes ▅▃▆▂▄▁▃▁▁▅▁▂█▅▂ ➡️ 18
large-graph-pan: event listeners █▆█▁▁▆▁▁▃▆▁▃██▃ ➡️ 5
minimap-idle: avg frame time ▃▆▆▃█▁█▆▆▃▃▆█▆█ ➡️ 17ms
minimap-idle: p95 frame time ➡️ NaNms
minimap-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
minimap-idle: style recalc duration ▄█▁█▅▅█▅▅▃▅▁▁▄▆ ➡️ 10ms
minimap-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
minimap-idle: style recalc count ▃▅▂▄█▃▆▁▂▅▂▁▅▆▃ ➡️ 9
minimap-idle: task duration ▃▄▁▅▁▃▄▅▇▃█▅▁▁▅ ➡️ 547ms
minimap-idle: script duration ▄▆▃▇▃▅▆▆▇▅█▅▁▃▆ ➡️ 106ms
minimap-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
minimap-idle: heap used ➡️ NaN MB
minimap-idle: DOM nodes ▃▅▂▄█▃▆▁▂▅▂▁▅▆▃ ➡️ 19
minimap-idle: event listeners ▃▃▆▁▁▁▃▁▁▆▁▃█▆▁ ➡️ 4
subgraph-dom-widget-clipping: avg frame time ▅▄▄▄▄▄█▄▄▄▃▁▆▃▃ ➡️ 17ms
subgraph-dom-widget-clipping: p95 frame time ➡️ NaNms
subgraph-dom-widget-clipping: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-dom-widget-clipping: style recalc duration ▂▄▃▅▅▃▂▅▇▃▄█▁▄▆ ➡️ 14ms
subgraph-dom-widget-clipping: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
subgraph-dom-widget-clipping: style recalc count ▇█▆▃▆▃▁▆█▇▃▆▇█▅ ➡️ 48
subgraph-dom-widget-clipping: task duration ▂▃▃▆▅▅▂▅█▂▆█▁▂▇ ➡️ 398ms
subgraph-dom-widget-clipping: script duration ▃▃▃▄▅▅▂▄█▂▅▇▁▂▅ ➡️ 131ms
subgraph-dom-widget-clipping: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-dom-widget-clipping: heap used ➡️ NaN MB
subgraph-dom-widget-clipping: DOM nodes ▅▇▅▂▅▂▁▅▅▅▁▇▅█▄ ➡️ 22
subgraph-dom-widget-clipping: event listeners ▅▅▅▂▅▁▅██▁▁█▅█▅ 📈 16
subgraph-idle: avg frame time ▆▆█▁▆▃▆▆▆▃▆▁▃▆█ ➡️ 17ms
subgraph-idle: p95 frame time ➡️ NaNms
subgraph-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-idle: style recalc duration ▁▇▃▆▂▄▂▃▃▆▆▄▃▇█ ➡️ 12ms
subgraph-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
subgraph-idle: style recalc count ▃▆▃▃▂▅▁▂▁▆▃▃██▇ ➡️ 12
subgraph-idle: task duration ▁▃▁▇▁▁▃▆▅▂█▅▁▁▄ ➡️ 378ms
subgraph-idle: script duration ▁▃▂▇▁▂▃▇▆▂█▅▂▁▅ ➡️ 22ms
subgraph-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-idle: heap used ➡️ NaN MB
subgraph-idle: DOM nodes ▃▅▃▂▁▄▁▂▁▅▃▂▇█▇ ➡️ 24
subgraph-idle: event listeners ▁▅▁▁▁▁▁▁▁▅▄▁███ 📈 21
subgraph-mouse-sweep: avg frame time ▅▄▁▃▃▄▆▄▆▃▃█▁▃▃ ➡️ 17ms
subgraph-mouse-sweep: p95 frame time ➡️ NaNms
subgraph-mouse-sweep: layout duration ▁▄▄▄▃▃▅▅▅▂█▇▂▃▆ ➡️ 5ms
subgraph-mouse-sweep: style recalc duration ▃▂▄▅▂▃▄▅█▃█▆▁▂▅ ➡️ 43ms
subgraph-mouse-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 16
subgraph-mouse-sweep: style recalc count ▅▂▅▅▁▄▃▅█▅▆▄▂▄▅ ➡️ 81
subgraph-mouse-sweep: task duration ▃▂▄▅▂▄▄▅▇▄█▆▁▃▅ ➡️ 785ms
subgraph-mouse-sweep: script duration ▄▅▄▇▅▅▆▇▆▅██▁▄▆ ➡️ 105ms
subgraph-mouse-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-mouse-sweep: heap used ➡️ NaN MB
subgraph-mouse-sweep: DOM nodes ▅▁▄▅▁▄▃▃█▅▅▄▂▅▃ ➡️ 66
subgraph-mouse-sweep: event listeners ▇▁▂▇▁▂▂▂█▇▂▂▇▇▂ 📈 5
workflow-execution: avg frame time ▆▆▆▄▆▆▃▄▁▄█▆▅▄▆ ➡️ 17ms
workflow-execution: p95 frame time ➡️ NaNms
workflow-execution: layout duration ▁▆▁▃▂▄▃▂▃▃▅█▄▂▅ ➡️ 2ms
workflow-execution: style recalc duration ▃▇▅▇▁▅▆▇█▁██▂▄▆ ➡️ 25ms
workflow-execution: layout count ▁█▂▃▂▃▃▁▃▃▄▃▂▃▂ ➡️ 5
workflow-execution: style recalc count ▃█▅▇▁▄▅▆▅▅▅▅▄▄▂ ➡️ 15
workflow-execution: task duration ▂▅▄▅▁▄▆▆▆▁▇█▁▃▃ ➡️ 120ms
workflow-execution: script duration ▄▃▄▄▃▅▄▅▆▂▇█▁▃▄ ➡️ 29ms
workflow-execution: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
workflow-execution: heap used ➡️ NaN MB
workflow-execution: DOM nodes ▂█▃▆▁▄▃▅▃█▃▃▄▃▁ ➡️ 152
workflow-execution: event listeners ▅███▁▅███▁██▅█▅ ➡️ 49
Raw data
{
  "timestamp": "2026-07-30T18:58:17.734Z",
  "gitSha": "9ac922caafd7ff87e06de948191c4bab3e2144e9",
  "branch": "codex/release-feature-gate",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2077.7940000000117,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 9.870000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 554.665,
      "heapDeltaBytes": -21707784,
      "heapUsedBytes": 46113224,
      "domNodes": -277,
      "jsHeapTotalBytes": 20176896,
      "scriptDurationMs": 25.877000000000002,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2039.1839999999775,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 9.024,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 455.071,
      "heapDeltaBytes": 4613668,
      "heapUsedBytes": 72405808,
      "domNodes": 20,
      "jsHeapTotalBytes": 20836352,
      "scriptDurationMs": 15.789000000000001,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1919.204000000036,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 41.668,
      "layouts": 12,
      "layoutDurationMs": 3.7689999999999997,
      "taskDurationMs": 947.1480000000001,
      "heapDeltaBytes": -15422988,
      "heapUsedBytes": 52474272,
      "domNodes": -282,
      "jsHeapTotalBytes": 20701184,
      "scriptDurationMs": 131.59199999999998,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1801.396000000011,
      "styleRecalcs": 73,
      "styleRecalcDurationMs": 34.671,
      "layouts": 12,
      "layoutDurationMs": 3.2710000000000004,
      "taskDurationMs": 809.675,
      "heapDeltaBytes": -824212,
      "heapUsedBytes": 66931604,
      "domNodes": 55,
      "jsHeapTotalBytes": 21360640,
      "scriptDurationMs": 119.31,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1723.1350000000134,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 15.675,
      "layouts": 6,
      "layoutDurationMs": 0.627,
      "taskDurationMs": 358.089,
      "heapDeltaBytes": 7868876,
      "heapUsedBytes": 75707620,
      "domNodes": 77,
      "jsHeapTotalBytes": 20574208,
      "scriptDurationMs": 16.936,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1726.2130000000298,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 19.346,
      "layouts": 6,
      "layoutDurationMs": 0.7279999999999999,
      "taskDurationMs": 449.04299999999995,
      "heapDeltaBytes": 7842544,
      "heapUsedBytes": 75883244,
      "domNodes": 78,
      "jsHeapTotalBytes": 20312064,
      "scriptDurationMs": 28.543000000000003,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 577.8590000000463,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.323999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 378.19399999999996,
      "heapDeltaBytes": -11873656,
      "heapUsedBytes": 55860604,
      "domNodes": 18,
      "jsHeapTotalBytes": 21360640,
      "scriptDurationMs": 57.10199999999999,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 583.3769999999845,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.532000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 359.906,
      "heapDeltaBytes": -11746104,
      "heapUsedBytes": 55989368,
      "domNodes": 18,
      "jsHeapTotalBytes": 21884928,
      "scriptDurationMs": 59.028999999999996,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2039.0520000000265,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.037999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 705.762,
      "heapDeltaBytes": 8578880,
      "heapUsedBytes": 67434264,
      "domNodes": -280,
      "jsHeapTotalBytes": 4517888,
      "scriptDurationMs": 119.93299999999999,
      "eventListeners": -144,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2033.0729999999448,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.615,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 668.483,
      "heapDeltaBytes": 8361008,
      "heapUsedBytes": 67328704,
      "domNodes": -283,
      "jsHeapTotalBytes": 3469312,
      "scriptDurationMs": 105.308,
      "eventListeners": -144,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2139.3149999999537,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 13.609000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1250.3120000000001,
      "heapDeltaBytes": 5186504,
      "heapUsedBytes": 66034864,
      "domNodes": -285,
      "jsHeapTotalBytes": 4481024,
      "scriptDurationMs": 421.37600000000003,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2172.753999999941,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 14.712,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1305.796,
      "heapDeltaBytes": 2352104,
      "heapUsedBytes": 62257312,
      "domNodes": -286,
      "jsHeapTotalBytes": 4743168,
      "scriptDurationMs": 429.158,
      "eventListeners": -144,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3180.7870000000094,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 14.454999999999998,
      "layouts": 60,
      "layoutDurationMs": 6.843,
      "taskDurationMs": 1483.0299999999997,
      "heapDeltaBytes": -2066032,
      "heapUsedBytes": 59111760,
      "domNodes": -285,
      "jsHeapTotalBytes": 7401472,
      "scriptDurationMs": 515.475,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3181.789999999978,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 16.073999999999998,
      "layouts": 60,
      "layoutDurationMs": 7.53,
      "taskDurationMs": 1562.678,
      "heapDeltaBytes": -1500844,
      "heapUsedBytes": 59815216,
      "domNodes": -287,
      "jsHeapTotalBytes": 7663616,
      "scriptDurationMs": 545.068,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "minimap-idle",
      "durationMs": 2037.4429999999961,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.538999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 653.683,
      "heapDeltaBytes": 7446328,
      "heapUsedBytes": 68242696,
      "domNodes": -283,
      "jsHeapTotalBytes": 3731456,
      "scriptDurationMs": 99.81900000000002,
      "eventListeners": -144,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "minimap-idle",
      "durationMs": 2044.495999999981,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 7.918000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 813.4250000000001,
      "heapDeltaBytes": 8662656,
      "heapUsedBytes": 69235684,
      "domNodes": -286,
      "jsHeapTotalBytes": 4255744,
      "scriptDurationMs": 130.274,
      "eventListeners": -144,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 579.4520000000034,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 9.387999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 383.895,
      "heapDeltaBytes": -11791804,
      "heapUsedBytes": 55892576,
      "domNodes": 20,
      "jsHeapTotalBytes": 21360640,
      "scriptDurationMs": 112.101,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 633.0930000000308,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 10.729000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 421.163,
      "heapDeltaBytes": -10924708,
      "heapUsedBytes": 57072564,
      "domNodes": 20,
      "jsHeapTotalBytes": 20836352,
      "scriptDurationMs": 118.97300000000001,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1989.912000000004,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 7.226000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 515.444,
      "heapDeltaBytes": 4329488,
      "heapUsedBytes": 72265588,
      "domNodes": 18,
      "jsHeapTotalBytes": 20574208,
      "scriptDurationMs": 12.374,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1997.8830000000016,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.675,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 478.428,
      "heapDeltaBytes": 4739084,
      "heapUsedBytes": 72585968,
      "domNodes": 20,
      "jsHeapTotalBytes": 20574208,
      "scriptDurationMs": 13.767999999999999,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1729.5690000000263,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 43.854,
      "layouts": 16,
      "layoutDurationMs": 4.7989999999999995,
      "taskDurationMs": 840.243,
      "heapDeltaBytes": -18884516,
      "heapUsedBytes": 49051796,
      "domNodes": -280,
      "jsHeapTotalBytes": 19914752,
      "scriptDurationMs": 94.739,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1745.2799999999797,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 36.663000000000004,
      "layouts": 16,
      "layoutDurationMs": 3.889,
      "taskDurationMs": 839.724,
      "heapDeltaBytes": -19840852,
      "heapUsedBytes": 48176984,
      "domNodes": -278,
      "jsHeapTotalBytes": 20701184,
      "scriptDurationMs": 94.497,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1400.4570000000172,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 29.363,
      "layouts": 14,
      "layoutDurationMs": 12.268,
      "taskDurationMs": 904.4420000000002,
      "heapDeltaBytes": 2058072,
      "heapUsedBytes": 74748584,
      "domNodes": 13673,
      "jsHeapTotalBytes": 15990784,
      "scriptDurationMs": 32.22099999999998,
      "eventListeners": 2371,
      "totalBlockingTimeMs": 140,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8240.709000000039,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 35.082,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4326.523,
      "heapDeltaBytes": 10565108,
      "heapUsedBytes": 70281396,
      "domNodes": -283,
      "jsHeapTotalBytes": 7331840,
      "scriptDurationMs": 1343.718,
      "eventListeners": -128,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8379.777999999988,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 38.157999999999994,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4695.898,
      "heapDeltaBytes": 11217728,
      "heapUsedBytes": 69745800,
      "domNodes": -281,
      "jsHeapTotalBytes": 7069696,
      "scriptDurationMs": 1441.0810000000001,
      "eventListeners": -126,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 16421.091999999986,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 16387.712,
      "heapDeltaBytes": -54899188,
      "heapUsedBytes": 167152468,
      "domNodes": -8312,
      "jsHeapTotalBytes": -13049856,
      "scriptDurationMs": 551.639,
      "eventListeners": -16385,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 17115.47900000005,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17093.278000000002,
      "heapDeltaBytes": -38574032,
      "heapUsedBytes": 167220204,
      "domNodes": -8316,
      "jsHeapTotalBytes": -15147008,
      "scriptDurationMs": 540.034,
      "eventListeners": -16387,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.77333333333336,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 20054.35799999998,
      "styleRecalcs": 138,
      "styleRecalcDurationMs": 15.008999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 20030.654,
      "heapDeltaBytes": -54433972,
      "heapUsedBytes": 153966908,
      "domNodes": -8312,
      "jsHeapTotalBytes": -11476992,
      "scriptDurationMs": 868.665,
      "eventListeners": -16383,
      "totalBlockingTimeMs": 118,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 21013.03399999995,
      "styleRecalcs": 145,
      "styleRecalcDurationMs": 19.457,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 20962.861,
      "heapDeltaBytes": -33172520,
      "heapUsedBytes": 179445908,
      "domNodes": -8312,
      "jsHeapTotalBytes": -13119488,
      "scriptDurationMs": 924.9649999999999,
      "eventListeners": -16379,
      "totalBlockingTimeMs": 281,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "workflow-execution",
      "durationMs": 109.22800000003008,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 14.862000000000002,
      "layouts": 3,
      "layoutDurationMs": 1.203,
      "taskDurationMs": 82.36999999999999,
      "heapDeltaBytes": 3300368,
      "heapUsedBytes": 70244424,
      "domNodes": 144,
      "jsHeapTotalBytes": 3407872,
      "scriptDurationMs": 6.532999999999999,
      "eventListeners": 33,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "workflow-execution",
      "durationMs": 476.8510000000106,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 16.924000000000003,
      "layouts": 3,
      "layoutDurationMs": 0.6809999999999999,
      "taskDurationMs": 109.74600000000001,
      "heapDeltaBytes": -15966148,
      "heapUsedBytes": 51118068,
      "domNodes": 115,
      "jsHeapTotalBytes": 7467008,
      "scriptDurationMs": 9.254,
      "eventListeners": 65,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    }
  ]
}

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds authenticated release-flag evaluation, guarded remote-config refreshes, feature-gate state handling, exposure telemetry for Datadog and PostHog, and a Cloud-only fast-lane demo extension with tests and documentation.

Changes

Release feature flags

Layer / File(s) Summary
Authenticated remote-config refresh
src/platform/remoteConfig/refreshRemoteConfig.ts, src/extensions/core/cloudRemoteConfig.ts, src/platform/workspace/auth/WorkspaceAuthGate.vue, related tests
Authenticated refreshes now require session callbacks, use abortable requests, deduplicate concurrent calls, ignore stale sessions, preserve sanitized configuration on failures, and refresh feature gates while logged in.
Feature gate resolution and exposure recording
src/composables/useFeatureGate.ts, src/composables/useFeatureGate.test.ts
useFeatureGate() now evaluates registered keys through /feature-flags/evaluate, exposes loading/resolved/error states, fails closed, supports local overrides, and deduplicates exposure recording.
Feature-exposure telemetry
src/platform/telemetry/types.ts, src/platform/telemetry/TelemetryRegistry.ts, src/platform/telemetry/providers/cloud/*, src/platform/telemetry/initDatadogRum.ts, related tests
Telemetry providers support feature-flag exposure events; Datadog sends evaluations through RUM and PostHog emits $feature_flag_called events, including queued pre-initialization events.
Cloud feature-flag demo integration
src/extensions/core/fastLaneFeatureFlagDemo.ts, src/extensions/core/index.ts, related tests
A Cloud-only extension gates /fastlane-demo with fastlane_feature_flag_foo, records eligible exposures, and handles rejected requests.
Feature flag usage documentation
docs/FEATURE_FLAGS.md
Documentation distinguishes capability and release flags and describes gate defaults, exposure timing, session deduplication, and authorization boundaries.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: preview

Suggested reviewers: christian-byrne

Sequence Diagram(s)

sequenceDiagram
  participant WorkspaceAuthGate
  participant cloudRemoteConfig
  participant refreshRemoteConfig
  participant useFeatureGate
  participant api.fetchApi
  participant TelemetryRegistry
  WorkspaceAuthGate->>refreshRemoteConfig: provide authenticated session callback
  cloudRemoteConfig->>refreshRemoteConfig: refreshAuthenticatedConfig
  refreshRemoteConfig->>api.fetchApi: fetch /features with AbortSignal
  api.fetchApi-->>refreshRemoteConfig: return remote configuration
  cloudRemoteConfig->>useFeatureGate: refresh feature gates
  useFeatureGate->>api.fetchApi: POST /feature-flags/evaluate
  api.fetchApi-->>useFeatureGate: return flag values
  useFeatureGate->>TelemetryRegistry: record resolved exposure
Loading

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has a summary and validation, but it omits the required Changes and Review Focus sections from the template. Add the missing Changes and Review Focus sections, and include Breaking/Dependencies entries if applicable.
End-To-End Regression Coverage For Fixes ❓ Inconclusive Commit subjects and PR title aren’t provided, so I can’t verify the bug-fix-language condition for this end-to-end regression check. Please provide the PR title and commit subjects (or confirm they lack fix/bugfix/hotfix wording) so I can decide whether browser_tests coverage was required.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Adr Compliance For Entity/Litegraph Changes ✅ Passed No changed files touch src/lib/litegraph/, src/ecs/, or graph entity paths, so ADR 0003/0008 checks are not applicable.
Title check ✅ Passed The title matches the main change: adding runtime release feature gates with authenticated Cloud evaluation and fail-closed behavior.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/release-feature-gate

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.

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/platform/remoteConfig/refreshRemoteConfig.test.ts (1)

170-186: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the error-state transition.

The production fallback also sets remoteConfigState.value to 'error', but this test only checks the sanitized config. Add that assertion so stale authenticated state cannot regress unnoticed.

As per path instructions, changed Vitest tests should cover error paths with direct behavioral assertions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platform/remoteConfig/refreshRemoteConfig.test.ts` around lines 170 -
186, Extend the 500-response test for refreshRemoteConfig to directly assert
that remoteConfigState.value transitions to 'error' after refreshRemoteConfig
completes, while preserving the existing sanitized-config assertions.

Source: Path instructions

src/platform/remoteConfig/refreshRemoteConfig.ts (1)

42-49: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Bound authenticated fetchApi before returning from the cached refresh.

Authenticated refreshes currently pass no signal to api.fetchApi, so authenticatedRefreshPromise can stay pending when fetchWithUnifiedRemint never resolves. Add an abortable/communicable timeout to this route or ensure the auth fetch path itself enforces one, and cover the abort/failure path in the shared-refresh tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platform/remoteConfig/refreshRemoteConfig.ts` around lines 42 - 49,
Update performRefreshRemoteConfig and the authenticated fetch path used by
fetchRemoteConfig so api.fetchApi receives an enforced timeout or abort signal,
preventing authenticatedRefreshPromise from remaining pending when
fetchWithUnifiedRemint does not resolve. Preserve the existing unauthenticated
AbortController behavior, and add shared-refresh coverage for authenticated
abort and failure completion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/composables/useFeatureGate.test.ts`:
- Around line 21-57: Expand the useFeatureGate test suite to cover fail-closed
behavior: verify development/staging overrides take precedence, missing release
flags resolve to false, recordExposure() does nothing before authentication, and
telemetry or storage-unavailable cases do not throw or record exposure. Exercise
these through observable behavior using the existing remoteConfig,
remoteConfigState, useFeatureGate, and telemetry test setup.

In `@src/composables/useFeatureGate.ts`:
- Around line 23-24: Make the sessionStorage access in the exposure-recording
logic best-effort: wrap both getItem and setItem calls around exposureKey in
error handling so storage exceptions never escape to feature consumers. Preserve
deduplication when storage works, and use an in-memory or equivalent safe
fallback when storage is unavailable.

In `@src/platform/remoteConfig/refreshRemoteConfig.test.ts`:
- Around line 42-64: Extend the “deduplicates concurrent authenticated
refreshes” test to cover a rejected request: mock api.fetchApi to reject, await
the initial refresh failure, then call refreshRemoteConfig again with a
successful response and assert api.fetchApi was called twice. Preserve the
existing concurrent deduplication assertions and verify that the failed refresh
is cleared so a subsequent call starts a new request.

In `@src/platform/remoteConfig/refreshRemoteConfig.ts`:
- Around line 93-106: The authenticated refresh flow in refreshRemoteConfig and
performRefreshRemoteConfig must bind each pending request to the current session
identity. Cache that identity alongside authenticatedRefreshPromise, and before
committing the response validate that the session is still the same; discard or
reject the response when the user logs out or switches accounts, while
preserving shared callers and unauthenticated refresh behavior.

In `@src/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.ts`:
- Around line 14-16: Update the Datadog RUM initialization configuration in
initDatadogRum to include enableExperimentalFeatures with the feature_flags
entry, so evaluations forwarded by trackFeatureFlagExposure are collected.
Preserve the existing initialization options.

---

Outside diff comments:
In `@src/platform/remoteConfig/refreshRemoteConfig.test.ts`:
- Around line 170-186: Extend the 500-response test for refreshRemoteConfig to
directly assert that remoteConfigState.value transitions to 'error' after
refreshRemoteConfig completes, while preserving the existing sanitized-config
assertions.

In `@src/platform/remoteConfig/refreshRemoteConfig.ts`:
- Around line 42-49: Update performRefreshRemoteConfig and the authenticated
fetch path used by fetchRemoteConfig so api.fetchApi receives an enforced
timeout or abort signal, preventing authenticatedRefreshPromise from remaining
pending when fetchWithUnifiedRemint does not resolve. Preserve the existing
unauthenticated AbortController behavior, and add shared-refresh coverage for
authenticated abort and failure completion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d425e9c9-c3bc-46f0-815c-7031e33b02ac

📥 Commits

Reviewing files that changed from the base of the PR and between 4c643e9 and 9bb77a5.

📒 Files selected for processing (14)
  • docs/FEATURE_FLAGS.md
  • src/composables/useFeatureGate.test.ts
  • src/composables/useFeatureGate.ts
  • src/extensions/core/cloudRemoteConfig.ts
  • src/platform/remoteConfig/refreshRemoteConfig.test.ts
  • src/platform/remoteConfig/refreshRemoteConfig.ts
  • src/platform/remoteConfig/types.ts
  • src/platform/telemetry/TelemetryRegistry.test.ts
  • src/platform/telemetry/TelemetryRegistry.ts
  • src/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.ts
  • src/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.ts
  • src/platform/telemetry/providers/cloud/PostHogTelemetryProvider.test.ts
  • src/platform/telemetry/providers/cloud/PostHogTelemetryProvider.ts
  • src/platform/telemetry/types.ts

Comment thread src/composables/useFeatureGate.test.ts Resolved
Comment thread src/composables/useFeatureGate.ts Resolved
@codecov

codecov Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.12426% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/composables/useFeatureGate.ts 90.19% 10 Missing ⚠️
src/extensions/core/cloudRemoteConfig.ts 83.33% 2 Missing ⚠️
src/extensions/core/fastLaneFeatureFlagDemo.ts 90.90% 1 Missing ⚠️
src/extensions/core/index.ts 0.00% 1 Missing ⚠️
...emetry/providers/cloud/PostHogTelemetryProvider.ts 85.71% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main   #14245      +/-   ##
==========================================
- Coverage   80.11%   79.11%   -1.01%     
==========================================
  Files        1755     1762       +7     
  Lines      112815   101142   -11673     
  Branches    38321    33059    -5262     
==========================================
- Hits        90382    80018   -10364     
+ Misses      21915    20736    -1179     
+ Partials      518      388     -130     
Flag Coverage Δ
unit 69.74% <91.12%> (+0.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/remoteConfig/refreshRemoteConfig.ts 100.00% <100.00%> (+29.11%) ⬆️
src/platform/telemetry/TelemetryRegistry.ts 25.98% <100.00%> (+1.18%) ⬆️
src/platform/telemetry/initDatadogRum.ts 100.00% <ø> (ø)
...try/providers/cloud/DatadogRumTelemetryProvider.ts 100.00% <100.00%> (ø)
src/platform/telemetry/types.ts 100.00% <ø> (ø)
src/platform/workspace/auth/WorkspaceAuthGate.vue 100.00% <100.00%> (ø)
src/extensions/core/fastLaneFeatureFlagDemo.ts 90.90% <90.90%> (ø)
src/extensions/core/index.ts 9.09% <0.00%> (-0.91%) ⬇️
...emetry/providers/cloud/PostHogTelemetryProvider.ts 73.33% <85.71%> (+1.96%) ⬆️
src/extensions/core/cloudRemoteConfig.ts 88.88% <83.33%> (+88.88%) ⬆️
... and 1 more

... and 222 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@huang47

huang47 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Additional review-body fixes are in bb4562e:

  • 500 responses now assert the remote config error-state transition.
  • Authenticated /features requests now receive a 5-second AbortSignal; shared timeout cleanup and retry are covered.
  • Full validation: typecheck, lint, knip, production build, 23 focused tests, and CodeRabbit pre-commit review with zero findings.
  • One unrelated onboarding lazy-import test timed out in a full-suite rerun and passed immediately in isolation, 7/7.

@coderabbitai review

Created by Codex

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

@huang47 Thanks for the follow-up details. I’ll review the updated changes in #14245, including the timeout/retry behavior and error-state coverage.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/composables/useFeatureGate.test.ts (1)

1-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Module-level exposure cache isn't reset between tests.

fallbackRecordedExposures in useFeatureGate.ts is module-level state that isn't cleared by this file's beforeEach/afterEach (only sessionStorage/localStorage/telemetry are reset). No current test collides on the same exposureKey, but this is shared mutable state that isn't test-isolated — a future test reusing the same flag+value would silently inherit a stale "already recorded" result from an earlier test.

Consider exporting a test-only reset hook from useFeatureGate.ts (or calling vi.resetModules() + re-importing per test) to make the in-memory fallback cache resettable.

As per path instructions, changed Vitest test files must ensure "tests are isolated (no execution-order dependencies/shared mutable state)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/composables/useFeatureGate.test.ts` around lines 1 - 24, Ensure the
module-level fallback exposure cache, fallbackRecordedExposures, is reset before
each useFeatureGate test. Add and use a test-only reset hook from
useFeatureGate.ts (or reset modules before re-importing) alongside the existing
beforeEach setup so tests cannot inherit exposure state from earlier cases.

Source: Path instructions

src/platform/remoteConfig/refreshRemoteConfig.ts (1)

76-90: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Reset the cached user-specific feature flags when remote config is not authenticated. The 401/403 fail-closed path wipes remoteConfig.value and remoteConfigState.value, and the user-ID change watcher sets remoteConfigState.value = 'anonymous', but the cached team-workspace and billing flags are not cleared. Since useFeatureFlags() still returns cached*?.value ?? false for these flags before isAuthenticatedConfigLoaded is true, stale true values can affect billing/workspace routing and UI after logout or account switch. Reset cachedTeamWorkspacesEnabled.value, cachedConsolidatedBillingEnabled.value, and cachedBillingControlEnabled.value to false on those transitions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platform/remoteConfig/refreshRemoteConfig.ts` around lines 76 - 90, Reset
cached user-specific flags during unauthenticated remote-config transitions. In
src/platform/remoteConfig/refreshRemoteConfig.ts at lines 76-90, update the
401/403 fail-closed path to set cachedTeamWorkspacesEnabled.value,
cachedConsolidatedBillingEnabled.value, and cachedBillingControlEnabled.value to
false; apply the same reset in src/extensions/core/cloudRemoteConfig.ts at lines
25-33 for its corresponding logout/account-switch transition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/extensions/core/cloudRemoteConfig.test.ts`:
- Around line 41-61: Extend the cloudRemoteConfig tests with coverage for the
60-second refresh interval: advance fake timers by 60 seconds while
authenticated and assert refreshRemoteConfig is called, then add a logged-out
case asserting the refresh is skipped. Reuse the existing setup and mocked state
in the cloudRemoteConfig describe block.

---

Outside diff comments:
In `@src/composables/useFeatureGate.test.ts`:
- Around line 1-24: Ensure the module-level fallback exposure cache,
fallbackRecordedExposures, is reset before each useFeatureGate test. Add and use
a test-only reset hook from useFeatureGate.ts (or reset modules before
re-importing) alongside the existing beforeEach setup so tests cannot inherit
exposure state from earlier cases.

In `@src/platform/remoteConfig/refreshRemoteConfig.ts`:
- Around line 76-90: Reset cached user-specific flags during unauthenticated
remote-config transitions. In src/platform/remoteConfig/refreshRemoteConfig.ts
at lines 76-90, update the 401/403 fail-closed path to set
cachedTeamWorkspacesEnabled.value, cachedConsolidatedBillingEnabled.value, and
cachedBillingControlEnabled.value to false; apply the same reset in
src/extensions/core/cloudRemoteConfig.ts at lines 25-33 for its corresponding
logout/account-switch transition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 252f803c-a6f7-4ff5-b781-79cb696a9882

📥 Commits

Reviewing files that changed from the base of the PR and between 9bb77a5 and bb4562e.

📒 Files selected for processing (10)
  • src/composables/useFeatureGate.test.ts
  • src/composables/useFeatureGate.ts
  • src/extensions/core/cloudRemoteConfig.test.ts
  • src/extensions/core/cloudRemoteConfig.ts
  • src/platform/remoteConfig/refreshRemoteConfig.test.ts
  • src/platform/remoteConfig/refreshRemoteConfig.ts
  • src/platform/telemetry/initDatadogRum.test.ts
  • src/platform/telemetry/initDatadogRum.ts
  • src/platform/workspace/auth/WorkspaceAuthGate.test.ts
  • src/platform/workspace/auth/WorkspaceAuthGate.vue

Comment on lines +41 to +61
describe('cloudRemoteConfig', () => {
beforeEach(() => {
vi.useFakeTimers()
mocks.isLoggedIn.value = true
mocks.resolvedUserInfo.value = { id: 'user-a' }
remoteConfigState.value = 'authenticated'
})

afterEach(() => {
vi.useRealTimers()
})

it('fails closed immediately when the authenticated user changes', async () => {
const extension = mocks.registerExtension.mock.calls[0][0]
await extension.setup()

mocks.resolvedUserInfo.value = { id: 'user-b' }

expect(remoteConfigState.value).toBe('anonymous')
})
})

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.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the 60s interval refresh and logged-out guard.

Only the fail-closed-on-user-change path is tested. Since fake timers are already active, add a test that advances 60s and asserts refreshRemoteConfig fires while logged in, and one confirming it's skipped while logged out.

As per path instructions, .agents/checks/test-quality.md calls for coverage of critical remote-config refresh behaviors.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/extensions/core/cloudRemoteConfig.test.ts` around lines 41 - 61, Extend
the cloudRemoteConfig tests with coverage for the 60-second refresh interval:
advance fake timers by 60 seconds while authenticated and assert
refreshRemoteConfig is called, then add a logged-out case asserting the refresh
is skipped. Reuse the existing setup and mocked state in the cloudRemoteConfig
describe block.

Source: Path instructions

@huang47

huang47 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Combined Cloud preview validation passed:

Live Datadog/PostHog decision-point validation remains for the real feature consumer after the PostHog flag is created default OFF.

Created by Codex

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/FEATURE_FLAGS.md (1)

12-24: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the local-development override exception.

The text says gates remain false until an authenticated response, but explicit development overrides can resolve a gate without Cloud authentication. Qualify this behavior so local testing does not contradict the implementation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/FEATURE_FLAGS.md` around lines 12 - 24, Update the feature-flag behavior
description around useFeatureGate() to qualify that gates default to false
pending an authenticated Cloud response unless an explicit local-development
override is configured. Preserve the existing explanation of resolved values and
recordExposure() behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/extensions/core/fastLaneFeatureFlagDemo.test.ts`:
- Around line 50-68: Add a test beside the existing fast-lane decision test that
configures mocks.enabled and authenticated remoteConfigState, makes
mocks.fetchApi reject, and advances the reactive queue. Assert the rejection is
handled via the warning/logging path and does not produce an unhandled promise
rejection, while preserving the existing successful-request assertions.

---

Outside diff comments:
In `@docs/FEATURE_FLAGS.md`:
- Around line 12-24: Update the feature-flag behavior description around
useFeatureGate() to qualify that gates default to false pending an authenticated
Cloud response unless an explicit local-development override is configured.
Preserve the existing explanation of resolved values and recordExposure()
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9a58ca45-9b32-4311-9e09-358bafd6a030

📥 Commits

Reviewing files that changed from the base of the PR and between bb4562e and f1e3bad.

📒 Files selected for processing (4)
  • docs/FEATURE_FLAGS.md
  • src/extensions/core/fastLaneFeatureFlagDemo.test.ts
  • src/extensions/core/fastLaneFeatureFlagDemo.ts
  • src/extensions/core/index.ts

Comment on lines +50 to +68
it('records resolved decisions and only calls Cloud when enabled', async () => {
const extension = mocks.registerExtension.mock.calls[0][0]
extension.setup()

mocks.remoteConfigState.value = 'authenticated'
await nextTick()

expect(mocks.recordExposure).toHaveBeenCalledOnce()
expect(mocks.fetchApi).not.toHaveBeenCalled()

mocks.remoteConfigState.value = 'anonymous'
await nextTick()
mocks.enabled.value = true
mocks.remoteConfigState.value = 'authenticated'
await nextTick()

expect(mocks.recordExposure).toHaveBeenCalledTimes(2)
expect(mocks.fetchApi).toHaveBeenCalledExactlyOnceWith('/fastlane-demo')
})

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Cover the rejected fast-lane request path.

Add a test where fetchApi rejects after authentication and the gate is enabled; assert the rejection is handled through the warning path without an unhandled promise rejection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/extensions/core/fastLaneFeatureFlagDemo.test.ts` around lines 50 - 68,
Add a test beside the existing fast-lane decision test that configures
mocks.enabled and authenticated remoteConfigState, makes mocks.fetchApi reject,
and advances the reactive queue. Assert the rejection is handled via the
warning/logging path and does not produce an unhandled promise rejection, while
preserving the existing successful-request assertions.

Source: Path instructions

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
src/extensions/core/fastLaneFeatureFlagDemo.ts (1)

12-29: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

/fastlane-demo gets re-requested on every refresh cycle, not once.

refreshFeatureGates() cycles entry.state through 'loading' → 'resolved'/'error' on every periodic/background refresh (e.g., the 30s interval in cloudRemoteConfig.ts). Each cycle re-fires this watch, and since isEnabled stays true, api.fetchApi('/fastlane-demo') is called again — unlike recordExposure(), which self-dedupes. As long as the flag stays on, this endpoint gets hit repeatedly for the lifetime of the session. Since this extension is presented as the reference pattern for release-flag consumers, the missing one-time guard is likely to be copied into real feature implementations.

🔁 Proposed fix — guard the demo call with a one-time flag
 setup: () => {
     const { state, value: enabled, recordExposure } = useFeatureGate(flagKey)
+    let demoRequested = false
 
     watch(
       [state, enabled],
       ([state, isEnabled]) => {
         if (state !== 'resolved' && state !== 'error') return
 
         recordExposure()
-        if (!isEnabled) return
+        if (!isEnabled || demoRequested) return
+        demoRequested = true
 
         void api.fetchApi('/fastlane-demo').catch((error: unknown) => {
           console.warn('Fast Lane demo server gate rejected:', error)
         })
       },
       { immediate: true }
     )
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/extensions/core/fastLaneFeatureFlagDemo.ts` around lines 12 - 29, Update
the setup logic around the watch callback and api.fetchApi('/fastlane-demo') to
add a session-scoped one-time guard. Only make the demo request once when the
gate resolves successfully enabled, while preserving exposure recording and
avoiding requests for disabled or unresolved/error states.
src/platform/remoteConfig/refreshRemoteConfig.test.ts (1)

268-281: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add release_flags to the fixture to actually exercise the stripping behavior.

existingConfig here has no release_flags, so the test can't detect a regression in the delete safeConfig.release_flags logic in performRefreshRemoteConfig. Add a release_flags entry to existingConfig and assert it's absent from the resulting remoteConfig.value/window.__CONFIG__ while other fields are preserved.

As per path instructions, .agents/checks/test-quality.md requires critical fail-closed behavior to be asserted by outcomes.

✅ Proposed fix
     it('preserves config but marks authenticated refresh errors', async () => {
-      const existingConfig = { subscription_required: true }
+      const existingConfig = {
+        subscription_required: true,
+        release_flags: { might_be_risky_feature_foo: true }
+      }
       ...
-      expect(remoteConfig.value).toEqual(existingConfig)
-      expect(window.__CONFIG__).toEqual(existingConfig)
+      expect(remoteConfig.value).toEqual({ subscription_required: true })
+      expect(window.__CONFIG__).toEqual({ subscription_required: true })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platform/remoteConfig/refreshRemoteConfig.test.ts` around lines 268 -
281, Add a representative release_flags entry to existingConfig in the
“preserves config but marks authenticated refresh errors” test, then assert
remoteConfig.value and window.__CONFIG__ preserve the other configuration fields
while omitting release_flags. Keep the existing error-state assertion and verify
the fail-closed stripping behavior through these resulting values.

Source: Path instructions

src/composables/useFeatureGate.ts (1)

148-188: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Every useFeatureGate() call re-fetches, even for already-resolved keys.

The mount-time trigger at lines 152-156 fires refreshFeatureGates() whenever authenticated, with no check of entry.state.value. refreshFeatureGates() only dedupes concurrent in-flight requests (pendingRefresh); once a request has settled, every subsequent useFeatureGate(key) call — including remounts of the same key elsewhere in the app — issues a brand-new /feature-flags/evaluate POST for all registered keys. The module-level watch(remoteConfigState, ...) already handles background refresh on auth transitions, so the mount-time trigger is only actually needed for a key that hasn't been evaluated yet.

Gate the eager trigger on the entry still being 'unloaded'.

⚡ Proposed fix
   const override = getDevOverride<boolean>(key)
   const entry = getFeatureGateEntry(key)
   if (
     typeof override !== 'boolean' &&
-    remoteConfigState.value === 'authenticated'
+    remoteConfigState.value === 'authenticated' &&
+    entry.state.value === 'unloaded'
   ) {
     void refreshFeatureGates()
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/composables/useFeatureGate.ts` around lines 148 - 188, Update the eager
refresh condition in useFeatureGate so refreshFeatureGates() is called only when
the gate entry’s state is still 'unloaded', while preserving the existing
boolean-override and authenticated checks. Use entry.state.value in the
mount-time condition; leave the computed state and exposure logic unchanged.
src/platform/remoteConfig/refreshRemoteConfig.ts (1)

86-92: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low value

Drop the orphan release_flags strip.

release_flags only appears at this call site and is not declared on RemoteConfig; feature flags are resolved through useFeatureFlags / server feature flags instead. Removing this inline type extension and delete keeps the fallback config shape aligned with the declared type.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platform/remoteConfig/refreshRemoteConfig.ts` around lines 86 - 92,
Remove the orphan release_flags handling from the refreshRemoteConfig fallback
flow: eliminate the inline RemoteConfig type extension and the delete
safeConfig.release_flags statement. Keep safeConfig based directly on
RemoteConfig and preserve the existing window.__CONFIG__, remoteConfig.value,
and remoteConfigState updates.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/composables/useFeatureGate.ts`:
- Around line 18-22: Export a test-only reset function in useFeatureGate that
clears entries and fallbackRecordedExposures, resets generation and
refreshAgain, and clears pendingRefresh. Update the related tests to invoke this
reset during beforeEach so module-level singleton state cannot leak between
tests or suppress repeated exposure recording.

---

Outside diff comments:
In `@src/composables/useFeatureGate.ts`:
- Around line 148-188: Update the eager refresh condition in useFeatureGate so
refreshFeatureGates() is called only when the gate entry’s state is still
'unloaded', while preserving the existing boolean-override and authenticated
checks. Use entry.state.value in the mount-time condition; leave the computed
state and exposure logic unchanged.

In `@src/extensions/core/fastLaneFeatureFlagDemo.ts`:
- Around line 12-29: Update the setup logic around the watch callback and
api.fetchApi('/fastlane-demo') to add a session-scoped one-time guard. Only make
the demo request once when the gate resolves successfully enabled, while
preserving exposure recording and avoiding requests for disabled or
unresolved/error states.

In `@src/platform/remoteConfig/refreshRemoteConfig.test.ts`:
- Around line 268-281: Add a representative release_flags entry to
existingConfig in the “preserves config but marks authenticated refresh errors”
test, then assert remoteConfig.value and window.__CONFIG__ preserve the other
configuration fields while omitting release_flags. Keep the existing error-state
assertion and verify the fail-closed stripping behavior through these resulting
values.

In `@src/platform/remoteConfig/refreshRemoteConfig.ts`:
- Around line 86-92: Remove the orphan release_flags handling from the
refreshRemoteConfig fallback flow: eliminate the inline RemoteConfig type
extension and the delete safeConfig.release_flags statement. Keep safeConfig
based directly on RemoteConfig and preserve the existing window.__CONFIG__,
remoteConfig.value, and remoteConfigState updates.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 44342a6a-b11a-46aa-8b9a-6afae5c6b066

📥 Commits

Reviewing files that changed from the base of the PR and between 6d07ea0 and c3fc1c4.

📒 Files selected for processing (9)
  • docs/FEATURE_FLAGS.md
  • src/composables/useFeatureGate.test.ts
  • src/composables/useFeatureGate.ts
  • src/extensions/core/cloudRemoteConfig.test.ts
  • src/extensions/core/cloudRemoteConfig.ts
  • src/extensions/core/fastLaneFeatureFlagDemo.test.ts
  • src/extensions/core/fastLaneFeatureFlagDemo.ts
  • src/platform/remoteConfig/refreshRemoteConfig.test.ts
  • src/platform/remoteConfig/refreshRemoteConfig.ts

Comment on lines +18 to +22
const entries = new Map<string, FeatureGateEntry>()
const fallbackRecordedExposures = new Set<string>()
let generation = 0
let pendingRefresh: { generation: number; promise: Promise<void> } | null = null
let refreshAgain = false

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.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Module-level exposure/entry state has no test reset hook.

entries, generation, pendingRefresh, and fallbackRecordedExposures are all module-scoped singletons with no exported reset. fallbackRecordedExposures in particular is added to unconditionally in markExposureRecorded (not only on storage failure) and never cleared, so any two tests that happen to share an exposure key+value combination would silently fail to record the second time, regardless of sessionStorage being reset in beforeEach. Consider exporting a test-only reset function (or scoping this state so it can be reinitialized) to keep future tests isolated.

As per path instructions, docs/testing/vitest-patterns.md/.agents/checks/test-quality.md require added tests to "maintain isolation (reset mocks/state, avoid shared mutable data across tests)."

Also applies to: 128-146

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/composables/useFeatureGate.ts` around lines 18 - 22, Export a test-only
reset function in useFeatureGate that clears entries and
fallbackRecordedExposures, resets generation and refreshAgain, and clears
pendingRefresh. Update the related tests to invoke this reset during beforeEach
so module-level singleton state cannot leak between tests or suppress repeated
exposure recording.

Source: Path instructions

huang47 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing this speculative feature-gate framework. It still has no real feature consumer and carries demo/rollout scaffolding; add the smallest gate when a concrete release needs it.

@huang47 huang47 closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-cpu Creates a preview ephemeral environment for this PR (CPU only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant