gitoria
All repositories: gitoria
3.0 KB
# W30 — keyed list writes (gitoria#30)Task line (ticket title, Atlas audit 2026-10-26): "Lists are rebuilt by hand in handlers instead of keyed records with upsert and remove".Ticket: https://tickets.worldapi.org/gitoria.worldapi.org/30 (read it: call sites components/list.hl ~87-89 repoCreated/repos, components/tickets.hl ~100-102 addTicket/tickets keyed by number, components/sshkeys.hl ~70-72 and ~83-85 keyItems add/remove, components/tokens.hl ~69-71 and ~85-87 tokens add/remove). Was blocked because upsert appends while these lists show newest first (repro tests/fixtures/upsert-order.hl); Hybriel day52 (now vendored, hybriel#331) settles it.Read first, fully: /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md; /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md; /media/STORAGE/projects/hybriel/docs/CODE-ORDER.md; COMPONENTS.md section "List rendering" (the rowKey paragraph, changed by #331: "Rows are keyed by the entry's `id`, then `@id` … To insert between existing keyed rows, assign the list member a whole list in the desired order; existing rows retain their nodes. `upsert(record)` replaces a matching record in place and appends a new one; it does not choose a sorted insertion position."); SPEC.md "Looking records up by the `@` property: `upsert` and `remove`" (~line 1977, day26 rule: upsert / one-argument remove need an @ property). Copy a working shape from the docs; a gap → DOCS line in the report.## The documented shape to apply (Gitoria's reading of the docs; verify it)- Replace an existing row: `list.upsert(row)` (row carries its @ key).- Remove: one-argument `list.remove(id)`.- Add a NEW row at the top (newest first): one whole-list assignment in the desired order (new row first, then the existing rows); keyed rows keep their nodes. No hand-written filter loop that copies every row.- Each row type gets its @ key where it has none (repos @id, tickets keyed by number, ssh keys, tokens): check that server data and stored rows really carry that field; what identifies an item is its id, never a position.## Work (git worktree `../gitoria-W30`, branch w30 from main; copy main's bin/ folder (day52, not in git) into the worktree; never edit LOG.md/STATUS.md)1. Change the call sites above. No hand-written JS, no workaround at a framework gap (minimal repro in .scratch/ and stop). theme/ untouched.2. Prove in tests/browser.mjs (extend it): for each list, a new row appears at the top, existing row DOM nodes are retained (same node before/after, like hybriel's #9331 check), a replace keeps one row, a remove takes exactly that row; a second visit (reload) shows the same order.3. Gates (LC_ALL=C, ports 8720-8739 only, `ss -ltn` first; port 8700 is taken: use GITORIA_GATE_* variables as V52/R52 did): `node theme/check-theme.mjs .`, `node tests/browser.mjs`, every gate in deploy.sh's GATES list, all 0 failed.4. Commit on branch w30 (subject without "#N"). Do NOT merge, push or deploy.## Reportreports/W30-REPORT.md (≤25 lines): per call site old → new shape, the @ keys added, test checks added, gate numbers, DOCS lines, risks. Then stop. Budget ~60 requests.
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- ce08920dMerge branch 'w52c-header-phone' into mainGitoria
- 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
- e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
- c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
- 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
- 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
- 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
- 155861f6Merge branch 'w52-person-approval' into mainGitoria
- b5435de8|||PR person approvals: second Kunibert round (#52)mre
- 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre
- 2a89d8d0|||PR person approvals: Approve button for people; merge needs the required checks or a listed person's approval (#52)mre
- 83f0c953Report person approval verificationmre
- 3ae94b86Record browser failures and verify owned tab cleanupmre
- 54eec687Gate person approvals and merge alternativesmre
- 12b08829Add person approvals for pull request headsmre
- 55c84779Merge branch 'gp-gate-ports' into mainGitoria
- 57af42bbREADME: point to deploy.sh for the port listmre
- d63375d2README: gate commands with explicit portsmre
- feeaa701|||PR gates: explicit ports only, deploy.sh passes themmre
- 6cc1f943Merge branch 'records-1112' into mainGitoria