Skip to content

ENG-1273: Migrate small personal settings#691

Open
sid597 wants to merge 5 commits intoeng-1272-migrate-all-small-global-settings-componentfrom
eng-1273-migrate-all-small-personal-settings
Open

ENG-1273: Migrate small personal settings#691
sid597 wants to merge 5 commits intoeng-1272-migrate-all-small-global-settings-componentfrom
eng-1273-migrate-all-small-personal-settings

Conversation

@sid597
Copy link
Collaborator

@sid597 sid597 commented Jan 12, 2026

NOTE: No usage video I tested all these and they work. The video will not be helpful because not able to show the console logs in loom video.

Summary by CodeRabbit

Release Notes

  • Refactor

    • Migrated settings to be personalized per user instead of applied globally, enabling individual control over features like Discourse Context Overlay, Suggestive Mode Overlay, Page Preview, Text Selection Popup, and sidebar behavior.
    • Streamlined personal settings interface with consolidated UI components.
  • Documentation

    • Added comprehensive migration guide documenting settings system updates.

✏️ Tip: You can customize this high-level summary in your review settings.


Open with Devin

@linear
Copy link

linear bot commented Jan 12, 2026

@supabase
Copy link

supabase bot commented Jan 12, 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 ↗︎.

Copy link
Collaborator Author

sid597 commented Jan 12, 2026

