Skip to content

✨ [FFL-2596] Feature Flags tab — overrides (stacked PR 3 of 3) - #4912

Draft
kellyw1806 wants to merge 1 commit into
kelly.wang/ffl-2858from
kelly.wang/ffl-2596
Draft

✨ [FFL-2596] Feature Flags tab — overrides (stacked PR 3 of 3)#4912
kellyw1806 wants to merge 1 commit into
kelly.wang/ffl-2858from
kelly.wang/ffl-2596

Conversation

@kellyw1806

@kellyw1806 kellyw1806 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Motivation

Stacked on #4916 (catalog fetch). Allows users to create overrides for a flag's value (allows for switching between variables) locally and have it take effect on the inspected page.

Stack (review bottom-up)

PR Base What it adds
1 of 3 #4913 · FFL-2597 main OAuth sign-in
2 of 3 #4916 · FFL-2858 ffl-2597 catalog browsing
3 of 3 #4912 (this) · FFL-2596 ffl-2858 flag overrides

⚠️ Base is kelly.wang/ffl-2858 — merge #4913 then #4916 first.

Changes

  • Override engine (useFlagOverrides) writing to the inspected page's localStorage per the DatadogDevtools wrapper contract; mutations serialized to avoid lost updates.
  • Per-row variant buttons + revert, a manual override-by-key form, clear-all / save-and-reload.

Demo

This is a recording of what the three stacked PRs look like working together.

