Skip to content

ENG-1738: Render advanced search results as sidebar block#1071

Open
trangdoan982 wants to merge 4 commits into
mainfrom
eng-1738-platform-roam
Open

ENG-1738: Render advanced search results as sidebar block#1071
trangdoan982 wants to merge 4 commits into
mainfrom
eng-1738-platform-roam

Conversation

@trangdoan982
Copy link
Copy Markdown
Member

@trangdoan982 trangdoan982 commented May 22, 2026

https://www.loom.com/share/08c356bb7cd841868b34bcea39cbab3b

Summary

  • wire the advanced search footer action and Option + Enter shortcut to open a dedicated sidebar results block instead of opening individual pages
  • create a single summary block (Advanced search results: \"{query}\") with child wikilink rows for each currently displayed result
  • simplify the search dialog layout by removing preview-pane rendering and keeping results-focused list behavior

Test plan

  • Open DG: Open Node Search, search for a query, press Option + Enter, and confirm a single right-sidebar block opens
  • Verify the new sidebar block title includes the query and child blocks are wikilinks for all displayed results
  • Verify Open search sidebar in footer triggers the same behavior as Option + Enter

Made with Cursor

Switch advanced search sidebar behavior to create a single summary block with wikilink children, and wire Option+Enter/footer action to open that block in the right sidebar. This aligns the flow with Roam's native sidebar result rendering while keeping the search dialog focused on result-list interaction.

Co-authored-by: Cursor <cursoragent@cursor.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 22, 2026

ENG-1738

@supabase
Copy link
Copy Markdown

supabase Bot commented May 22, 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 ↗︎.

@trangdoan982 trangdoan982 requested a review from mdroidian May 24, 2026 03:35
@mdroidian
Copy link
Copy Markdown
Member

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d392a6af2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

text: `[[${result.title}]]`,
}));

const sidebarPageUid = await createPage({ title: sidebarBlockTitle });
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reuse existing sidebar page before calling createPage

The new sidebar action always calls createPage with a deterministic title derived from the query (Advanced search results: "..."), so repeating the same search term will attempt to create the same page title again. Roam page titles are unique and createPage is not an upsert, so the second run for the same query will throw and hit the error toast instead of opening results. This makes the new Option + Enter / footer flow fail for a common repeat-search case unless you first rename/delete the previously created results page.

Useful? React with 👍 / 👎.

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.

This is quite different than the functionality I was expecting.

On Apr 23 and May 7th, we discussed replicating the same functionality as the Roam native search which is to render the search as a component in the sidebar. But it looks like this did not make it into the scope doc/ticket. Upon looking at the scope doc/ticket, I can see where the confusion could have arose: "The active result opens in the main panel or side bar accordingly". This is quite ambiguous.

I believe this will be quite confusing to users based on the wording and it will leave them with multiple backlinks to clean up. I don't see the benefit of creating a page/blocks in this case as search is generally ephemeral.

That being said, there is a similar pattern in query builder called "Share To" where a user can insert search results as references to a given page, which may be something users request.

But for this use case let's change it to a rendered component or bring it up in the next Roam meeting / All Hands for clarification.

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