-
Notifications
You must be signed in to change notification settings - Fork 6
ENG-1865 Publish Roam stored relations for shared nodes #1221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: eng-2049-refactor-publishnodestogroup-to-use-the-crossappnodeschema
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ export type LocalAccountDataInput = Partial< | |
| export type LocalDocumentDataInput = Partial< | ||
| Omit< | ||
| Database["public"]["CompositeTypes"]["document_local_input"], | ||
| "author_inline" | ||
| "author_inline" | "contents" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "content" is of type unknown, so we get typescript errors when using the LocalDocumentDataInput explicitly (even though indirectly through LocalConceptDataInput, LocalContentDataInput.) |
||
| > & { author_inline: LocalAccountDataInput } | ||
| >; | ||
| export type LocalContentDataInput = Partial< | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical Logic Bug: The
isImportedFromfunction always returns0becausegetSpaceIdOf(line 67) always returnsundefined.This breaks the logic at lines 279-281 where
(isImportedFrom(r.sourceUid) || 0) in groupSpacesevaluates to0 in groupSpaces, checking if property "0" exists instead of the actual space ID. This will cause relations with imported nodes to be incorrectly filtered.Similarly at lines 102-104,
spaceUids[isImportedFrom(r.sourceUid) || 0]always looks upspaceUids[0]which likely doesn't exist, causing all imported nodes to fall back to local UIDs when they should use RIDs.Impact: Relations involving imported nodes will not be published correctly to groups. The code will either skip valid relations or fail to construct proper RIDs for cross-space references.
Fix: Either implement
getSpaceIdOfproperly or remove the imported node logic until ENG-1856 is complete (as mentioned in the PR description).Spotted by Graphite

Is this helpful? React 👍 or 👎 to let us know.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is valid, but it's related to function that is expected to be integrated in ENG-1865 (forthcoming.) So the bug is really a placeholder.