Skip to content

ENG-1225: Discourse node migration simple settings#696

Open
sid597 wants to merge 6 commits intoeng-1273-migrate-all-small-personal-settingsfrom
eng-1225-discourse-node-migrate-settings-prod
Open

ENG-1225: Discourse node migration simple settings#696
sid597 wants to merge 6 commits intoeng-1273-migrate-all-small-personal-settingsfrom
eng-1225-discourse-node-migrate-settings-prod

Conversation

@sid597
Copy link
Collaborator

@sid597 sid597 commented Jan 14, 2026

https://www.loom.com/share/9aa6f5f8815e41de92f21e14f7f5f855

demo video

changes done to following settings

"Key Image" — DiscourseNodeCanvasSettings.tsx

"Embedding Block Ref" — DiscourseNodeSuggestiveRules.tsx

"First Child" — DiscourseNodeSuggestiveRules.tsx

"Description" — NodeConfig.tsx

"Shortcut" — NodeConfig.tsx

"Tag" — NodeConfig.tsx

"Graph Overview" — NodeConfig.tsx

ENG-1225: Discourse node migration

Migrate personal settings text inputs

remove unnecessary checks zod takes care

migrate attributes overlay and suggestive rules


Open with Devin

Summary by CodeRabbit

  • Refactor
    • Migrated all settings storage from global to personal user-scoped configuration
    • Added real-time validation and error message feedback for node configuration settings, including tags and format specifications
    • Refactored component interfaces to reduce dependencies and improve maintainability
    • Standardized keyboard shortcut configuration across menu trigger features

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

@linear
Copy link

linear bot commented Jan 14, 2026

@supabase
Copy link

supabase bot commented Jan 14, 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 14, 2026

@sid597 sid597 changed the title ENG-1225: Discourse node migration ENG-1225: Discourse node migration simple settings Jan 14, 2026
@sid597 sid597 marked this pull request as ready for review January 14, 2026 09:02
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from 3ac2996 to d549f8d Compare January 17, 2026 18:16
@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-1225-discourse-node-migrate-settings-prod branch from d549f8d to 78b7dbb 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-1225-discourse-node-migrate-settings-prod branch from 78b7dbb to d66fa03 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-1225-discourse-node-migrate-settings-prod branch from d66fa03 to cb22590 Compare January 19, 2026 05:01
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 490810f to 8dc5276 Compare January 19, 2026 06:03
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from cb22590 to 78abef0 Compare January 19, 2026 06:03
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 8dc5276 to 8286d6b Compare January 19, 2026 06:34
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from 78abef0 to 3966245 Compare January 19, 2026 06:34
This was referenced Jan 19, 2026
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 8286d6b to 78e8311 Compare January 20, 2026 16:06
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from 3966245 to 7015148 Compare January 20, 2026 16:06
@sid597 sid597 changed the base branch from eng-1273-migrate-all-small-personal-settings to graphite-base/696 January 28, 2026 21:16
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from 7015148 to ecdee21 Compare January 29, 2026 11:34
@sid597 sid597 force-pushed the graphite-base/696 branch from 78e8311 to 938f6aa Compare January 29, 2026 11:34
@sid597 sid597 changed the base branch from graphite-base/696 to eng-1273-migrate-all-small-personal-settings January 29, 2026 11:34
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 potential issue.

View issue and 6 additional flags in Devin Review.

Open in Devin Review

@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from ecdee21 to 96f4575 Compare January 30, 2026 06:10
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 20 additional flags in Devin Review.

Open in Devin Review

@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from a449a73 to 84aa5ac Compare February 3, 2026 21:53
@sid597 sid597 force-pushed the eng-1273-migrate-all-small-personal-settings branch from 88d4ff5 to f5d0a0a Compare February 4, 2026 17:56
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from 84aa5ac to 8ad6b12 Compare February 4, 2026 17:56
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 24 additional flags in Devin Review.

Open in Devin Review

