gitoria
All repositories: gitoria
6.3 KB
# G2 — gitoria#22: repo tabs as ONE persistent repo layout (hl:web D-CHAIN)Branch `g2-repotabs` (from main 4065841, Hybriel 5406d146 vendored). Not merged, pushed or deployed.## Approach* hl:web chain: a page declares `parent './x.hl'`, the parent has a `slot` and itself `parent './main.hl'` (docs: hybriel/COMPONENTS.md "Wrapping", hybriel/projects/chain-lab/views/repo.hl + README). No hl:web gap found, no JS written.* NEW `components/repo.hl` = the repo level: shell (main.hl) → **repo.hl** → page. It holds repo head (name, description, "All repositories"), the tab nav and the `slot`. The active tab comes from `route = null` (the standing level is given the new route on each navigation) via `tabOfPath(route.path)` (lib/repos-helpers.hl); links carry `aria-current="page"` (null renders `aria-current=""` — known Hybriel gap from 4fda244, CSS matches `[aria-current=page]`). Style (styles.hl): bold, strong colour, 2 px accent underline; tabs wrap on a phone, 44 px high.* Missing repo: only "No such repository" + link, no slot → the page isn't even constructed. Main address (no slug): the level shows no head, just the slot (index.hl is `parent './repo.hl'` too, so Readme `/` is in the SAME chain as code/pulls…).* All 8 pages (index→readme, code, branch, commit, pulls, releases, tickets, settings): `parent './repo.hl'`, `RepoHead` gone (repohead.hl deleted). "Add code" → `components/addcode.hl`, used by code/branch/commit only, inside the page (so it is read fresh on each navigation; the standing level isn't re-constructed). `loginfailed.hl` keeps `main.hl` (another chain = full load, by design).* Not needed: batch 11 / #209 (host/slug is fixed per repo address; only `route` changes and that repaints in place).* Caveat: a navigation between repo addresses (other host) or to the main address list is a different origin = full load anyway.## Commits (branch g2-repotabs)1. 19bc1df repo.hl + addcode.hl, pages re-parented, styles, README, gate checks, tests/chain.mjs2. 9b0516f tab underline marked `// functional` (check-theme), chain.mjs serve/measure split + bringToFront for lisbeth## (1) Nodes removed/added per click — real Chrome, real clicks, MutationObserver element counts, tagged node objects (tests/chain.mjs, headless, alpha repo; desktop 1280 and phone 390 give identical numbers)| click | old removed/added | old head+nav+repo-page same node? | new removed/added | new head+nav+links same node? ||---|---|---|---|---|| Readme→Code | 34 / 59 | NO (all replaced) | 22 / 47 | YES (shell, repo-page, repo-head, name, nav, link, header) || Code→Pulls | 59 / 31 | NO | 47 / 19 | YES || Pulls→Readme | 31 / 34 | NO | 19 / 22 | YES || Readme→Code (2nd) | 34 / 59 | NO | 22 / 47 | YES |New replaces only the page in the slot. Aria-current follows each click (new), none marked (old). Same numbers in lisbeth's Chrome (E2E below). JSON: shots/chain-{old,new,lisbeth-old,lisbeth-new}.json.## (2) Readme tab click with a 2 003-line README (longdoc), click → README text painted, 3 runs| | old | new ||---|---|---|| headless desktop (ms) | 1665 / 1298 / 1647 | 1881 / 1778 / 1930 || headless phone390 | 1437 / 1797 / 1463 | 1690 / 1550 / 1584 || lisbeth desktop | 3147 / 2230 / 2030 | 2945 / 2261 / 1996 || lisbeth phone390 | 2115 / 1996 / 2260 | 2395 / 2062 / 1930 |Honest result: **no speed-up**. Both add ≈ 2 600 elements (the Markdown rendering is the cost; long tasks ≈ 250–470 ms); new is within noise (headless slightly slower, lisbeth equal). The chain keeps head/nav, it does not make a long README cheaper; #180/#181 are in both (both trees vendor 5406d146). Further speed needs the README render itself (virtualising/chunking the Markdown blocks) — not part of this ticket.## (3) Gates (deploy.sh GATES + push/ssh), ports 8700–8729| gate | old (main) | new ||---|---|---|| check-theme | 0 problems (before my change) | 48 files, 0 problems (the underline lines are marked `// functional`; first try had 2 problems — caught) || browser.mjs | 225 / 0 | **232 / 0** (7 new checks, final commit) || push.mjs | 46 / 0 (README) | 46 / 0 || ssh.mjs | 44 / 0 (README) | 44 / 0 |New checks (3 re-used from 4fda244: active tab + different style on all 9 views, tab hrefs, unknown repo shows only the message; 4 chain checks: same node objects after Readme→Code→Pulls→Releases→Tickets→Readme→Code, zero child mutations inside repo-head while slot parent mutates, Back button returns inside the chain with Readme marked, Code→commit page keeps head+nav). **The new browser.mjs against OLD code: 226 passed / 6 failed** (aria-current, missing-repo, 4 chain checks). Reruns: the first new-code run had 2 failures (my gate's `__navMarker` lost on my reload — gate bug fixed; and one phone 390 hydrate timeout of the missing-repo page that did not recur — 232/0 on two later runs).## (4) lisbeth E2E (lock rules; apps + tunnels outside the lock; old = main on :8725, new on :8726 via `ssh -R`; ONE existing tab reused, bringToFront, emulation cleared after)Clicks Readme→Code→Pulls→Readme→Code at 1280 and 390 px (real mouse events). Screenshots (I looked at them): shots/chain-lisbeth-{old,new}-{desktop,phone390}-{0-readme,1-code,2-pulls,3-readme,4-code}.png.* Saw (new, phone390 Pulls): header, "alpha", description, tabs wrapped over 2 rows, "Pull requests" bold white with accent underline + raised background, rest normal; list below; no overflow (scrollWidth ≤ 390), tab sizes ≥ 44 px high (Readme 84×44, Code 61×44, Pull requests 120×44, Releases 89×44, Tickets 76×44, Settings 85×44).* Saw (old, phone390 Pulls): active tab only blue text on grey (no bold, no underline).* Saw (new, desktop Code): one row of tabs, "Code" bold with underline, code browser + sidebar.Headless shots of the same: shots/chain-{old,new}-*.png.## IncidentWhile clearing a stale server port I ran `kill 2889158`, which was ANOTHER worker's (Anton's `anton/srss426/tree2`) hybriel process, not mine (my pid file had been overwritten by a second start). It was killed with SIGTERM; please tell Anton. Afterwards I killed only processes I verified by cwd; nothing of mine runs now.## Filescomponents/repo.hl (new), addcode.hl (new), repohead.hl (deleted), pages, styles.hl, lib/repos-helpers.hl (tabOfPath), README, tests/browser.mjs (+7 checks), tests/chain.mjs (measurement/E2E tool: `CHAIN_LABEL= CHAIN_APP= [CHAIN_SERVE=1|CHAIN_MEASURE=1 CHAIN_CDP=…]`).
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
- 00517fafgitoria: shell 404 page for unknown paths (catch-all route, status 404, JSON 404 under /api), 390 gate checksMG
- d9e977f0reports/MG-mobile.md, LOGMG
- 2f2725actests/browser.mjs: commit-row check (one row, centred date)MG
- 4df1ea01tests/browser.mjs: MG phone checks (list first, no dead strip, one branch heading, tab grid, commit rows, PR title row, ticket columns, wrapping commands)MG
- c52424e9gitoria mobile: repo list before the forms, 3x2 tab grid, no duplicate branch heading, ordered commit rows, aligned ticket rows, pull title on its own row, wrapping clone commands, no dead strip under formsMG
- 3a95252dG3: cache parsed README blocks by sha256 of the text (bounded LRU), reportmre
- 570138cddeploy: security gate (tests/security.mjs)mre
- da6b20fcgitoria SG: security audit fixes (uploadMax 0, Secure cookie on https, session rotation at login, nosniff on function routes, no identity in page data) + tests/security.mjs gate + reportmre
- f98c981fgitoria B1: report wordingmre
- c6364cedgitoria B1: compact Markdown blocks (one kind flag per block/span, empty and false fields omitted); same rendered HTML, page values -67%mre
- cd99d2feWIP gitoria#22: always render the repo level's slot (missing-repo boot hang), pages render nothing without a repo; hydration diagnosis in reports/G2-hydrate.mdmre
- e5404b9breport: commit idsmre
- 63cfa21ereports/G2-repotabs.mdmre
- 9b0516fdgitoria#22: mark the tab underline functional (check-theme), chain E2E: serve/measure split, bring the lisbeth tab to frontmre
- 19bc1df8gitoria#22: all repo pages under ONE layout level (components/repo.hl, hl:web D-CHAIN): a tab click replaces only the page in the slot; head and tab nav stay the same DOM nodesmre
- 40658417tests/browser.mjs: wait for the page to be live (hydrated) before clicking Merge — a click on the server-rendered button before the client mounted was lost (flaky 'Clashing change' under load)mre
- 48a6154bre-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- e972e8d7tests: short-id-switch (GITORIA_SWITCH_IDENT_PORT/_PORT) and ssh tunnel (GITORIA_GATE_TUNNEL_PORT) ports from env, defaults unchangedmre
- f06f5349re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- c7d3cc87docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre