Skip to content

Land orphaned Graphite stack PRs (#764, #765, #769, #793, #794, #805)#826

Merged
sid597 merged 5 commits intomainfrom
recover-orphaned-dual-write
Feb 25, 2026
Merged

Land orphaned Graphite stack PRs (#764, #765, #769, #793, #794, #805)#826
sid597 merged 5 commits intomainfrom
recover-orphaned-dual-write

Conversation

@sid597
Copy link
Collaborator

@sid597 sid597 commented Feb 24, 2026

No new code was written. This PR recovers 7
already-reviewed-and-approved PRs whose changes never landed on
main due to a Graphite stack merge race condition.

What happened

These PRs were part of a 22-PR Graphite stack. When Graphite
merged the stack bottom-up, the base PR (#696) was
squash-merged to main before the upstack PRs finished merging
into their parent branches. The upstack PRs ended
up squash-merged into now-dead parent branches instead of being
rebased onto main first. Graphite shows them
as "merged", but their changes are orphaned.

The 7 orphaned PRs formed two independent chains:

How this PR was created

Chain 2 (4 PRs): Identified the topmost orphaned branch
(origin/eng-1217-section-components-in-left-sidebarv2) which
contains all Chain 2 changes.
Ran git merge --squash of that branch into a fresh branch off
main.
Resolved conflicts in NodeConfig.tsx (due to #784 which did
land on main) and zodSchema.example.ts
(Left sidebar type change from {} to []).

Chain 1 (3 PRs): Chain 1 was on completely separate
branches not included in Chain 2's merge source
(Graphite had rebased Chain 2 onto main after #784 landed,
losing Chain 1).
Applied each PR's exact diff from GitHub in order using gh pr diff:

  1. gh pr diff 764 | git apply
  2. gh pr diff 765 | git apply
  3. gh pr diff 769 | git apply --exclude='*/init.ts' (init.ts
    applied manually — ENG-1291: Port discourse node specification #765 and ENG-1290: Port discourse node config panel #769
    both modified it from the same base; merged both: ENG-1291: Port discourse node specification #765's
    safeParse checks + ENG-1290: Port discourse node config panel #769's
    reconcileRelationKeys restructuring)

All code was previously reviewed and approved in these PRs.

PR Title
#764 ENG-1280: Port query builder/editor for block props
#765 ENG-1291: Port discourse node specification
#769 ENG-1290: Port discourse node config panel
#793 ENG-1440: Port page groups suggestive mode
#794 ENG-1438: Port keyboard shortcuts
#805 ENG-1328: Port small blueprint misc settings
#804 ENG-1217: Port section component in left sidebar

Testing

Personal Settings

Home

  • Overlay
  • Suggestive mode overlay - works as it was coded but wrong, noted down in ENG-1479: Port suggestive mode settings to dual-read
  • Text selection popup
  • Disable sidebar open
  • Page preview
  • Hide feedback button
  • Auto canvas relations
  • Overlay in canvas
  • Streamline styling
  • Disable product diagnostics
  • Personal node menu trigger (set)
  • Personal node menu trigger (clear)
  • Node search menu trigger
  • Discourse tool shortcut (set)
  • Discourse tool shortcut (clear)

Queries

  • Hide query metadata
  • Default page size
  • Query pages
  • Default filters - have to check with main, clicking on a child removed it. Checked in main same behaviour

Left sidebar

  • Add section
  • Remove section
  • Move section
  • Add child
  • Remove child
  • Move child
  • Edit section title
  • Edit child alias
  • Edit truncate-result

Global Settings

Home

  • Trigger
  • Canvas page format
  • (BETA) Left Sidebar

Export

  • Remove special characters
  • Resolve block references
  • Resolve block embeds
  • Append referenced node
  • Link type
  • Max filename length
  • Frontmatter

Left sidebar

  • Folded
  • Collapsable
  • Add page
  • Move page
  • Remove page

Grammar

Relations

  • Save relation
  • Delete relation
  • Duplicate relation

Nodes

  • Delete node with relations

Nodes > [any node]

General

  • Description
  • Shortcut
  • Tag
  • Format
  • Overlay
  • Graph Overview

Canvas

  • Color (set)
  • Color (unset)
  • Display alias
  • Key image
  • Key image option
  • Query builder alias

Attributes

  • Add attribute
  • Edit attribute value
  • Delete attribute

Index

  • Index init (auto on first visit)
  • Edit index query

Format > Specification

  • Specification enabled
  • Specification enable (query init)
  • Edit specification query
  • Specification disable

Suggestive rules

  • Embedding Block Ref
  • First Child

Admin (Ctrl+Shift+A)

Feature Flags

  • Suggestive mode ON
  • Suggestive mode OFF
  • Reified relation triples

Suggestive mode

  • Include current page relations
  • Include parent and child blocks
  • Add/remove page group
  • Add/remove page in group
Open with Devin

  These PRs were squash-merged into parent branches instead of main
  due to a Graphite stack merge race condition. Their changes never
  landed on main despite showing as merged in Graphite.

  Includes:
  - #764 ENG-1280: Port query builder/editor for block props
  - #765 ENG-1291: Port discourse node specification (dual-write)
  - #769 ENG-1290: Port discourse node config panel
  - #793 ENG-1440: Port page groups settings in suggestive mode
  - #794 ENG-1438: Port keyboard shortcut keys/triggers
  - #805 ENG-1328: Port small blueprint misc settings
@supabase
Copy link

supabase bot commented Feb 24, 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 ↗︎.

@sid597 sid597 requested a review from mdroidian February 24, 2026 13:51
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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 7 additional findings.

Open in Devin Review

Copy link
Contributor

@mdroidian mdroidian left a comment

Choose a reason for hiding this comment

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

Because there were some conflicts, be sure to do a compile, load in roam, and run through a quick test of each changed setting component to make sure the existing functionality still works.

This only needs to be a brief (under 5 min) loom video.

Add that to this PR (as a comment) before merging.

  specification, config panel)

  The initial recovery commit claimed to include these but only
  contained
  Chain 2 (#793, #794, #805, #804). Chain 1 lives on separate
  branches
  that weren't in the merge source.

  Applied using `gh pr diff` for each PR in order (#764#765#769).
  init.ts required manual merge — #765 and #769 both modified it
  from the
  same base. Kept #765's safeParse checks inside #769's
  restructured
  initializeSettingsBlockProps.

  - #764 ENG-1280: Port query builder and editor component for
  block props
  - #765 ENG-1291: Port discourse node specification
  - #769 ENG-1290: Port discourse node config panel
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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 7 additional findings.

Open in Devin Review

@sid597
Copy link
Collaborator Author

sid597 commented Feb 25, 2026

https://www.loom.com/share/06fab631c187408eaa16ce0f18396f65

can't make in under 5 minutes long list

@sid597 sid597 merged commit 4f5eb59 into main Feb 25, 2026
6 of 7 checks passed
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 13 additional findings in Devin Review.

Open in Devin Review


if (changed) {
// eslint-disable-next-line @typescript-eslint/naming-convention
setBlockProps(globalBlockUid, { Relations: reconciledRelations }, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 reconcileRelationKeys overwrites entire Global blockprops with only Relations

When reconcileRelationKeys detects placeholder keys in the Global blockprops that need replacing with real Roam block UIDs, it calls setBlockProps(globalBlockUid, { Relations: reconciledRelations }, false). The setBlockProps utility is a full replacement operation (not a merge), as confirmed by how setBlockPropAtPath in apps/roam/src/components/settings/utils/accessors.ts:193-214 reads existing props, mutates the path, then writes the whole object back via setBlockProps.

Root cause and impact

Because setBlockProps replaces the block's entire props payload, calling it with { Relations: reconciledRelations } erases every other Global setting stored on the same block — including Trigger, Canvas page format, Left sidebar, Export, and Suggestive mode.

This runs inside initializeSettingsBlockProps at startup (apps/roam/src/components/settings/utils/init.ts:96-106), specifically when the Global block exists and has placeholder relation keys (i.e., the first launch after a fresh install with default relations). After that call, only the Relations key survives.

Expected: Only the Relations sub-key should be updated, preserving all sibling keys.
Actual: The entire Global blockprops object is replaced with { Relations: reconciledRelations }, losing all other settings.

Suggested change
setBlockProps(globalBlockUid, { Relations: reconciledRelations }, false);
const existingGlobalProps = (getBlockProps(globalBlockUid) ?? {}) as Record<string, json>;
setBlockProps(globalBlockUid, { ...existingGlobalProps, Relations: reconciledRelations }, false);
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.

2 participants