@sid597 sid597 changed the base branch from eng-1273-migrate-all-small-personal-settings to graphite-base/696 February 7, 2026 18:29
@sid597 sid597 force-pushed the graphite-base/696 branch from f5d0a0a to 7f28c8c Compare February 9, 2026 09:46
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from 8ad6b12 to 29b1281 Compare February 9, 2026 09:46
@sid597 sid597 changed the base branch from graphite-base/696 to eng-1273-migrate-all-small-personal-settings February 9, 2026 09:47
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 23 additional findings in Devin Review.

Open in Devin Review

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 22 additional findings in Devin Review.

Open in Devin Review

@sid597 sid597 changed the base branch from eng-1273-migrate-all-small-personal-settings to graphite-base/696 February 10, 2026 07:46
@sid597 sid597 force-pushed the eng-1225-discourse-node-migrate-settings-prod branch from fd062f4 to ee13988 Compare February 10, 2026 08:28
@sid597 sid597 changed the base branch from graphite-base/696 to eng-1273-migrate-all-small-personal-settings February 10, 2026 08:29
@sid597 sid597 requested a review from mdroidian February 10, 2026 09:31
overlay: stringWithDefault(""),
index: IndexSchema.nullable().optional(),
suggestiveRules: SuggestiveRulesSchema.nullable().optional(),
embeddingRef: stringWithDefault(""),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wrong, we don't want these to exist on top level they have to be under suggestiveRules schema only

const [value, setValue] = useState(
() => defaultValue ?? getter(settingKeys) ?? "",
);
const error = validate?.(value);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Some discourse node text panels need validation logic adding support for that

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if validate could be renamed to better reflect its return value. Right now it reads like it returns a boolean, but it actually returns an error message (string) or undefined when valid. Something like getValidationError / getErrorMessage would make that clearer, and adding a

type ValidationError = string;
type Validator<T> = (value: T) => ValidationError | undefined;

type alias would lock in the intent.

settingKeys: string[];
};

export const DiscourseNodeTextPanel = ({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new panels for discourseNode usage

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.

Everything was generally good until NodeConfig.tsx. There are a bunch of changes in there that don't really make sense to me. I'm not sure if they were stylistic choices or if somehow they related to settings in props.

Could you do a quick video explaining the changes.

Also, make sure to format all files with prettier and make sure there are no lint errors in your new code before sending for re-review.

onChange?: (values: string[]) => void;
} & RoamBlockSyncProps;

const DEBOUNCE_MS = 500;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's cut this in half.

const [value, setValue] = useState(
() => defaultValue ?? getter(settingKeys) ?? "",
);
const error = validate?.(value);
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if validate could be renamed to better reflect its return value. Right now it reads like it returns a boolean, but it actually returns an error message (string) or undefined when valid. Something like getValidationError / getErrorMessage would make that clearer, and adding a

type ValidationError = string;
type Validator<T> = (value: T) => ValidationError | undefined;

type alias would lock in the intent.

onChange={(checked) => {
setIsKeyImage(checked);
if (checked && !keyImageOption) setKeyImageOption("first-image");
setInputSetting({
Copy link
Contributor

Choose a reason for hiding this comment

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

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the void operator.eslint@typescript-eslint/no-floating-promises

onChange={(e) => {
const target = e.target as HTMLInputElement;
setKeyImageOption(target.value);
const value = (e.target as HTMLInputElement).value;
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the purpose of this change?

const graphOverviewUid = getUid("Graph Overview");
const specificationUid = getUid("Specification");
const indexUid = getUid("Index");
const overlayUid = getUid("Overlay");
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of re-ordering these?

return;
}
const cleanTag = getCleanTagText(tag);
const cleanTag = getCleanTagText(tagValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

This value is now generated from a different function/mechanism than before this PR. Could you explain why this change was made and how it relates to the new schema?

@@ -42,7 +42,6 @@ import {
DISALLOW_DIAGNOSTICS,
} from "./data/userSettings";
// import { initSchema } from "./components/settings/utils/init";
Copy link
Contributor

Choose a reason for hiding this comment

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

.

Copy link
Contributor

And make sure to zoom in ~50% when doing loom videos, you have a very large monitor 🙂

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