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
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