ReviewOS

also looking at this

stacks/stx

fix(native): preserve authored keys in mutation nodes

#2084
Closed chris wants to merge codex/native-mutation-authored-keys into main
3 files +77 -3
packages/stx/src/native/bridge/protocol.tsmodified+3-1
Changes to packages/stx/src/native/bridge/protocol.ts
@@ -112,6 +112,8 @@ export interface RenderPayload {
112112
113113export interface NativeMutationNode {
114114 type: string
115 /** Authored reconciliation identity, retained across native mutations. */
116 key?: string
115117 props?: Record<string, unknown>
116118 style?: Partial<import('../compiler/ir').STXStyle>
117119 events?: Record<string, string>
@@ -121,7 +123,7 @@ export interface NativeMutationNode {
121123
122124export type NativeMutationOperation
123125 = | { op: 'createNode', id: string, node: NativeMutationNode, root?: boolean }
124 | { op: 'updateNode', id: string, patch: Omit<NativeMutationNode, 'type'> }
126 | { op: 'updateNode', id: string, patch: Omit<NativeMutationNode, 'type' | 'key'> }
125127 | { op: 'insertChild', parentId: string, childId: string, index: number }
126128 | { op: 'moveChild', parentId: string, childId: string, index: number }
127129 | { op: 'removeNode', id: string }