You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A thread on a keyed datum falls out of its row whenever the source is replaced #1146
A widget renders rows from a bound data source with projectData(root, records, keyOf, render, { snapshot }), keyed by a stable row id. A comment thread anchored on one row stays exact only within the source revision that row was projected from. Replacing the source value marks the thread outdated and drops it out of the row, back to the section. This happens even when the row keeps its key and only its other fields change.
Expected: a thread on a keyed datum stays exact while the key survives the replacement. The package reference asks that keys "remain with the same logical datum across refreshes", so the key already names the datum across revisions.
Repro
Declare a contract with records: { items: "rows", key: "id" } over { rows: [{ id, label, updated }] }, and bind a widget to it that projects rows keyed by id, passing the watchData delivery as snapshot.
Serve the page and comment on row a.
Run leaf data set with a value in which row a differs only in updated.
The thread is now outdated and no longer shows in row a.
Workaround in use: a second source that carries only the ids and changes only when a row joins or leaves. The widget projects from that source and paints from the full one. This keeps threads in place, but every widget over live data then needs two sources and two contracts, and the producer has to publish both.
Ask: let an anchor on a keyed datum follow its key across revisions of the source, perhaps for contracts that declare records.key, rather than pinning it to the revision it was made against.
This is a real gap between the keyed-record contract and thread placement. The package contract asks projectData keys to stay with the same logical datum, but also specifies that a comment on a bound source becomes outdated at the next source revision. Anchor resolution applies that revision check before resolving the surviving key; the existing browser test asserts the resulting outdated state.
The useful change is to let a declared records.key establish continuity for a row anchor when that key is still present, while keeping revision-scoped behavior for data without that declaration. The projection key is currently supplied by package code, so the implementation also needs to establish that it is the contract's row key before treating the two as the same identity. This issue tracks that product-level change; I have not opened a fix PR from triage.
Activity
leaf-agent commentedon Sep 25, 2026
This is a real gap between the keyed-record contract and thread placement. The package contract asks
projectDatakeys to stay with the same logical datum, but also specifies that a comment on a bound source becomes outdated at the next source revision. Anchor resolution applies that revision check before resolving the surviving key; the existing browser test asserts the resulting outdated state.The useful change is to let a declared
records.keyestablish continuity for a row anchor when that key is still present, while keeping revision-scoped behavior for data without that declaration. The projection key is currently supplied by package code, so the implementation also needs to establish that it is the contract's row key before treating the two as the same identity. This issue tracks that product-level change; I have not opened a fix PR from triage.Give projected data explicit subject identity (#1184)