Repository navigation
Conversation
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1763 passed, 0 failed · 4 flaky📊 Browser Reports
📦 Bundle: 8.19 MB gzip 🔴 +2.45 kBDetailsSummary
Category Glance App Entry Points — 3.66 kB (baseline 3.66 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.29 MB (baseline 1.29 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 2 unchanged Views & Navigation — 112 kB (baseline 112 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 16 unchanged Panels & Settings — 555 kB (baseline 554 kB) • 🔴 +1.53 kBConfiguration panels, inspectors, and settings screens
Status: 3 added / 3 removed / 23 unchanged User & Accounts — 29.1 kB (baseline 29.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 10 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 7 unchanged UI Components — 70.7 kB (baseline 70.7 kB) • ⚪ 0 BReusable component library chunks Status: 15 unchanged Data & Services — 3.43 MB (baseline 3.43 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 17 unchanged Utilities & Hooks — 391 kB (baseline 386 kB) • 🔴 +4.42 kBHelpers, composables, and utility bundles
Status: 1 added / 36 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.6 MB (baseline 12.6 MB) • 🔴 +1.08 kBBundles that do not match a named category
Status: 3 added / 2 removed / 276 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
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
}
]
} |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds 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. ChangesRelease feature flags
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 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
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
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 winAssert the error-state transition.
The production fallback also sets
remoteConfigState.valueto'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 winBound authenticated
fetchApibefore returning from the cached refresh.Authenticated refreshes currently pass no signal to
api.fetchApi, soauthenticatedRefreshPromisecan stay pending whenfetchWithUnifiedRemintnever 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
📒 Files selected for processing (14)
docs/FEATURE_FLAGS.mdsrc/composables/useFeatureGate.test.tssrc/composables/useFeatureGate.tssrc/extensions/core/cloudRemoteConfig.tssrc/platform/remoteConfig/refreshRemoteConfig.test.tssrc/platform/remoteConfig/refreshRemoteConfig.tssrc/platform/remoteConfig/types.tssrc/platform/telemetry/TelemetryRegistry.test.tssrc/platform/telemetry/TelemetryRegistry.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.tssrc/platform/telemetry/providers/cloud/PostHogTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/PostHogTelemetryProvider.tssrc/platform/telemetry/types.ts
Codecov Report❌ Patch coverage is @@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 222 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Additional review-body fixes are in bb4562e:
@coderabbitai review Created by Codex |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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 winModule-level exposure cache isn't reset between tests.
fallbackRecordedExposuresinuseFeatureGate.tsis module-level state that isn't cleared by this file'sbeforeEach/afterEach(onlysessionStorage/localStorage/telemetry are reset). No current test collides on the sameexposureKey, 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 callingvi.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 winReset the cached user-specific feature flags when remote config is not authenticated. The 401/403 fail-closed path wipes
remoteConfig.valueandremoteConfigState.value, and the user-ID change watcher setsremoteConfigState.value = 'anonymous', but the cached team-workspace and billing flags are not cleared. SinceuseFeatureFlags()still returnscached*?.value ?? falsefor these flags beforeisAuthenticatedConfigLoadedis true, staletruevalues can affect billing/workspace routing and UI after logout or account switch. ResetcachedTeamWorkspacesEnabled.value,cachedConsolidatedBillingEnabled.value, andcachedBillingControlEnabled.valuetofalseon 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
📒 Files selected for processing (10)
src/composables/useFeatureGate.test.tssrc/composables/useFeatureGate.tssrc/extensions/core/cloudRemoteConfig.test.tssrc/extensions/core/cloudRemoteConfig.tssrc/platform/remoteConfig/refreshRemoteConfig.test.tssrc/platform/remoteConfig/refreshRemoteConfig.tssrc/platform/telemetry/initDatadogRum.test.tssrc/platform/telemetry/initDatadogRum.tssrc/platform/workspace/auth/WorkspaceAuthGate.test.tssrc/platform/workspace/auth/WorkspaceAuthGate.vue
| 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') | ||
| }) | ||
| }) |
There was a problem hiding this comment.
📐 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
|
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 |
There was a problem hiding this comment.
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 winDocument the local-development override exception.
The text says gates remain
falseuntil 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
📒 Files selected for processing (4)
docs/FEATURE_FLAGS.mdsrc/extensions/core/fastLaneFeatureFlagDemo.test.tssrc/extensions/core/fastLaneFeatureFlagDemo.tssrc/extensions/core/index.ts
| 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') | ||
| }) |
There was a problem hiding this comment.
🩺 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
There was a problem hiding this comment.
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-demogets re-requested on every refresh cycle, not once.
refreshFeatureGates()cyclesentry.statethrough'loading'→'resolved'/'error'on every periodic/background refresh (e.g., the 30s interval incloudRemoteConfig.ts). Each cycle re-fires thiswatch, and sinceisEnabledstaystrue,api.fetchApi('/fastlane-demo')is called again — unlikerecordExposure(), 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 winAdd
release_flagsto the fixture to actually exercise the stripping behavior.
existingConfighere has norelease_flags, so the test can't detect a regression in thedelete safeConfig.release_flagslogic inperformRefreshRemoteConfig. Add arelease_flagsentry toexistingConfigand assert it's absent from the resultingremoteConfig.value/window.__CONFIG__while other fields are preserved.As per path instructions,
.agents/checks/test-quality.mdrequires 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 winEvery
useFeatureGate()call re-fetches, even for already-resolved keys.The mount-time trigger at lines 152-156 fires
refreshFeatureGates()whenever authenticated, with no check ofentry.state.value.refreshFeatureGates()only dedupes concurrent in-flight requests (pendingRefresh); once a request has settled, every subsequentuseFeatureGate(key)call — including remounts of the same key elsewhere in the app — issues a brand-new/feature-flags/evaluatePOST for all registered keys. The module-levelwatch(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 valueDrop the orphan
release_flagsstrip.
release_flagsonly appears at this call site and is not declared onRemoteConfig; feature flags are resolved throughuseFeatureFlags/ server feature flags instead. Removing this inline type extension anddeletekeeps 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
📒 Files selected for processing (9)
docs/FEATURE_FLAGS.mdsrc/composables/useFeatureGate.test.tssrc/composables/useFeatureGate.tssrc/extensions/core/cloudRemoteConfig.test.tssrc/extensions/core/cloudRemoteConfig.tssrc/extensions/core/fastLaneFeatureFlagDemo.test.tssrc/extensions/core/fastLaneFeatureFlagDemo.tssrc/platform/remoteConfig/refreshRemoteConfig.test.tssrc/platform/remoteConfig/refreshRemoteConfig.ts
| 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 |
There was a problem hiding this comment.
📐 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
|
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. |
Summary
Use any PostHog key without Cloud registration.
useFeatureGate(key)requests Cloud evaluation and defaults tofalse./api/fastlane-demoonly when enabled.Depends on https://github.com/Comfy-Org/cloud/pull/5711.
Validation
c3fc1c4ff7c80b978ff2dadda831926fd67ef010.Created by Codex