ENG-1640 Add custom sidebar commands, starting with Create Node#971
ENG-1640 Add custom sidebar commands, starting with Create Node#971
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
mdroidian
left a comment
There was a problem hiding this comment.
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?
2978869 to
830aa04
Compare
6fbd89e to
6be9ee9
Compare
|
Done. Right now I'm bothered by the fact that personal settings, unlike global settings, allow duplicates; but that should be a separate PR. |
mdroidian
left a comment
There was a problem hiding this comment.
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.
| }; | ||
| }; | ||
|
|
||
| export const createDiscourseNodeFromCommand = ( |
There was a problem hiding this comment.
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], |
There was a problem hiding this comment.
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)], |
There was a problem hiding this comment.
Add commands first as per ticket specs:
{create node} appears in the supported custom-command autocomplete/options (as the first option).
https://linear.app/discourse-graphs/issue/ENG-1640/add-custom-sidebar-commands-starting-with-create-node
I responded to all comments; here is the updated loom.
https://www.loom.com/share/145b85a3792047fe9a7023eedd27e715