gitoria
All repositories: gitoria
3.4 KB
# W30 report: keyed list writes (gitoria#30). Branch w30, worktree ../gitoria-W30, not merged/pushed/deployedCall sites (old: build `next=[row]`, copy every other row in a loop, assign; remove: the same loop with a filter):- components/list.hl repoCreated (repos), tickets.hl addTicket (tickets), sshkeys.hl makeKey/removeKey, tokens.hl makeToken/removeToken. All now: add = `list.remove(row.@id)` then `list = [row, for (x of list) { x }]` (one whole-list assignment, new row first, the language's own `for` entry, no hand loop); remove = one-argument `list.remove(id)`. Copied from SPEC "upsert and remove", COMPONENTS "List rendering", SPEC "`if`/`for` entries" (verified in a scratch file first).- I did not use `upsert` for the add: it appends, the lists are newest first. A row delivered twice (push and ack) is removed and put on top again, so it stays one row.@ keys added: ssh key rows and token rows `id` became `@id` (UI-only rows; views read `k.@id`/`t.@id`); ticket rows get `@id = number` (number stays; they had no id, so rows were keyed by index); repo rows get `@id` next to `id` (rowOf in lib/repos-helpers.hl). Server data and stored rows really carry the field (ids come from the tables, number from tickets).Tests (tests/browser.mjs, 269 -> 293 checks): per list: new row on top, earlier rows are the same DOM nodes (kept/keep helpers), delivered-twice row is one row, reload gives the same order; tokens and keys also: remove one middle row takes exactly it, the survivors are the same nodes, reload; keys: empty note returns. The keys section needs the sshd secret, so the gate server is restarted with GITORIA_SSH_SECRET before the block. Counts that the new repo "delta" and ticket #3 change were adjusted (4 repos, 3 tickets).Old-code proof: with lib/ and components/ stashed only "tickets keep their DOM nodes" fails (1 failed); the other new checks pass on old code too, because repos/keys/tokens rows already had `id` and were keyed by it. They guard the new shape, they do not fail on the old one.Gates (LC_ALL=C, ports 8720-8739, HL_PORT_BASE=8520, GITORIA_* vars): check-theme 86 files 0 problems; browser 293/0; create-api 47; signin-return 3; security 82; private 158; ident-access 30; apps 95; pull-numbers 48; pull-ssh 20; app-token 42; reviews 98; events 52; pr-page 61; status 61; limits 53; status-keyed 13; member-merge 82. All 0 failed. (First run had 2 failures in my own count of tickets in two face checks, fixed in the test.)DOCS: used HL-PRIMER, CODE-ORDER, COMPONENTS "List rendering", SPEC upsert/remove and if/for entries. Gap: no doc line names the one-expression way to put a row first in front of the old list; I found `[row, for (x of list) { x }]` from the hybrid-literal section. A one-line example in COMPONENTS List rendering would help. No framework gap, no workaround, no .scratch repro.Risks: /api/repos and /api/repos/<slug> JSON now also contain an `@id` field next to `id` (the browser gate and API gates pass, but it is visible to API clients). createOrgIt's orgs list (list.hl) still has the hand-written loop (not in the ticket's call sites; orgs have no id). Tickets have no remove UI, so no remove check there. Not tried in his Chrome on lisbeth (headless gate only); no screenshots, no visual change.Cleanup: all servers/Chromes started by the gates have exited; no listeners in 8720-8739 and no chrome of mine left. Files outside the repo: logs in /media/STORAGE/claude-scratch/atlas/W30/. Requests: about 35.
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
- e9f950a8reports: G25c soakmre
- a7783686log: deploy 9f41ffcmre
- 9f41ffc1log: W30b mergedmre
- bef635c1Merge branch 'w30b'mre
- 15b996a5Org list: keyed rows by @id, newest first, concat instead of hand loopmre
- c4f6d9e3reports: G25c growth huntmre
- b88e39f1log: privacy cleanup donemre
- bfd7826ddocs: neutral example organisation namemre
- 01b71c2edocs: neutral wording in missions, reports and logmre
- 3eeea733log: 2026-11-09 PR flow plan and membersmre
- e7c2ff1fdocs: neutral name for the apps-api reviewmre
- 120b7abdlog: step 3 queuedmre
- 358474bflog: P50 livemre
- 477d7bdcMerge branch 'p50'mre
- 00efc06fP50 reportmre
- e3f85afblog: commit mention slipmre
- 4d1a4cf4log: #25 numbersmre
- 1af0a60ddocs: H25 run() correctionmre
- eefa2dbcRepo setting: refuse direct pushes to the main branch (pre-receive over HTTPS and ssh)mre
- 8c8ba2f1log: PR flow announcedmre