Skip to content

Add missing Client/core/common/AMCListDeltaSync.js - #88

Closed
krixkrix wants to merge 1 commit into
alexanderoster:developfrom
krixkrix:fix/add-missing-amclistdeltasync
Closed

krixkrix wants to merge 1 commit into
alexanderoster:developfrom
krixkrix:fix/add-missing-amclistdeltasync

Conversation

@krixkrix

Copy link
Copy Markdown

Summary

e32f2c1 made three client modules import a file that was never committed, so neither the vue2 nor the svelte client builds from a clean checkout. This adds it.

 Client/core/
 ├── common/
+│   └── AMCListDeltaSync.js   # full fetch, then ?since=<head> deltas
 └── modules/
     ├── AMCModule_AlertList.js       # import ../common/AMCListDeltaSync.js
     ├── AMCModule_BuildList.js       # import ../common/AMCListDeltaSync.js
     └── AMCModule_ExecutionList.js   # import ../common/AMCListDeltaSync.js

The API comes from how these three modules call it. The behaviour follows the server's list delta protocol (7fb0f11): one request at a time, and a full resync when the head goes backwards.

Blast Radius: client-only
It changes only the alert, build and execution lists, which can't be built today anyway.

e32f2c1 "Implemented Incremental List updates client side" made
AMCModule_{AlertList,BuildList,ExecutionList}.js import
../common/AMCListDeltaSync.js, but the file was never committed, so
neither the vue2 nor the svelte client builds from a clean checkout.

This implements it from how the three modules use it and from the
server side of the list delta protocol (7fb0f11):

- notifyHeadID() is fed the *listheadid attribute; the first call
  fetches the full list, later ones fetch "?since=<last applied head>".
- Delta rows are upserted by key, removedKeys dropped, entries re-sorted
  in place (the UI holds a reference to the array).
- One request at a time; notifications during a request coalesce into
  one follow-up; a failed request is retried on the next notification.
- A head that goes backwards (e.g. the alert journal after a server
  restart) triggers a full resync.
@alexanderoster

Copy link
Copy Markdown
Owner

Apologies, I added the original file.

@krixkrix
krixkrix deleted the fix/add-missing-amclistdeltasync branch October 23, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants