{ "argumentSchema": { "additionalProperties": false, "properties": {}, "type": "object" }, "pattern": "gideon-tests/late-subscriber-repro.tsx", "resultSchema": { "description": "Reproduction case for late subscriber initial value bug.\n\nBug: When multiple CellHandle instances subscribe to the same cell with the\nsame schema key, late subscribers would miss the initial value. This happened\nbecause the subscription was already established, so no new backend request\nwas made, and the late subscriber's CellHandle never received the cached value.\n\nExample: cf-input binds to a cell with stringSchema, creating a new CellHandle.\nText interpolation {value} also subscribes to the same cell with the same schema.\nOn initial page load, the text interpolation would show blank because it subscribed\nafter the initial value was already sent to the first subscriber.\n\nFix: In connection.subscribe(), when adding a CellHandle to an existing\nsubscription, copy the cached value from an existing subscriber to the new one.\n\nTo test:\n1. Deploy this pattern with `piece new`\n2. On initial page load, all \"Interpolated\" values should show their initial values\n3. Interacting with any component should update its interpolated value", "properties": { "$NAME": { "type": "string" }, "checkboxValue": { "type": "boolean" }, "textValue": { "type": "string" }, "textareaValue": { "type": "string" } }, "required": [ "textValue", "textareaValue", "checkboxValue", "$NAME" ], "type": "object" } }