@sid597 sid597 marked this pull request as ready for review January 12, 2026 16:02
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from a82cfaf to bc0de10 Compare January 17, 2026 18:16
@sid597 sid597 force-pushed the eng-1272-migrate-all-small-global-settings-component branch 2 times, most recently from 9015611 to 16b26f7 Compare January 18, 2026 05:25
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from bc0de10 to 57abc42 Compare January 18, 2026 05:25
@sid597 sid597 force-pushed the eng-1272-migrate-all-small-global-settings-component branch from 16b26f7 to dd2272b Compare January 19, 2026 04:51
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 57abc42 to 7ead54e Compare January 19, 2026 04:51
@sid597 sid597 force-pushed the eng-1272-migrate-all-small-global-settings-component branch from dd2272b to 92ea54b Compare January 19, 2026 05:01
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch 2 times, most recently from 490810f to 8dc5276 Compare January 19, 2026 06:03
@sid597 sid597 force-pushed the eng-1272-migrate-all-small-global-settings-component branch from 5a165ac to bed3149 Compare January 19, 2026 06:34
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 8dc5276 to 8286d6b Compare January 19, 2026 06:34
This was referenced Jan 19, 2026
@sid597 sid597 force-pushed the eng-1272-migrate-all-small-global-settings-component branch from bed3149 to d23e91a Compare January 20, 2026 16:06
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from f5d0a0a to 2a4faca Compare February 7, 2026 18:29
@sid597 sid597 changed the base branch from graphite-base/691 to eng-1272-migrate-all-small-global-settings-component February 7, 2026 18:30
settingKeys={["Discourse Context Overlay"]}
defaultValue={getSetting<boolean>("discourse-context-overlay", false)}
onChange={(checked) => {
void setSetting("discourse-context-overlay", checked);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note we are using getSetting and setSetting from the extensionAPI, so when we use these panel we save to both the extensionApi and the blockProps.

@sid597 sid597 requested a review from mdroidian February 7, 2026 18:41
@mdroidian
Copy link
Contributor

mdroidian commented Feb 9, 2026

NOTE: No usage video I tested all these and they work. The video will not be helpful because not able to show the console logs in loom video.

@sid597
Why couldn't you show the console logs in the video?

Alternatively, another way of showing would be to show the before and after. EG: if blocks, show the blocks being added/removed. If props, show the props before, and show the props after.

Copy link
Contributor

@mdroidian mdroidian left a comment

Choose a reason for hiding this comment

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

Looks good.

Sentence case for UI

Let's take this opportunity to change all settings to "Sentence case". The team made that call awhile ago but looks like some of these might not have been changed.

So lets change that before merge

Settings Values

And remember that we discussed the setting values to be consistent as well:

either "lower-with-dash" or "Sentence case like this"

I'm not sure if this is scheduled for another issue, just wanting to note it again here.

@sid597 sid597 changed the base branch from eng-1272-migrate-all-small-global-settings-component to graphite-base/691 February 9, 2026 05:48
@sid597
Copy link
Collaborator Author

sid597 commented Feb 9, 2026

@mdroidian Found out why I was not able to show the console, it was because in loom I was sharing tab instead of whole screen, and each time I tested with tab the console does not appear in the video. Now I have shared the whole screen and here is the video:

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

setFeatureFlag,
} from "~/components/settings/utils/accessors";
import type { FeatureFlags } from "~/components/settings/utils/zodSchema";

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to test add the following code here:

import { getSetting } from "~/utils/extensionSettings";

// --- DEBUG: maps block prop path to extensionAPI.settings key ---
const BLOCK_PROP_TO_EXT_API: Record<string, string> = {
  "Discourse Context Overlay": "discourse-context-overlay",
  "Suggestive Mode Overlay": "suggestive-mode-overlay",
  "Text Selection Popup": "text-selection-popup",
  "Disable Sidebar Open": "disable-sidebar-open",
  "Page Preview": "page-preview",
  "Hide Feedback Button": "hide-feedback-button",
  "Auto Canvas Relations": "auto-canvas-relations",
  "Overlay in Canvas": "discourse-context-overlay-in-canvas",
  "Streamline Styling": "streamline-styling",
  "Disable Product Diagnostics": "disallow-diagnostics",
  "Query > Hide Query Metadata": "hide-metadata",
  "Query > Default Page Size": "default-page-size",
  "Query > Query Pages": "query-pages",
};

const debugLog = (panel: string, title: string, settingKeys: string[], blockPropValue: unknown) => {
  const path = settingKeys.join(" > ");
  const extApiKey = BLOCK_PROP_TO_EXT_API[path];
  const extApiValue = extApiKey ? getSetting(extApiKey, "(not set)") : "(no extensionAPI mapping)";
  console.log(
    `[${panel}] "${title}"`,
    `\n  blockProp [${path}]:`, blockPropValue,
    `\n  extensionAPI [${extApiKey || "?"}]:`, extApiValue,
  );
};

setValue(checked);
setter(settingKeys, checked);
await syncFlagToBlock(checked);
onChange?.(checked);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to test add the following line to all the base panels, you just have to change the name i.e replace the "FlagPanel" with corresponding panel name

setTimeout(() => debugLog("FlagPanel", title, settingKeys, getter(settingKeys)), 500);

@sid597 sid597 force-pushed the graphite-base/691 branch from fcaa6de to 0ef04ee Compare February 9, 2026 07:44
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 2a4faca to 1a99b62 Compare February 9, 2026 07:44
@sid597 sid597 changed the base branch from graphite-base/691 to eng-1272-migrate-all-small-global-settings-component February 9, 2026 08:21
@sid597
Copy link
Collaborator Author

sid597 commented Feb 9, 2026

@mdroidian re requesting review even though its already approved, because there are many changes related to Sentence Case

@sid597 sid597 requested a review from mdroidian February 9, 2026 08:24
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 2 new potential issues.

View 16 additional findings in Devin Review.

Open in Devin Review

@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 69ffb18 to 7f28c8c Compare February 9, 2026 09:46
@sid597 sid597 force-pushed the eng-1272-migrate-all-small-global-settings-component branch from 0ef04ee to 15f3a6b Compare February 9, 2026 09:46
return (
<div className="flex flex-col gap-4 p-1">
{/* TODO: Titles kept as lowercase to match legacy readers in getExportSettings.ts.
Update titles to Sentence case once read side is migrated to block props. */}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not using Sentence case for titles of these GlobalFlagPanel because call site will break

panel={
<div className="flex flex-col gap-4 p-1">
{/* TODO: Titles kept as Title Case to match legacy readers in getSuggestiveModeConfigSettings.ts.
Update titles to Sentence case once read side is migrated to block props. */}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not using Sentence case for titles of these GlobalFlagPanel because call site will break

return (
<div className="flex flex-col gap-4 p-1">
{/* TODO: Titles kept as legacy casing to match readers in discourseConfigRef.ts and initializeObserversAndListeners.ts.
Update titles to Sentence case once read side is migrated to block props. */}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not using Sentence case for titles of these panels because call site will break

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