gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit727cd083727cd083gitoria#25: README: vendor notes for Hybriel c1b1010f and the page cachemre727cd083/components/repo.hl

3.3 KB

  1. // components/repo.hl — THE REPO LAYOUT LEVEL (gitoria#22, D-CHAIN): the one level every repo page stands in:
  2. // shell (main.hl) → repo (this) → page (readme via index.hl, code, branch, commit, pulls, releases, tickets, settings).
  3. // It holds the repo head (name, description, "All repositories") and the tab nav (Readme · Code · Pull requests · Releases ·
  4. // Tickets · Settings) with aria-current = 'page' on the active tab, and the `slot` the page renders into. hl:web keeps a
  5. // standing level's DOM nodes when you navigate between pages of the SAME chain, so a tab click replaces only the slot —
  6. // not the head, not the nav. EVERY repo page declares `parent './repo.hl'` (never main.hl): a page under another chain
  7. // would be a full reload.
  8. // The repo comes from the request's host (`host = null`, hybriel#74). A MISSING repo: only "No such repository" + its link
  9. // (the page is still constructed, but every page renders nothing without a repo; a missing repo with NO slot made the browser's boot hang now and then, see reports/G2-hydrate.md). The main address (no slug): no head at all, just the slot (the repo list).
  10. // THE ACTIVE TAB comes from the route (`route = null`: the standing level is given the new route on every navigation):
  11. // '/' readme · /code* /branch* /commit* code · /pulls · /releases · /tickets · /settings.
  12. // The "Add code" help (gitoria#7, gitoria#20) is the page's own: components/addcode.hl, in code/branch/commit.
  13. parent './main.hl'
  14. import { slugOfHost, publicUrl } from '../lib/util.hl'
  15. import { repoAt } from '../lib/repos.hl'
  16. import { tabOfPath } from '../lib/repos-helpers.hl'
  17. host = null
  18. route = null
  19. slot = null
  20. slug = slugOfHost(host)
  21. repo = repoAt(slug)
  22. onMain = slug == ''
  23. showHead = slug != ''
  24. hasRepo = repo != null
  25. isMissing = slug != '' && repo == null
  26. tab = route != null ? tabOfPath(route.path) : ''
  27. // the active tab's aria-current: 'page', else null — NOTE Hybriel renders null as aria-current="" (empty = false for ARIA),
  28. // repro .scratch/repro-null-attr; styles.hl matches [aria-current=page]
  29. curReadme = tab == 'readme' ? 'page' : null
  30. curCode = tab == 'code' ? 'page' : null
  31. curPulls = tab == 'pulls' ? 'page' : null
  32. curReleases = tab == 'releases' ? 'page' : null
  33. curTickets = tab == 'tickets' ? 'page' : null
  34. curSettings = tab == 'settings' ? 'page' : null
  35. mainHref = publicUrl + '/'
  36. View {
  37. repoPage {
  38. if (showHead) {
  39. repoHead {
  40. if (hasRepo) {
  41. h1 { id = "reponame" repo.slug }
  42. if (repo.described) { p { id = "repodescription" repo.description } }
  43. p { class = "muted" "All repositories: " a { id = "toall" href = mainHref "gitoria" } }
  44. repoNav { id = "reponav"
  45. a { id = "navhome" href = "/" "aria-current" = curReadme "Readme" }
  46. a { id = "navcode" href = "/code" "aria-current" = curCode "Code" }
  47. a { id = "navpulls" href = "/pulls" "aria-current" = curPulls "Pull requests" }
  48. a { id = "navreleases" href = "/releases" "aria-current" = curReleases "Releases" }
  49. a { id = "navtickets" href = "/tickets" "aria-current" = curTickets "Tickets" }
  50. a { id = "navsettings" href = "/settings" "aria-current" = curSettings "Settings" }
  51. }
  52. }
  53. if (isMissing) {
  54. h1 { id = "missing" "No such repository" }
  55. p { class = "muted" "Nobody has created this address yet. " a { id = "toall" href = mainHref "All repositories" } }
  56. }
  57. }
  58. }
  59. slot
  60. }
  61. }

Branches

Latest commits

  • 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
  • a0727ca3ident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • a06975f9gitoria: a gap between your name and Log out in the phone header (they touched); gate checks itmre
  • 32ba9d59gitoria: leave the host-only cookie experiment out of the browser gate (gitoria#24 is a separate mission)mre
  • 43ad2bcfgitoria header: the selector alone plus your name and Log out as before the theme missions; tests follow (WIP: host-only cookie experiment fails)mre
  • ac2c4e3fident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre
  • b279f536theme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
  • 2b01515ctests/ticketskit: a failed start kills the tickets server (own process group); stop() kills the groupmre
  • 109cfc5ctests/ticketskit: keep the rotated session cookie of the tickets login (tickets ST2 session rotation)mre
  • 7eb6be27sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre