gitoria
All repositories: gitoria
6.4 KB
# G23 — gitoria#23 reopened: the sidebar ("only one item Repositories that leads to a 404")## Step 1 — findings (written before any fix)His words: "In the sidebar is only one item “Repositories” that leads to a 404". Atlas's reading (the ☰ panel with one entry) is right: it is `#sidebar`, and the one entry is "Repositories".**The 404 is reproduced, locally and on live (signed out).** It happens only after the page has changed IN PLACE in the browser, which is what happens when you tap a tab of a repo (Readme, Code, Pull requests, …) or open a folder or file. A fresh page load is fine, which is why the earlier gates and the curl checks saw nothing.What I did (about 20 requests): gitoria main (90b4f72) on port 8740 with a copy of the newest backup (gitoria.worldapi.org-20261026-0416) and an az5b2 session in the copy; headless Chrome, 390 px with touch and 1280 px; real clicks; scripts in G23/repro/.| Case | Result ||---|---|| ☰ then Repositories on a freshly loaded page: home, repo readme, code, file, pulls, tickets; 390 and 1280; signed out and signed in (local); signed out (live) | works, ends on the main address `/` with the repo list || Same, but first tapping a repo tab or opening a folder or file (in-page navigation), then ☰, then Repositories — local and live, signed out | **404 "Page not found"**. Live ended on `https://gitoria.gitoria.worldapi.org/()=>_60(4,"publicUrl","Util","publicUrl → envOr → hl:proc env: hl:proc has no browser side","client")/` || In the same state the "All repositories" link at the top of the repo page | still correct |**Cause.** `components/main.hl:30-32` builds the menu as `static menu = [ { label = 'Repositories' href = publicUrl + '/' … } ]`. `publicUrl` comes from `lib/util.hl:23` (`envOr('GITORIA_PUBLIC_URL', …)`), which reads the environment with hl:proc, and that does not exist in the browser. The server's HTML has the right link. But as soon as the browser re-renders the shell after an in-page navigation, it evaluates `publicUrl + '/'` itself and gets Hybriel's placeholder text for "this has no browser side" — a nonsense relative link that the router takes for a path on the repo address → the shell's 404 page. (`mainHref = publicUrl + '/'` in components/repo.hl:36 works, because that is an instance property the server fills.) `main.hl:43-44` (`tokensHref`, `keysHref`) use `publicUrl` the same way but are not in the visible UI now.Why the gate did not catch it: tests/browser.mjs:1096-1101 taps Repositories only right after a full page load.Shots: shots/live-out-390-repo-code-menu.png (the ☰ panel as served: one item "Repositories", highlighted, 44 px high, inside the screen; behind it the dimmed page), shots/*-after.png (fresh-load cases land on the repo list).## Step 2 — the fix (branch g23-sidebar)`components/main.hl`: `static menu` became an instance property `menu` (one word; the comment says why). The server fills an instance property and the browser keeps it, like `mainHref` in repo.hl, so the link stays `https://gitoria.worldapi.org/` after in-page navigation. No JavaScript, no Hybriel gap. The page-wide "static evaluated again in the browser" behaviour is the Hybriel side of this (a static that reads hl:proc has no value in the browser and silently becomes placeholder text); I did not write a .scratch repro because instance properties are the documented way and work.Gate (tests/browser.mjs, four new checks after the existing ☰ tap check): real taps on the repo tab Code, on a folder, on a file, on Pull requests then Readme, then ☰, then "Repositories"; it checks the sidebar and header links and that the browser lands on the repo list at the main address.- On main (old code): 261 passed, 4 failed — all four new checks (the two the first run also listed: after Code tab and after a folder; the other two as well in the final count).- On the fix: 265 passed, 0 failed. Also: check-theme 49 files 0 problems, security 70/0, signin-return 3/0.What I saw at 390 (shots/fixed-menu-k*.png, shots/fixed-after-k*.png): after Code tab, folder, file, Pulls: the ☰ panel still shows "Repositories" (highlighted, 44 px), tapping it ends on the Repositories list (header ☰ + "gitoria", heading, repo cards) — the old code ended on a "Page not found" page. The same repro on live (not fixed there) is in repro/live logs above.Not tested by me: signed in on live (not allowed). Local signed-in fresh-load cases all pass; the in-page navigation case is the same code for signed in and out (the menu does not depend on the login).## Step 3 — navigation that exists elsewhere (report only, nothing built)Gitoria today:- Header: ☰ (phone) · brand "gitoria" · main menu (desktop, one item "Repositories") · ident's selector · when signed in your name and a "Log out" button (no user-icon dropdown any more; the tokens and keys are not in a menu).- Main page `/` (repo list): "Repositories" heading, repo cards, the "Create repository" form (signed in, named), then the Access tokens section (`#tokens`) and the SSH keys section (`#sshkeys`), both on the same page.- Repo address pages: "All repositories" link and the repo tab row Readme · Code · Pull requests · Releases · Tickets · Settings.- Nothing in the ☰ panel but "Repositories". "Access tokens" and "SSH keys" are reachable only by scrolling the main page (the unused `tokensHref`/`keysHref` in main.hl point at `/#tokens` and `/#sshkeys`).Other apps (live HTML, ☰ panel): tickets: "All tickets", "Inbox". notes: "Notes". calendar: "Calendar". tracker (source, components/main.hl): Series, Shows, Movies, Genres, People, Franchises. So the others list their top-level pages; none puts account items in the panel.Candidates for Atlas to decide or ask him (NOT built): "Access tokens" and "SSH keys" (anchors on `/`, signed in only), "New repository" (anchor to the create form), "Log out" (phone), and for a repo address the repo's own tabs. He said "only one item" — whether he wants more items, or just a working one, is not clear from his words.## Processes and cleanupStarted and stopped: the gitoria servers of my runs (by PID, last PID in G23/srv.pid), the gate runs (node PID in G23/gate.pid, their ident/tickets/Chrome/Firefox children), the repro Chromes (closed by b.close()). Ports used: 8740–8759 only. Check at the end: no chrome with cwd in G23 (see command in the final answer), no listener on 8740–8759.Requests: about 50 in total (step 1 ~20, step 2 ~20, step 3 ~8). Under the cap.
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
- 26117255|||PR apps API: review comments on files with spaces in their namemre
- b8796cecMerge branch 'f1-broken-json' into mainGitoria
- 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
- f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
- 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre
- 16a3530fMerge branch 'heap-revert' into mainGitoria
- 220a80e0|||PR Remove temporary /__heap route and heap helper; logmre
- 13f0c342Merge branch 'hl25-records' into mainGitoria
- a002ecb7|||PR records: HL25 report, heap helper, logmre
- 2492a55cTemporary keyed /__heap route for the live memory snapshotmre
- fefaedd2log: tracker PR-only, HL25 startedmre
- 21aa57calog: parkmre
- 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