Skip to content

ENG-2068 Sync and publish node schemas while publishing nodes - #1249

Open
maparent wants to merge 2 commits into
eng-2067-refactor-publishnodestogroups-to-avoid-database-access-infrom
eng-2068-sync-and-publish-node-schemas-while-publishing-nodes
Open

ENG-2068 Sync and publish node schemas while publishing nodes#1249
maparent wants to merge 2 commits into
eng-2067-refactor-publishnodestogroups-to-avoid-database-access-infrom
eng-2068-sync-and-publish-node-schemas-while-publishing-nodes

Conversation

@maparent

@maparent maparent commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

@linear-code

linear-code Bot commented Jul 26, 2026

Copy link
Copy Markdown

ENG-2068

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
discourse-graph Ready Ready Preview, Comment Jul 27, 2026 3:34pm

Request Review

@supabase

supabase Bot commented Jul 26, 2026

Copy link
Copy Markdown

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 ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

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.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread apps/roam/src/utils/publishNodesToGroups.ts Outdated
Comment thread apps/roam/src/utils/publishNodesToGroups.ts Outdated
Comment thread apps/roam/src/utils/roamToCrossAppConverters.ts Outdated
@maparent
maparent force-pushed the eng-2068-sync-and-publish-node-schemas-while-publishing-nodes branch from eacdc23 to 2f999dc Compare July 27, 2026 01:26
@maparent
maparent force-pushed the eng-2067-refactor-publishnodestogroups-to-avoid-database-access-in branch from ab026af to 05ce8da Compare July 27, 2026 01:27
@maparent
maparent force-pushed the eng-2068-sync-and-publish-node-schemas-while-publishing-nodes branch from 2f999dc to c642663 Compare July 27, 2026 10:27
@maparent
maparent requested review from mdroidian and sid597 July 27, 2026 11:15
@maparent
maparent force-pushed the eng-2067-refactor-publishnodestogroups-to-avoid-database-access-in branch from 4e8d0a4 to 9792f5d Compare July 27, 2026 15:32
@maparent
maparent force-pushed the eng-2068-sync-and-publish-node-schemas-while-publishing-nodes branch from dec5cf5 to 2f1ab86 Compare July 27, 2026 15:32

Copy link
Copy Markdown
Member

@codex review

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

Copy link
Copy Markdown

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: 2f1ab864d6

ℹ️ 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".

const missingNodeSchemas = nodeSchemas.filter(
(s) => !syncedUids.has(s.localId),
);
result.skippedUnsyncedUids = nodeUids.filter((uid) => !syncedUids.has(uid));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve unsynced IDs before filtering

When any requested node has not synced yet, nodeUids has already been intersected with syncedUids, so this predicate can never match and skippedUnsyncedUids is always empty. Consequently, the export dialog and telemetry report no skipped nodes—and may close after publishing only a subset—instead of telling the user to retry; compute the skipped set from the original requested UIDs before replacing nodeUids.

Useful? React with 👍 / 👎.

Comment on lines +127 to +130
if (response.error) {
internalError({ error: response.error });
return result;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check row-level concept upsert failures

When a schema row fails—for example because its name conflicts with another concept—upsert_concepts catches the exception and returns a negative ID while leaving response.error null. The existing upsertConceptBatches helper explicitly checks returned IDs below zero, but this path proceeds to grant access and reports the absent schema as synced and published; inspect response.data for these sentinel failures before creating ResourceAccess rows.

Useful? React with 👍 / 👎.

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