ENG-2272 Show candidate nodes as results in advanced node search - #1489
Open
trangdoan982 wants to merge 4 commits into
Open
trangdoan982 wants to merge 4 commits into
trangdoan982 wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Contributor
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Add a "Show candidate nodes" toggle to a new Display options menu. When on, lines tagged with a node type's tag are collected in one pass over the metadata cache and ranked alongside nodes, with nodes winning ties. Candidate rows use the node type's badge outlined instead of filled, in a fixed-width column so every title lines up, and open at the tagged line. Insert link is disabled for candidates since they are not nodes yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M385GX3NP1QPTJ9K30QK20TG
Pass the open line as a named option, move activateOnKey to utils/keyboardHints, add explicit return types, and style the candidate pill text with a class instead of an inline style. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M3J2QDY0GGKKK7WM2A69YA6X
Node type settings don't enforce unique tags, so the tag lookup now maps each tag to all matching types instead of keeping only the last one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M3J3TS9ZG3TPS0TXYVGAGKY0
Duplicate node tags should be blocked in node type settings rather than handled in candidate search; tracked in ENG-2327. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trangdoan982
force-pushed
the
eng-2272-show-candidate-nodes-as-results-in-advanced-node-search
branch
from
September 28, 2026 15:08
db37e78 to
ed66545
Compare
mdroidian
approved these changes
Sep 30, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://entire.io/gh/DiscourseGraphs/discourse-graph/trails/29
Reviewer brief
#clm-candidate) appear in Advanced Node Search next to real nodes. They're filtered by node type, sorted with nodes, and open at the tagged line.getCandidateNodesinapps/obsidian/src/services/QueryEngine.tsmakes one pass over the metadata cache's tag index using a tag → node type map. It only reads files that had a match, and reads them in parallel.rankDiscourseNodesByTitleputs nodes first on equal scores or titles.apps/obsidian/src/components/NodeSearchModal.tsx: the badge sits in a fixed-width column so every title starts at the same x. A candidate uses its node type's badge outlined, a node uses it filled.QueryEngine.test.ts. The implementation is 313 lines.apps/obsidian/AGENTS.md. Its tag index has no per-line position or text for paragraphs, quotes or headings, only for list items. The metadata cache has both for every line shape.nodeType.tagexactly, while candidates match tags case-insensitively. I haven't checked whether CodeMirror lowercases tag names.The diagram shows where candidates join the existing search pipeline.
flowchart LR T["NodeDisplayOptionsMenu.tsx<br/>Show candidate nodes toggle"] --> S["QueryEngine.getCandidateNodes<br/>tags → map lookup → cachedRead hit files<br/>title = titleFromTaggedLine(line)"] N["QueryEngine.getDiscourseNodeCandidates"] --> R S --> R["rankDiscourseNodesByTitle<br/>type filter → fuzzy score → nodes win ties"] R --> L["NodeSearchModal ResultList<br/>fixed badge column, filled vs outlined"] L --> O["openFileInNewTab(file, { line })"]Verification
Live Obsidian, driven over CDP in a test vault with one claim node and three tagged lines:
zephyr, toggle Show candidate nodeszephyr, measure rowscool the coast, EnterTests: 17 tests in
apps/obsidian/src/services/__tests__/QueryEngine.test.tscover the candidate scan (line shapes, tag case, repeated and multiple tags, empty titles, unreadable files, which files get read) and mixed ranking (type filter, shared score scale, ties). Rerun withpnpm -C apps/obsidian test:unit.pnpm ci:validatepasses.Not verified: scan time on a large vault. I only measured it on the dev vault.
Loom video
https://www.loom.com/share/b4bae23957c642f4a79b07062f2eda49
Scope check
$scope-checkagainst the ENG ticket and final diff.Done When:tagNodeHandler.tstoapps/obsidian/src/utils/taggedLine.ts, soQueryEnginedoesn't import CodeMirror and modal code.titleFromTaggedLinenow also strips a leading#or>. That also changes the initial title when creating a node from a tagged H1 or blockquote line. Levels##and deeper were already stripped. The requester agreed.Standards check
$dg-pr-adherence-checkagainst the final diff and PR metadata.Resolved the findings:
openFileInNewTab/openFileInNewLeafnow take a named{ line }option,activateOnKeymoved toapps/obsidian/src/utils/keyboardHints.ts, return types are explicit, and the candidate badge's text colour comes from a class. The Loom is still outstanding.Local delegated full review
$dg-delegated-full-reviewwhen no other full-review workflow is available.No findings.
🤖 Generated with Claude Code