Skip to content

Eng 1650 temporary username in obsidian#981

Open
maparent wants to merge 15 commits intomainfrom
eng-1650-temporary-username-in-obsidian
Open

Eng 1650 temporary username in obsidian#981
maparent wants to merge 15 commits intomainfrom
eng-1650-temporary-username-in-obsidian

Conversation

@maparent
Copy link
Copy Markdown
Collaborator

@maparent maparent commented Apr 22, 2026

Add the username field, propagate it to the PlatformAccount, expose it in the frontmatter, Discourse Context and import modal.
https://www.loom.com/share/9981c436ba894ca0b55482a61b2b382f
After changes:
https://www.loom.com/share/a0be92baadf04615acaafc7f79d7870e


Open in Devin Review

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 22, 2026

@supabase
Copy link
Copy Markdown

supabase Bot commented Apr 22, 2026

Updates to Preview Branch (eng-1650-temporary-username-in-obsidian) ↗︎

Deployments Status Updated
Database Thu, 23 Apr 2026 16:52:49 UTC
Services Thu, 23 Apr 2026 16:52:49 UTC
APIs Thu, 23 Apr 2026 16:52:49 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Thu, 23 Apr 2026 16:52:50 UTC
Migrations Thu, 23 Apr 2026 16:52:50 UTC
Seeding Thu, 23 Apr 2026 16:52:50 UTC
Edge Functions Thu, 23 Apr 2026 16:52:53 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@maparent maparent force-pushed the eng-1650-temporary-username-in-obsidian branch from 369e231 to e59af43 Compare April 22, 2026 14:39
@maparent maparent requested review from trangdoan982 and removed request for trangdoan982 April 22, 2026 14:41
devin-ai-integration[bot]

This comment was marked as resolved.

@maparent maparent requested review from trangdoan982 and removed request for trangdoan982 April 22, 2026 14:48
@maparent maparent force-pushed the eng-1650-temporary-username-in-obsidian branch from aacac24 to 31ff57c Compare April 22, 2026 15:23
@maparent maparent requested a review from trangdoan982 April 22, 2026 15:28
devin-ai-integration[bot]

This comment was marked as resolved.

@maparent maparent removed the request for review from trangdoan982 April 22, 2026 16:51
devin-ai-integration[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.

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 trangdoan982 April 23, 2026 16:29
@maparent maparent force-pushed the eng-1650-temporary-username-in-obsidian branch from 22021e7 to f1e4a06 Compare April 23, 2026 16:30
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
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 19 additional findings in Devin Review.

Open in Devin Review

nodesBySpace.get(node.spaceId)!.push(node);
}

await fetchUserNames(plugin, client);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Author names display as 'user {id}' in ImportNodesModal selection step because fetchUserNames is called too late

fetchUserNames is only called inside importSelectedNodes (apps/obsidian/src/utils/importNodes.ts:1245), which runs when the user clicks the final "Import" button. However, getUserNameById is called during the renderSelectStep() in ImportNodesModal.tsx (lines 343 and 367) to display author names before the import happens. At that point, plugin.settings.userNames has not been populated by fetchUserNames, so every author name renders as the fallback user {id} string from apps/obsidian/src/utils/typeUtils.ts:96. The fix is to call fetchUserNames during loadImportableNodes (alongside the existing getSpaceNameFromIds/getSpaceUris calls) so the names are available when the selection UI first renders.

Prompt for agents
The fetchUserNames call on line 1245 of importNodes.ts only runs during importSelectedNodes (the final import step). But getUserNameById is used in ImportNodesModal.tsx renderSelectStep to show author names during the node selection UI, before import happens. At that point plugin.settings.userNames is empty so all names show as 'user {id}'.

To fix this, call fetchUserNames during loadImportableNodes in ImportNodesModal.tsx (around where getSpaceNameFromIds and getSpaceUris are called, circa line 80-97 of ImportNodesModal.tsx). You can also keep the call in importSelectedNodes for the case where importSelectedNodes is called from a different code path. The key thing is ensuring userNames is populated before renderSelectStep renders the author names.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant