Skip to content

ENG-1274: Migrate feature flags#684

Closed
sid597 wants to merge 6 commits intographite-base/684from
eng-1274-add-feature-flags-in-settings
Closed

ENG-1274: Migrate feature flags#684
sid597 wants to merge 6 commits intographite-base/684from
eng-1274-add-feature-flags-in-settings

Conversation

@sid597
Copy link
Collaborator

@sid597 sid597 commented Jan 11, 2026

https://www.loom.com/share/cafa18f38454407f85b2f25da6a5180e

new checkbox component for feature flag get and set in props, migrate to block prop based settings

use getFeatureFlag()

rerender left sidebar on enable/disable


Open with Devin

@linear
Copy link

linear bot commented Jan 11, 2026

@supabase
Copy link

supabase bot commented Jan 11, 2026

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@sid597 sid597 changed the title new checkbox component for feature flag get and set in props, migrate to block prop based settings ENG-1274: Migrate feature flags Jan 11, 2026
@sid597 sid597 marked this pull request as ready for review January 11, 2026 19:08
@sid597 sid597 force-pushed the eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod branch from f11b47f to 10445e6 Compare January 11, 2026 19:54
@sid597 sid597 force-pushed the eng-1274-add-feature-flags-in-settings branch from ea615c9 to 95e291a Compare January 11, 2026 19:54
@sid597 sid597 changed the base branch from eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod to graphite-base/684 January 12, 2026 15:26
@sid597 sid597 force-pushed the eng-1274-add-feature-flags-in-settings branch from 29817b9 to 9cd0a2c Compare January 12, 2026 15:26
@sid597 sid597 force-pushed the graphite-base/684 branch from 10445e6 to 0fb7fc7 Compare January 12, 2026 15:26
@sid597 sid597 changed the base branch from graphite-base/684 to eng-1190-replace-existing-roam-js-components-with-blockprop-based January 12, 2026 15:26
@sid597 sid597 force-pushed the eng-1274-add-feature-flags-in-settings branch from db18fd8 to 23cedec Compare January 17, 2026 18:16
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 0fb7fc7 to 62b0359 Compare January 17, 2026 18:16
@sid597 sid597 force-pushed the eng-1274-add-feature-flags-in-settings branch from 23cedec to 496a3ba Compare January 18, 2026 05:25
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 62b0359 to 40379a1 Compare January 18, 2026 05:25
@sid597 sid597 force-pushed the eng-1274-add-feature-flags-in-settings branch from 496a3ba to 0238148 Compare January 19, 2026 04:51
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 40379a1 to ac5f761 Compare January 19, 2026 04:51
@sid597 sid597 force-pushed the eng-1274-add-feature-flags-in-settings branch from 0238148 to 8dbd24c Compare January 19, 2026 05:01
@sid597 sid597 changed the base branch from graphite-base/684 to eng-1345-modify-existing-roamjs-component-onchange-to-also-change February 3, 2026 18:57
@sid597 sid597 changed the base branch from eng-1345-modify-existing-roamjs-component-onchange-to-also-change to graphite-base/684 February 4, 2026 17:17
@sid597 sid597 force-pushed the graphite-base/684 branch from c022156 to cf56730 Compare February 4, 2026 17:56
@sid597 sid597 force-pushed the eng-1274-add-feature-flags-in-settings branch from fcfa83f to 1adcb4e Compare February 4, 2026 17:56
@sid597 sid597 changed the base branch from graphite-base/684 to eng-1345-modify-existing-roamjs-component-onchange-to-also-change February 4, 2026 17:57
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View issue and 12 additional flags in Devin Review.

Open in Devin Review

Comment on lines 252 to 253
return createCleanupFn(watches);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 Pull watchers for feature flags are never initialized

The setupPullWatchOnSettingsPage function is defined in pullWatchers.ts but is never called anywhere in the codebase. This means the feature flag change handlers will never be triggered.

Click to expand

Impact

When users toggle feature flags via the FeatureFlagPanel component:

  1. setFeatureFlag is called (accessors.ts:277-286)
  2. The block props are updated in Roam
  3. But the pull watcher that should detect this change and call the handlers is never set up
  4. emitFeatureFlagChange is never called
  5. React components using useFeatureFlag hook won't re-render
  6. Side effects like remountLeftSidebar(), unmountLeftSidebar(), initializeSupabaseSync(), and setSyncActivity() will never execute

Actual vs Expected

Actual: The feature flag handlers in pullWatchers.ts:96-121 are defined but never invoked because setupPullWatchOnSettingsPage is never called.

Expected: setupPullWatchOnSettingsPage should be called during plugin initialization (e.g., in index.ts) to set up the pull watchers that trigger the handlers when feature flags change.

Evidence

Searching the codebase shows setupPullWatchOnSettingsPage is only exported, never imported or called:

apps/roam/src/components/settings/utils/pullWatchers.ts:export const setupPullWatchOnSettingsPage = (

(Refers to lines 184-253)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@sid597 sid597 changed the base branch from eng-1345-modify-existing-roamjs-component-onchange-to-also-change to graphite-base/684 February 4, 2026 18:05
@sid597
Copy link
Collaborator Author

sid597 commented Feb 7, 2026

Closing because too many changes that we don't want to merge in main at this point

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.

2 participants