gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita81abdc9a81abdc9gitoria#34: org page via function route, member-reachable orgs, selects, reportmrea81abdc9/reports/G23-gitoria-sidebar.md

6.4 KB

  1. # G23 — gitoria#23 reopened: the sidebar ("only one item Repositories that leads to a 404")
  2. ## Step 1 — findings (written before any fix)
  3. 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".
  4. **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.
  5. 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/.
  6. | Case | Result |
  7. |---|---|
  8. | ☰ 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 |
  9. | 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")/` |
  10. | In the same state the "All repositories" link at the top of the repo page | still correct |
  11. **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.
  12. Why the gate did not catch it: tests/browser.mjs:1096-1101 taps Repositories only right after a full page load.
  13. 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).
  14. ## Step 2 — the fix (branch g23-sidebar)
  15. `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.
  16. 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.
  17. - 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).
  18. - On the fix: 265 passed, 0 failed. Also: check-theme 49 files 0 problems, security 70/0, signin-return 3/0.
  19. 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.
  20. 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).
  21. ## Step 3 — navigation that exists elsewhere (report only, nothing built)
  22. Gitoria today:
  23. - 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).
  24. - 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.
  25. - Repo address pages: "All repositories" link and the repo tab row Readme · Code · Pull requests · Releases · Tickets · Settings.
  26. - 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`).
  27. 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.
  28. 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.
  29. ## Processes and cleanup
  30. Started 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.
  31. Requests: about 50 in total (step 1 ~20, step 2 ~20, step 3 ~8). Under the cap.

Branches

Latest commits

  • a81abdc9gitoria#34: org page via function route, member-reachable orgs, selects, reportmre
  • 17f031f0gitoria#34: private repos, organizations, members, move tool, gatemre
  • 71b69343gitoria#23: the sidebar's Repositories link was a 404 after any in-page navigation (static menu re-evaluated publicUrl in the browser); the menu is an instance property now; gate taps it after a tab, folder, filemre
  • 90b4f728gitoria#25: restore the homepage cache and the parsed-blocks cache (they store data under immutable keys, no HTML); the page key, the framework readme key and the textHash key stay removedmre
  • a487248cgitoria#25: remove every cache that hid the page build (page key, Markdown render key, homepage cache, parsed-blocks cache) and the gate that only tested themmre
  • 12f2f4fegitoria: re-vendor Hybriel set-day27b, a startup fault in on Error exits 1mre
  • c21c084egitoria: write the standby service out in full so the boot gate can read the main servicemre
  • e307d69agitoria: say what is per process during the hand-overmre
  • f0cbe6a6gitoria: standby service on port 45014 and a deploy that hands over through it without a gapmre
  • 727cd083gitoria#25: README: vendor notes for Hybriel c1b1010f and the page cachemre
  • 61b72dedgitoria#25: re-vendor Hybriel master c1b1010f (W149 page cache), key the repo Readme page by slug and main commit, extend the readme-cache gatemre
  • 5b0b4b9ereadme-cache gate: use the security gate's ports when no own ports are givenmre
  • bc8f20d9gitoria#25: re-vendor Hybriel c09538bb with the W141 render cache, cache the homepage per commit, add the readme-cache gatemre
  • 9feebbd3Re-vendor Hybriel to ded47c13 (W145: Firefox start script fix)mre
  • 28ed41e5gitoria#24: one sign-in comes from hl:web batch 20, the /session/share workaround is gonemre
  • 3b2669e4gs: drop the unbuildable legacy check, fix pwa fetchmre
  • 2a2fdd77gs: C2 check before cookie experimentsmre
  • 76e0587aWIP gs 2mre
  • a80da7bdWIP gs: security gate for lazy sessions, g24 browser checksmre
  • 23fb05d8re-vendor Hybriel aaa39e69 (hl:web batch 20: login emit and Sessions.mint, tab follows a login, signed-in session cookie wins among duplicates and is re-issued with the Domain, W85 faster render, lazy sessions)mre