Skip to content

[ENG-1450] Update wikilink#807

Open
trangdoan982 wants to merge 10 commits intomainfrom
eng-1450-update-wikilink
Open

[ENG-1450] Update wikilink#807
trangdoan982 wants to merge 10 commits intomainfrom
eng-1450-update-wikilink

Conversation

@trangdoan982
Copy link
Collaborator

@trangdoan982 trangdoan982 commented Feb 21, 2026

@linear
Copy link

linear bot commented Feb 21, 2026

@supabase
Copy link

supabase bot commented Feb 21, 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.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Copy link
Collaborator

@maparent maparent left a comment

Choose a reason for hiding this comment

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

Ok good work in general, one definite small change, and a bigger one MAYBE.
We now have another layer of nesting:
import/<vaultname>/discourseGraphs/<node>.md.
the discourseGraphs folder was not part of the structure before.
I think that was good for users, but I do realize it creates a risk of collision, and it makes path negotiation more complex. Maybe to bring to the group?

devin-ai-integration[bot]

This comment was marked as resolved.

Comment on lines 728 to 732
const linkText = getRelativeLinkPath(resolvedFile.path);
if (linkText) {
return `[${linkText}](${encodePathForMarkdownLink(linkText)})`;
}
return `[[${linkText}]]`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Variable shadowing bug: linkText is redeclared, overwriting the original markdown link display text parameter from line 691. This causes markdown links to lose their original display text and use the file path instead.

// Should be:
const linkPath = getRelativeLinkPath(resolvedFile.path);
if (linkText) {
  return `[${linkText}](${encodePathForMarkdownLink(linkPath)})`;
}
return `[${linkPath}](${encodePathForMarkdownLink(linkPath)})`;

The pattern at lines 694-700 and 710-714 correctly preserves the original linkText parameter while computing a new linkPath variable.

Suggested change
const linkText = getRelativeLinkPath(resolvedFile.path);
if (linkText) {
return `[${linkText}](${encodePathForMarkdownLink(linkText)})`;
}
return `[[${linkText}]]`;
const linkPath = getRelativeLinkPath(resolvedFile.path);
if (linkPath) {
return `[${linkText}](${encodePathForMarkdownLink(linkPath)})`;
}
return `[[${linkPath}]]`;

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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

Open in Devin Review

@maparent
Copy link
Collaborator

Re earlier point:

We now have another layer of nesting: import/<vaultname>/discourseGraphs/<node>.md. the discourseGraphs folder was not part of the structure before. I think that was good for users, but I do realize it creates a risk of collision, and it makes path negotiation more complex. Maybe to bring to the group?

Was brought to group, new approach was accepted.

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