Repository navigation
fix(canvas): preserve widgets across derived-name collisions - #117132
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 2:39 AM ET / 06:39 UTC. ClawSweeper reviewWhat this changesThis PR adds durable generated-name identity to Canvas board writes so colliding automatic Merge readinessKeep open: current Likely related people: Priority: P1 Review scores
Verification
How this fits togetherCanvas converts an agent flowchart LR
A[Agent show_widget request] --> B[Generated title identity]
B --> C[Gateway board write]
C --> D[Board store resolution]
D --> E[SQLite widget manifest]
E --> F[Resolved dashboard widget]
F --> G[Gateway event and tool reply]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +194, Tests +820, Other +56. Total +1070 across 15 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the storage-owned marker design after exact-head checks pass, retaining the conservative rule that ambiguous pre-marker rows are preserved and only durable generated markers authorize reuse. Do we have a high-confidence way to reproduce the issue? Yes—source provides a high-confidence path: two automatic titles can derive the same short ASCII name, which current main passes unchanged into the name-keyed board write. The linked report and the PR’s Gateway/SQLite proof cover the user-visible overwrite path. Is this the best way to solve the issue? Yes—the board store is the best repair boundary because it owns both the atomic write and persisted widget identity; a suffix-only Canvas change would not protect other generated callers or distinguish historical explicit rows. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 51c41c25c8c3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
174b123 to
f05bd55
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f05bd55 to
08148b5
Compare
|
Exact-head beta.5 upgrade proof for The proof created a fresh SQLite database solely from: It seeded two canonically ordered widgets. The target legacy row had no generated identity marker, name Redacted output: {
"exactHead": "08148b56fbe9056874d5d2b1e3cc58d44d4e088f",
"sourceSchema": {
"tag": "v2026.7.2-beta.5",
"sha256": "75953ef97a738251822fc5aaf283bbe55fbcabe8702ad771892cdafc85d8e6b9",
"userVersionBefore": 16,
"userVersionAfter": 16
},
"before": {
"name": "cafe-menu",
"tabId": "main",
"sizeW": 8,
"sizeH": 6,
"position": 1,
"grantState": "granted",
"targetRowCount": 1,
"hasNameIdentity": false
},
"adopted": {
"resolvedWidgetName": "cafe-menu",
"totalRowCount": 2,
"widget": {
"name": "cafe-menu",
"tabId": "main",
"sizeW": 8,
"sizeH": 6,
"position": 1,
"grantState": "granted",
"revision": 2
}
},
"afterRestart": {
"totalRowCount": 2,
"widget": {
"name": "cafe-menu",
"tabId": "main",
"sizeW": 8,
"sizeH": 6,
"position": 1,
"grantState": "granted",
"revision": 2
}
},
"persisted": {
"targetRowCount": 1,
"nameIdentity": {
"kind": "generated",
"source": "show_widget",
"key": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
}
},
"assertions": {
"exactBetaSchemaStayedAt16": true,
"sameName": true,
"noDuplicateTarget": true,
"layoutPreserved": true,
"grantPreserved": true,
"identityPersisted": true
}
}The committed regression now also includes the anchor widget and asserts the target remains at relative position |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
08148b5 to
bdf5b08
Compare
|
Superseding exact-head beta.5 upgrade proof for Historical beta rows cannot prove whether their names were automatic or explicit, so this head no longer adopts any unmarked row. The proof creates a database solely from: It seeds an unmarked, explicitly named Redacted output: {
"exactHead": "bdf5b08ba5d21ac37bc1f6af8d493492f7365909",
"sourceSchema": {
"tag": "v2026.7.2-beta.5",
"sha256": "75953ef97a738251822fc5aaf283bbe55fbcabe8702ad771892cdafc85d8e6b9",
"userVersionBefore": 16,
"userVersionAfter": 16
},
"before": {
"name": "cafe-menu",
"tabId": "main",
"sizeW": 8,
"sizeH": 6,
"position": 1,
"grantState": "granted",
"hasNameIdentity": false
},
"firstGeneratedWrite": {
"resolvedWidgetName": "cafe-menu-eeeeeeee",
"widgetCount": 3
},
"afterRestart": {
"secondResolvedWidgetName": "cafe-menu-eeeeeeee",
"legacyWidget": {
"name": "cafe-menu",
"sizeW": 8,
"sizeH": 6,
"position": 1,
"grantState": "granted",
"revision": 1
},
"generatedWidget": {
"name": "cafe-menu-eeeeeeee",
"revision": 2
}
},
"persisted": {
"counts": {
"total": 3,
"legacyCount": 1,
"generatedCount": 1
},
"legacy": {
"name": "cafe-menu",
"sizeW": 8,
"sizeH": 6,
"position": 1,
"grantState": "granted",
"revision": 1,
"hasNameIdentity": false
},
"generated": {
"name": "cafe-menu-eeeeeeee",
"revision": 2,
"nameIdentity": {
"kind": "generated",
"source": "show_widget",
"key": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
}
}
},
"assertions": {
"exactBetaSchemaStayedAt16": true,
"ambiguousLegacyPreserved": true,
"legacyLayoutPreserved": true,
"legacyGrantPreserved": true,
"deterministicFallbackAllocated": true,
"generatedFallbackReusedAfterRestart": true,
"noOverwriteOrDuplicate": true,
"identityPersisted": true
}
}The committed regression covers this same pre-marker explicit-name case and verifies the original row remains unchanged while the marked fallback is reused after restart. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Final maintainer landing gate for exact head
Landing via squash with contributor authorship preserved. |
* origin/main: (41 commits) test(ci): update memory helper routing expectation (#117295) fix(canvas): emit successful control results in JSON mode (#117297) fix(imessage): settle native inbound reply delivery (#117282) fix(agents): reject invalid UTF-8 LSP responses (#117271) fix(line): centralize card and template message alt text (#117280) fix(release): validate candidates before Docker publication (#117252) fix(media): validate provider-owned generated media downloads (#117281) fix(feishu): restore custom HTTPS API domains (#117278) fix(models): reuse prepared plugin metadata (#117131) fix(agents): stop fallback after delivered-but-failed attempts (#114628) fix(memory): reuse targeted session corpus snapshot (#117247) fix(matrix): reconcile durable sends after response loss test(release): repair full validation regressions (#116931) fix(linux-canvas): report socket watcher fallback (#109502) fix(codex): preserve authoritative turn completion (#117185) fix(canvas): preserve widgets across derived-name collisions (#117132) fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (#117206) fix(msteams): prevent duplicate final replies (#116398) fix(doctor): session SQLite restore installs an empty session index over the valid archive (#117221) fix(plugins): preserve workspace plugins across CLI and control UI (#117265) ...
* origin/main: (41 commits) test(ci): update memory helper routing expectation (openclaw#117295) fix(canvas): emit successful control results in JSON mode (openclaw#117297) fix(imessage): settle native inbound reply delivery (openclaw#117282) fix(agents): reject invalid UTF-8 LSP responses (openclaw#117271) fix(line): centralize card and template message alt text (openclaw#117280) fix(release): validate candidates before Docker publication (openclaw#117252) fix(media): validate provider-owned generated media downloads (openclaw#117281) fix(feishu): restore custom HTTPS API domains (openclaw#117278) fix(models): reuse prepared plugin metadata (openclaw#117131) fix(agents): stop fallback after delivered-but-failed attempts (openclaw#114628) fix(memory): reuse targeted session corpus snapshot (openclaw#117247) fix(matrix): reconcile durable sends after response loss test(release): repair full validation regressions (openclaw#116931) fix(linux-canvas): report socket watcher fallback (openclaw#109502) fix(codex): preserve authoritative turn completion (openclaw#117185) fix(canvas): preserve widgets across derived-name collisions (openclaw#117132) fix(channels): config validation rejects documented channels.<id>.configWrites on 13 channels (openclaw#117206) fix(msteams): prevent duplicate final replies (openclaw#116398) fix(doctor): session SQLite restore installs an empty session index over the valid archive (openclaw#117221) fix(plugins): preserve workspace plugins across CLI and control UI (openclaw#117265) ...
Fixes #116945
What Problem This Solves
Fixes an issue where pinning distinct dashboard widgets could silently replace an existing widget when their titles reduced to the same short ASCII name.
This also preserves widgets created by earlier 2026.7.2 beta builds. Because historical rows do not record whether their names were automatic or explicit, generated pins never overwrite or reclassify an unmarked row.
Why This Change Was Made
Derived widget names are many-to-one, but the board store upserts by name. The canonical repair therefore lives at the storage owner:
show_widgetsends a full normalized-title identity plus a deterministic fallback name.No SQLite schema-version bump is required. The current schema stays at version 16; identity metadata uses the existing widget manifest.
User Impact
Distinct pinned widgets no longer overwrite each other merely because their titles share an ASCII slug. Existing beta.5 widgets retain their stable names, layout, grants, and content.
The resolution is deterministic across Unicode normalization variants, long titles, concurrent requests, and Gateway restarts. Unmarked historical rows are preserved, while newly generated widgets use and persist their fallback identity.
Evidence
v2026.7.2-beta.5schema-16 SQLite upgrade proof: a database created solely from the tagged schema preserves an unmarked explicit row's name, content, relative position, dimensions, and granted capability; allocates the deterministic generated fallback; and reuses that marked fallback after restart without a schema bump or duplicate. Inspectable output: fix(canvas): preserve widgets across derived-name collisions #117132 (comment)tsgo:core,tsgo:core:test, core lint, Kysely guardrails, and SQLite transaction-boundary checks passed on Blacksmith Testbox. Its delegated sync omitted the tracked generated Swift file beforeprotocol:check; exact-head GitHub CI is the authoritative remote generator proof.git diff --checkare clean.Production delta: +289/-39. The added production surface is the additive protocol metadata/result, canonical store-owned resolver, and durable manifest codec. Tests are +820/-0.