Screen.Recording.2026-07-24.at.5.14.31.PM.mov

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change (useFlagOverrides.spec.ts).
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jul 24, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 34.48%
Overall Coverage: 76.95% (-0.22%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 74968df | Docs | Datadog PR Page | Give us feedback!

@kellyw1806 kellyw1806 changed the title Kelly.wang/ffl 2596 ✨ [FFL-2596] Feature Flags tab — overrides (stacked PR 2 of 2) Jul 24, 2026
@kellyw1806
kellyw1806 changed the base branch from main to kelly.wang/ffl-2597 July 24, 2026 20:30
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2597 branch from f6766af to 5375214 Compare July 24, 2026 20:42
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 17cca80 to 5b4061e Compare July 24, 2026 20:42
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Jul 24, 2026

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 180.54 KiB 180.54 KiB 0 B 0.00%
Rum Profiler 8.43 KiB 8.43 KiB 0 B 0.00%
Rum Recorder 21.12 KiB 21.12 KiB 0 B 0.00%
Logs 57.05 KiB 57.05 KiB 0 B 0.00%
Rum Salesforce N/A 138.42 KiB N/A N/A N/A
Rum Slim 138.41 KiB 138.41 KiB 0 B 0.00%
Worker 22.96 KiB 22.96 KiB 0 B 0.00%
Rum Shopify N/A 200.11 KiB N/A N/A N/A
Rum-shopify Profiler N/A 8.43 KiB N/A N/A N/A
Rum-shopify Recorder N/A 3.72 KiB N/A N/A N/A

@kellyw1806

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

This comment was marked as resolved.

@DataDog DataDog deleted a comment from chatgpt-codex-connector Bot Jul 24, 2026
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 5b4061e to 31f7bb0 Compare July 24, 2026 21:02
@kellyw1806 kellyw1806 changed the title ✨ [FFL-2596] Feature Flags tab — overrides (stacked PR 2 of 2) [FFL-2596] Feature Flags tab with overrides (stacked PR 2 of 2) Jul 24, 2026
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2597 branch from 5375214 to bc5e1d9 Compare July 24, 2026 21:08
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 31f7bb0 to c9960d2 Compare July 24, 2026 21:08
@kellyw1806 kellyw1806 changed the title [FFL-2596] Feature Flags tab with overrides (stacked PR 2 of 2) ✨ [FFL-2596] Feature Flags tab with overrides (stacked PR 2 of 2) Jul 24, 2026
// Contract shared with @datadog/openfeature-browser's DatadogDevtools wrapper.
// Keep these in sync with that package: the wrapper reads OVERRIDES_KEY once on
// initialize() and writes DEVTOOLS_MARKER_KEY when it is composed into the provider stack.
export const OVERRIDES_KEY = 'dd.dd_flag.overrides'

@kellyw1806 kellyw1806 Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These keys are a contract with @datadog/openfeature-browser's DatadogDevtools wrapper so renaming them requires a coordinated change in that package, not a free rename.

type: FlagOverrideType
// Any JSON value — objects/arrays are `object`; `null` is allowed (a flag/variant value can be
// null). The manual-entry form still rejects null via validateOverrideValue.
value: boolean | string | number | object | null

@kellyw1806 kellyw1806 Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Widened the override value to allow null (a variant value can legitimately be null). The manual-entry form still rejects null via validateOverrideValue. Is this okay or should variant-click also block null?


useEffect(() => {
refresh()
const id = setInterval(refresh, REFRESH_INTERVAL)

@kellyw1806 kellyw1806 Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This polls the inspected page every 2s while the tab is mounted. Fine for a devtools panel IMO, but flagging in case prefer gating it on tab visibility.

@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2597 branch from bc5e1d9 to 2e87cbc Compare July 24, 2026 21:42
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from c9960d2 to fc8bff4 Compare July 24, 2026 21:42
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2597 branch from 2e87cbc to 7b347cd Compare July 27, 2026 04:58
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from fc8bff4 to 5d030ab Compare July 27, 2026 04:58
@kellyw1806 kellyw1806 changed the title ✨ [FFL-2596] Feature Flags tab with overrides (stacked PR 2 of 2) ✨ [FFL-2596] Feature Flags tab — overrides (stacked PR 3 of 3) Jul 27, 2026
@kellyw1806
kellyw1806 changed the base branch from kelly.wang/ffl-2597 to kelly.wang/ffl-2858 July 27, 2026 04:59
Comment thread developer-extension/src/panel/components/tabs/flagsTab/flagsTab.tsx Outdated
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 17d898b to 919073f Compare July 27, 2026 18:56
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 4af8227 to 7376fbf Compare July 27, 2026 20:40
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from d3669d4 to bad0da0 Compare July 27, 2026 20:40
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 7376fbf to fb4faa6 Compare July 27, 2026 20:54
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from bad0da0 to 683bd8b Compare July 27, 2026 20:54
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@sbarrio
sbarrio requested a review from BenoitZugmeyer July 28, 2026 07:06
@kellyw1806
kellyw1806 marked this pull request as draft July 28, 2026 13:39
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from fb4faa6 to 230ae07 Compare July 28, 2026 15:32
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 683bd8b to 1f5d159 Compare July 28, 2026 15:32
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 230ae07 to 673a2b1 Compare July 28, 2026 16:29
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 1f5d159 to 37d6b9b Compare July 28, 2026 16:29
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 673a2b1 to 2f033a5 Compare July 28, 2026 17:19
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 37d6b9b to b1988f2 Compare July 28, 2026 17:19
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 2f033a5 to 98058ac Compare July 28, 2026 17:39
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from b1988f2 to c9cefb8 Compare July 28, 2026 17:40
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 98058ac to e55866f Compare July 28, 2026 18:46
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from c9cefb8 to 3ef64a4 Compare July 28, 2026 18:46
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from e55866f to 322814a Compare July 28, 2026 20:01
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 3ef64a4 to e97cfa9 Compare July 28, 2026 20:01
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 322814a to 87a1c1a Compare July 28, 2026 21:30
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from e97cfa9 to 6692837 Compare July 28, 2026 21:30
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 87a1c1a to 875de0b Compare July 29, 2026 15:32
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch 2 times, most recently from cf6c4db to 4602c7f Compare July 29, 2026 18:35
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 875de0b to 2c6bb67 Compare July 30, 2026 20:00
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 4602c7f to 3e072de Compare July 30, 2026 20:00
Builds on FFL-2597: adds the override engine (writes to the inspected
page's localStorage via the DatadogDevtools contract), per-variant
override buttons + revert on each catalog row, a manual override-by-key
form, and clear-all / save-and-reload controls.
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2858 branch from 2c6bb67 to 4dcadc8 Compare July 31, 2026 06:26
@kellyw1806
kellyw1806 force-pushed the kelly.wang/ffl-2596 branch from 3e072de to 74968df Compare July 31, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants