Skip to content

ENG-1640 Add custom sidebar commands, starting with Create Node#971

Open
maparent wants to merge 14 commits intomainfrom
eng-1640-add-custom-sidebar-commands-starting-with-create-node
Open

ENG-1640 Add custom sidebar commands, starting with Create Node#971
maparent wants to merge 14 commits intomainfrom
eng-1640-add-custom-sidebar-commands-starting-with-create-node

Conversation

@maparent
Copy link
Copy Markdown
Collaborator

@maparent maparent commented Apr 20, 2026

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 20, 2026

@supabase
Copy link
Copy Markdown

supabase Bot commented Apr 20, 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 ↗︎.

graphite-app[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

graphite-app[bot]

This comment was marked as resolved.

@maparent maparent marked this pull request as draft April 20, 2026 14:44
@maparent maparent requested a review from mdroidian April 20, 2026 14:50
Copy link
Copy Markdown
Member

@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.

My initial impression is this might be an imperative-vs-declarative state sync issue in the input flow. I’ve left an inline note where I think it’s happening; could you take a pass at making that path consistently React-state-driven and confirm whether that resolves the stale/blank display behavior?

And as a quick test, I downloaded the transcript from the loom video and pasted it directly into cursor. Cursor's response confirmed my intuition and even suggested changes for me. I think this would be a great opportunity for you to test using LLM tools. Could you try explaining the problem to Cursor, Codex, or Claude to see if you can resolve it?

Comment thread apps/roam/src/components/settings/LeftSidebarGlobalSettings.tsx Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx Outdated
Comment thread apps/roam/src/components/LeftSidebarCommands.tsx Outdated
Comment thread apps/roam/src/styles/styles.css Outdated
Comment thread apps/roam/src/utils/registerCommandPaletteCommands.ts Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarGlobalSettings.tsx Outdated
Comment thread apps/roam/src/components/LeftSidebarCommands.tsx Outdated
Comment thread apps/roam/src/components/LeftSidebarCommands.tsx Outdated
@maparent maparent force-pushed the eng-1640-add-custom-sidebar-commands-starting-with-create-node branch from 2978869 to 830aa04 Compare April 22, 2026 14:44
@maparent maparent force-pushed the eng-1640-add-custom-sidebar-commands-starting-with-create-node branch from 6fbd89e to 6be9ee9 Compare April 23, 2026 16:33
@maparent maparent marked this pull request as ready for review April 23, 2026 18:57
@maparent
Copy link
Copy Markdown
Collaborator Author

Done. Right now I'm bothered by the fact that personal settings, unlike global settings, allow duplicates; but that should be a separate PR.

@maparent maparent requested a review from mdroidian April 23, 2026 19:00
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Member

@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.

Could you please update the body of the PR to reflect it's current state?
Could you also please include a loom video demonstrating the changes?

Thank you.

Comment thread apps/roam/src/components/LeftSidebarCommands.tsx Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarGlobalSettings.tsx Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarGlobalSettings.tsx Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarGlobalSettings.tsx Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarGlobalSettings.tsx Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx Outdated
Comment thread apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx Outdated
Comment thread apps/roam/src/components/LeftSidebarCommands.tsx
Comment thread apps/roam/src/components/LeftSidebarView.tsx Outdated
Comment thread apps/roam/src/utils/registerCommandPaletteCommands.ts
graphite-app[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@maparent maparent requested a review from mdroidian April 24, 2026 13:37
Copy link
Copy Markdown
Member

@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.

Let's make sure the {create node} command appears as the first command before merging.

};
};

export const createDiscourseNodeFromCommand = (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When moving large chunks of code, please add inline github comments to highlight which piece(s) of the code were changed. This was asked twice but still not done.

So I went through and compared this code line by line.

Here is an example of what is expected next time:

This is the only line changed. All other code in this change block is from moving the code so that it could be exported. No other substantive changes.

const pageNames = useMemo(() => getAllPageNames(), []);
const commandNames = useMemo(() => Object.keys(commands), []);
const pageAndCommandNames = useMemo(
() => [...getAllPageNames(), ...commandNames],
Copy link
Copy Markdown
Member

@mdroidian mdroidian Apr 24, 2026

Choose a reason for hiding this comment

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

Add commandNames first, as per ticket specs:

{create node} appears in the supported custom-command autocomplete/options (as the first option).


const pageNames = useMemo(() => getAllPageNames(), []);
const pageAndCommandNames = useMemo(
() => [...pageNames, ...Object.keys(commands)],
Copy link
Copy Markdown
Member

@mdroidian mdroidian Apr 24, 2026

Choose a reason for hiding this comment

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

Add commands first as per ticket specs:

{create node} appears in the supported custom-command autocomplete/options (as the first option).

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