fix(ui/tasks): keep unchanged rows across live reloads #1800

Merged
sam merged 1 commits from fix/1798-task-list-stable-rows into main 2026-11-08 03:45:14 +00:00
Owner

Part of #1798. This does fixes 2 and 5 and part of 1. It doesn't close the issue.

  • tasks is now a shallowRef. A reload merges rows by id: a row whose JSON didn't change keeps its object, so the props of TaskRowActions, Timestamp and the other row children stay identical and Vue skips them. If nothing changed at all, the previous array is kept, so visible, showRepo, showIssue and the table don't recompute or re-render.
  • The search needle is computed once per recompute instead of once per row. With no search, the rows pass straight through.

Corrections to the issue after reading the code:

  • useLiveResource uses a trailing debounce (setTimeout reset on each revision). So it isn't a reload every 500 ms; a continuous storm delays the reload instead.
  • DataTable isn't virtualised. It renders every row (v-for over sorted).

Still open in #1798: virtualising DataTable, mounting TaskRowActions lazily, and patching single rows from live events. The last one needs the event to carry the task ids. Most of the storm should go away with #1799 (#1797).

task check passed. No test was added: this isn't a seam the test policy covers.

Part of #1798. This does fixes 2 and 5 and part of 1. It doesn't close the issue. - `tasks` is now a `shallowRef`. A reload merges rows by id: a row whose JSON didn't change keeps its object, so the props of `TaskRowActions`, `Timestamp` and the other row children stay identical and Vue skips them. If nothing changed at all, the previous array is kept, so `visible`, `showRepo`, `showIssue` and the table don't recompute or re-render. - The search needle is computed once per recompute instead of once per row. With no search, the rows pass straight through. Corrections to the issue after reading the code: - `useLiveResource` uses a trailing debounce (`setTimeout` reset on each revision). So it isn't a reload every 500 ms; a continuous storm delays the reload instead. - `DataTable` isn't virtualised. It renders every row (`v-for` over `sorted`). Still open in #1798: virtualising `DataTable`, mounting `TaskRowActions` lazily, and patching single rows from live events. The last one needs the event to carry the task ids. Most of the storm should go away with #1799 (#1797). `task check` passed. No test was added: this isn't a seam the test policy covers.
sam added 1 commit 2026-11-08 03:32:20 +00:00
fix(ui/tasks): keep unchanged rows across live reloads (#1798)
Quality / check (pull_request) Successful in 6m36s
00e7603932
sam merged commit a9878c329d into main 2026-11-08 03:45:14 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1800