Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(home): stop the floorplan conflict panel losing the document that won

nirholas9d5c14a21275
diff --git a/src/home/api.js b/src/home/api.js
index c1447fc49..b20550784 100644
--- a/src/home/api.js
+++ b/src/home/api.js
@@ -11,12 +11,23 @@
*/
export class HomeApiError extends Error {
- constructor(code, message, { status = 0, pending = null } = {}) {
+ constructor(code, message, { status = 0, pending = null, current = null, field = null } = {}) {
super(message);
this.name = 'HomeApiError';
this.code = code;
this.status = status;
this.pending = pending;
+ // `current` and `field` were passed by every caller below and destructured
+ // by none of them, so they arrived and were dropped. That is invisible
+ // until something reads them: the floorplan's 409 handler stores
+ // `err.current` as the document that won, and with it undefined the
+ // conflict panel offered "Take theirs" as a button that returned early
+ // and did nothing, above a sentence reading "They saved version ?". The
+ // one way out of a conflict was to overwrite the other person, which is
+ // the exact outcome the panel exists to prevent. `field` is the same
+ // story for a rejected layout: it says WHICH value the server refused.
+ this.current = current;
+ this.field = field;
}
}