gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcd99d2fecd99d2feWIP 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.mdmrecd99d2fe/plugins/data/server.hl

2.6 KB

  1. \* hl:data — NEED EVALUATION, the one implementation every realm edge uses.
  2. A component's need is a member whose initializer calls a provider class
  3. (SPEC.md §9.2); the graph publishes each as { key, provider, method, args,
  4. project }. Evaluating one is: resolve the arguments against the caller's
  5. context — a folded constant, a route group's member, or a `session`
  6. field — call the provider method, and take the projected field. hl:web did
  7. this per request and per push; hl:ipc does it per peer push. It lived in
  8. hl:web until the second edge existed (2026-09-01), which is when "shared"
  9. stopped being a word and became this plugin. *\
  10. \* Every need of one component, against the provider instances of the calling
  11. edge. One memo per evaluation: two needs fed by the same call cost ONE call. *\
  12. runNeeds(
  13. Hybrid needs \\ the graph's need list for the component
  14. &providers \\ class name → provider instance (the edge module's)
  15. &params \\ route groups; {} for a peer that matched no route
  16. &sdata \\ the session bag; {} for a peer with no session
  17. ) {
  18. let out = {}
  19. let memo = {}
  20. for (need of needs) {
  21. out[need.key] = runNeed(&need, &providers, &params, &sdata, &memo)
  22. }
  23. return out
  24. }
  25. \* One need: the value its MEMBER holds. `need.project` is the field taken off
  26. the returned hybrid ("" = the member IS the return value). A provider read
  27. answers for null arguments (the 074 contract), so an anonymous caller
  28. evaluates the same needs and simply sees nothing of anyone. *\
  29. runNeed(&need, &providers, &params, &sdata, &memo) {
  30. let provider = providers[need.provider]
  31. if (provider == null) {
  32. return null
  33. }
  34. let args = []
  35. for (a of need.args) {
  36. if (a.group != null) {
  37. args[] = params[a.group]
  38. } else if (a.session != null) {
  39. if (a.session.length == 0) {
  40. args[] = sdata
  41. } else {
  42. args[] = sdata[a.session]
  43. }
  44. } else {
  45. args[] = a.value
  46. }
  47. }
  48. let ck = need.provider + "." + need.method + "(" + JSON.stringify(args) + ")"
  49. // a call that ANSWERED null is simply not memoized — repeating it is correct
  50. let result = memo[ck]
  51. if (result == null) {
  52. result = callProvider(&provider, need.method, &args)
  53. memo[ck] = result
  54. }
  55. if (need.project.length == 0) {
  56. return result
  57. }
  58. if (result == null) {
  59. return null
  60. }
  61. return result[need.project]
  62. }
  63. // The provider call itself — the method name is DATA, so the call is computed.
  64. callProvider(&provider, method, &args) {
  65. if (args.length == 0) {
  66. return provider[method]()
  67. }
  68. if (args.length == 1) {
  69. return provider[method](args[0])
  70. }
  71. if (args.length == 2) {
  72. return provider[method](args[0], args[1])
  73. }
  74. return provider[method](args[0], args[1], args[2])
  75. }

Branches

Latest commits

  • 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
  • f0e7ff8cdeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • fe5f707cgitoria 010: report, mission, comment on why current = true staysmre
  • 9705ca86gitoria 010: gate: menu marker in the server HTMLmre
  • 8cff663agitoria 010: main-menu.hl from layouts 0bcc629 (route marker)mre
  • 359c79f7gitoria 010: re-vendor Hybriel master f9614007 (plugins whole, bin/ git-ignored)mre
  • 6bd7fb3cgitoria 009: theme re-copied from layouts 76f99f6 (menu marks the current page), current = true on the menu item, e2e marker checks, reportmre
  • 44de915cidentkit: refuse a taken ident port, cold-start deadline, abort on dead ident, clear no-code error (as notes)mre
  • 2bf5343egitoria 007: theme re-copied from layouts dbe3de7 (44 px taps), redundant tap overrides dropped, crumbs class, real-browser walk test, reportmre
  • 18843648deploy.sh: a gate without a 'passed,' line (check-theme) no longer ends the script silently (grep under pipefail) — print check-theme's summary, as layouts doesmre
  • e6dff0cbgitoria#23: report 005, STATUS, LOGmre