gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainfe209ffeMerge branch 'w56-owner-members' into mainGitoriamain/missions/W30-keyed-lists.md

3.0 KB

  1. # W30 — keyed list writes (gitoria#30)
  2. Task line (ticket title, Atlas audit 2026-10-26): "Lists are rebuilt by hand in handlers instead of keyed records with upsert and remove".
  3. 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.
  4. 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.
  5. ## The documented shape to apply (Gitoria's reading of the docs; verify it)
  6. - Replace an existing row: `list.upsert(row)` (row carries its @ key).
  7. - Remove: one-argument `list.remove(id)`.
  8. - 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.
  9. - 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.
  10. ## 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)
  11. 1. Change the call sites above. No hand-written JS, no workaround at a framework gap (minimal repro in .scratch/ and stop). theme/ untouched.
  12. 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.
  13. 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.
  14. 4. Commit on branch w30 (subject without "#N"). Do NOT merge, push or deploy.
  15. ## Report
  16. reports/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

Latest commits

  • fe209ffeMerge branch 'w56-owner-members' into mainGitoria
  • fa0754c8|||PR repository owner transfer and members API (#55)mre
  • 8862e537Merge branch 'w55-rename-org' into mainGitoria
  • 014d2b7fOne immutable readers snapshot per move for the left-organization event (#53)mre
  • 1859d506Decide who hears a repo left its organization by its readers before the move (#53)mre
  • 499f25f2Review fixes for the Settings organization move (#53)mre
  • ed3b922b|||PR move a repository into an organization in Settings (#53)mre
  • 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
  • 9f7ce8d8Preserve rename compatibility and live page titlesmre
  • c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
  • 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