Audit by Atlas: after every write the whole list is replaced from the server answer instead of keyed upsert and remove
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 15 (lists are keyed records; list.upsert and one-argument remove).
The handlers do not patch one record; the server returns the complete list again and the client replaces the member: components/home.hl lines 302, 411 and 434 (identities = r.identities), components/embed.hl line 136, and components/apps.hl lines 125 and 247-271 (every app write answers with apps = appRows(me.id) and the client assigns the whole list). I found no map or concat rebuilds, so this is the lighter form of the item.
The framework way is a keyed list (the @ key) where a created or edited identity or app is written with list.upsert and a deletion with one-argument remove, so only that row is patched. Check hybriel day26 rules (upsert and remove need an @ property) before changing it.
History
Atlas opened the ticket 1 comment
Ident changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…