Repository navigation
ENG-1986 Refactor Obsidian sync to use the new cross-app schemas (6/6) - #1633
Open
sid597 wants to merge 2 commits into
Conversation
- CrossAppNodeSchema and CrossAppRelationTypeSchema gain an optional color. The shared converters write it to literal_content.color and read it back, out of metadata. - Obsidian sync sends color through the CrossApp types instead of nesting it under literal_content.source_data, as format already does. Obsidian import reads both places, so rows written before this still import their color. - concept_design.md lists the new mapping.
|
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. |
3 tasks done
This was referenced Nov 16, 2026
sid597
marked this pull request as ready for review
November 17, 2026 07:30
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Reviewer brief
ENG-1986 moves Obsidian sync off its own converters and onto the shared CrossApp converters, without loss of functionality. It ships as six PRs. PRs 1 to 4 and 6 are stacked on #1575 (ENG-1823). PR 5 targets
main:upsert_conceptstoday. No production change.colorbecomes a CrossApp field on node types and relation types, inpackages/database. It doesn't depend on PRs 1 to 4.colorthrough the shared converters. It needs PR 5, and its branch carries PR 5's change until that merges.Why six and not one: each step changes one kind of row, and #1620's tests show whether a stored value changed. PR 5 changes the shared contract, so it goes first in its own PR and needs its own review. Together the steps are well over the 400-line guideline.
packages/databasechanges in this diff are PR 5 (ENG-1986 Refactor Obsidian sync to use the new cross-app schemas (5/6) #1634). Review them there. This PR's own change is inapps/obsidian, and thepackages/databasefiles drop out of this diff once PR 5 merges andmainis merged down the stack.coloris a CrossApp field on node types and relation types (CrossAppNodeSchema.color,CrossAppRelationTypeSchema.color). The shared converters write it toliteral_content.colorand read it back out ofmetadata. Obsidian sync sends it through the CrossApp types.colormoves fromliteral_content.source_datato the top level ofliteral_content, whereformatalready is. A local relation type now sends an emptysource_data, because color was its only entry. The three ENG-1986 Refactor Obsidian sync to use the new cross-app schemas (1/6) #1620 rows that pin this are updated.formatis already a field.sourceDatais not in this PR.#7DA13E) and a relation type carries a tldraw color name (blue). The contract types both as a string, andconcept_design.mdsays which is which.parseSchemaLiteralContent(importNodes.ts:1191). Since [ENG-1295 & ENG-1350 & ENG-1297] F5 import and refresh published nodes #722 it has readsource_data.colorand then the top-levelcolor, so this version and older plugin versions import the color from new rows. Relation type import sets a default color, and Roam reads no color.parseSchemaLiteralContentreadssource_data.colorfirst, the opposite order toformat. The order has no effect today: a new row has only the top-level key, an older row onlysource_data, andupsert_conceptsreplacesliteral_contentwhole.nodeSchemaToCrossAppdoesn't setcolor. Roam node types keep theirs incanvasSettings.color, and Roam sync still builds node type rows with its own converter. No ticket covers this yet.source_data.coloruntil its schema is edited and sent again.dbNodeSchemaToCrossAppanddbRelationTypeSchemaToCrossAppread only the top-level key, as they do forformat, so they return nocolorfor such a row. Nothing reads CrossAppcoloryet. The first consumer has to fall back tosource_data.color, asresolveSchemaFormatdoes forformat.colorthere.Verification
apps/obsidian:vitest runpasses (261 tests),tsc --noEmit --skipLibCheckpasses, andeslint --max-warnings 0is clean on the changed files.packages/database:vitest runpasses (152 tests) andtsc --noEmit --skipLibCheckpasses.eslint --max-warnings 0reports fiveno-unnecessary-type-assertionwarnings indbToCrossAppConverters.tsat lines 79 to 140. This PR's first change in that file is at line 171.apps/roam:tsc --noEmit --skipLibCheckpasses andvitest runpasses (716 tests).packages/databasecucumber features, which need a database, and a sync followed by an import between two vaults.Loom video
Not recorded yet. This PR stays a draft until it has one.
Scope check
$scope-checkagainst ENG-1986 and the final diff.Done When: None.Done Whenasks that the cross-app schemas are complete, andcoloris the field the contract owner agreed to add.Standards check
$dg-pr-adherence-checkagainst the final diff and PR metadata.Local delegated full review
$dg-delegated-full-reviewwhen no other full-review workflow is available.