gitoria

notes

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc37488b1c37488b1MN report: alignment updatemrec37488b1/reports/008-revendor-97bcf128.md

5.7 KB

  1. # notes mission 008 — re-vendor Hybriel 97bcf128 — gate 64/0 (was 62/2), hybriel#170 closes the offline editor gap (branch w7, NOT pushed, NOT deployed)
  2. ## Vendor
  3. - `/media/STORAGE/claude-scratch/vendor-97bcf128/` (README.txt: sha256 of every file, build command, ldd). Built read-only: `git -C /media/STORAGE/projects/hybriel archive 97bcf128 | tar -x`, `HL_NO_PLUGINS=1 bash native/build.sh` (55 s; the plugin .so files are committed in the archive).
  4. - `bin/hybriel` sha256 `60fa02f341ffa799b41a3dbd26d76057169f786e20dae0f98bb2ca3c46c39080` — **byte-identical to vendor-0f396652** (`diff -rq bin` clean): 0f396652..97bcf128 changes only `plugins/web/WebFramework.hl` (+67 lines, `offlineFiles`, `offlineFileUrls`, `viewFileUrls`) and `plugins/web/README.md` (+3). `ldd`: "not a dynamic executable"; `file`: statically linked.
  5. - Container: debian:12-slim + libssl3 + ca-certificates (the Dockerfile of notes), notes tree with the new vendor, compose copy with own names (`k2-notes-97bcf128`, volume, image), port 8750, tmpfs /tmp, cache volume, init: HTTP 200 after ~15 s, "framework listening on 8750", `docker exec … ldd` = not a dynamic executable. Container, volume and image removed.
  6. - No local XSS patch exists in notes' plugins (`plugins/webex` does not exist; w7's plugins were identical to vendor-0f396652 before this change), so nothing to keep or drop. docker-compose.yml, Dockerfile, deploy.sh unchanged (cache volume, tmpfs, init already there).
  7. ## App change (one setting, no JS)
  8. - `project.hl`: `offlineFiles = ["/md-editor.js"]`. Without it the editor stays missing offline: (b) of hybriel#170 (keep every file route a kept page's View loads through a literal `script { src }`) does not see it, because notes loads `/md-editor.js` in the shell (`components/main.hl`), not in the page View. Measured: with 97bcf128 and no setting the gate still failed the same 2 checks (62/2); with the setting 64/0. The worker's precache list now has `/md-editor.js` (the only difference in `/__hl/sw.js`, below).
  9. - `components/styles.hl` (mobile first, found by the new 390 px checks): `button` min-height 2.75rem; `.brand` and `.back` inline-flex, min 2.75rem; `md-editor::part(button)` min-width/height 2.75rem. (shared/md-editor.js untouched.)
  10. - README: "Known gap" paragraph replaced by the `offlineFiles` note.
  11. ## Gates (ports 8740/8741, Chrome 8742–8749; ident = a copy of ident a6a874c, see below)
  12. - `tests/browser.mjs`, old (w7 HEAD eeaea98 + the same bin, old plugins): **62 passed, 2 failed** — exactly the 2 failures of report 007 ("the Markdown editor is there offline", "tables: offline … with the table").
  13. - New (97bcf128 + `offlineFiles`): **64 passed, 0 failed**, both before and after the CSS change (two runs). The two checks pass.
  14. - ident for the gate: current ident HEAD (mission 011) changed the mail sink and the gate's sign-in fails with "email and code must be strings" (identkit reads the old sink format). I used `git archive a6a874c` of ident (mission 010, the one the gate was written against) + its bin. Not a notes problem; **tests/identkit.mjs needs an update for ident ≥ 7869f57** (ident#7 delivery) — left for a later mission.
  15. - Same-output real data (`tests/realdata-baseline.mjs`, old tree vs new tree, port 8752, COPY of `notes.worldapi.org-20261019-2028.tgz` (newest) → storage/mpackdb in scratch, deleted after): 295 answers each, 178 byte-identical, 115 identical after masking, **2 different**: `0032-in-___hl_sw.js` and `0033-out-___hl_sw.js` (the generated worker). The only difference is one more entry in `precache`: `"/md-editor.js"` — intended. No API answer differs. (Run before the CSS change; the CSS change alters app.css by intent.)
  16. - Real data offline (`tests/realdata-offline.mjs`, same backup copy, extended in this mission): **12 passed, 0 failed** — 28 live notes listed, offline reload lists 28 with no socket, offline edit with real keys not on the server, synced into the SAME note, no server error, plus the 6 new 390 px checks below. The copy was deleted by the test.
  17. ## Mobile: offline pages at 390 px, measured in the DOM (no image viewed)
  18. Chrome offline (CDP page + worker), reloaded offline at 390 px, every element incl. shadow DOM measured: no visible element left < 0 or right > 390, document scrollWidth, md-editor defined, every a/button/input/textarea/select/[role=button]/[contenteditable] ≥ 44 × 44.
  19. - Result now: note page 390 scroll width, no overflow, 16 tap targets all ≥ 44; list page 390, no overflow, 31 tap targets all ≥ 44; md-editor defined offline.
  20. - **Before the CSS fix (same checks failed):** brand link 53×28, Log out 82×35, "All notes" 65×24, New note 112×42, nine md-editor toolbar buttons 32×34. Fixed as above; no overflow was ever found.
  21. - Not counted as a tap target: the editor's own hidden textarea (`md-editor > textarea`, 24 px, out of sight by design); the editable surface is the md-editor shadow part.
  22. - Not measured: ident-selector's shadow DOM (not rendered on these pages offline); the online pages at 390 (screenshots of mission 007 stand).
  23. ## Cold start
  24. Measured on a heavily loaded machine (load average 62): empty HL_CACHE_DIR → ready (HTTP 200): new tree 44.8 s and 67.4 s (2 runs), old tree 42.5 s; warm 0.6–1.0 s. Mission 006 had 10.2 s on an idle machine; the numbers here are noise from load, not a change of the compile (same binary, one more setting). Re-measure on an idle machine before deploying.
  25. ## Hybriel gaps
  26. None hit. hybriel#170 (a) works as documented; (b) does not cover a script loaded in the shell rather than the page View — by design ("a kept page's View"), noted for Arachne in case a shell script should count.
  27. ## Commits (branch w7)
  28. re-vendor 97bcf128 + offlineFiles + tap sizes + 390 px checks + README + mission/report (this commit). Nothing of mine is left listening on 8740–8759.

Branches

Latest commits

  • c37488b1MN report: alignment updatemre
  • 4fb35a0enotes mobile: Delete note and the delete row exactly on the editor's edges; gate asserts 1 pxmre
  • 91736270MN report and logmre
  • 15667425notes: delete confirmation buttons at most 12rem wide on the desktopmre
  • 8f7a6a95gate: MN phone checks (list header gutter, back gap, delete question)mre
  • 90c73ed3notes mobile: back link gapmre
  • 72bd4f83notes mobile: list header on the gutter, delete confirmation as a question + two equal buttons, Delete note under the editor edgemre
  • ba1e73f8notes: a sent edit is done once the server's version is not older, so a second writer's text shows in the first tab; gate: two writers both waysmre
  • c69ef9ebsync components.hybriel 134b4e3: MdEditor builds an editor put into the page at once, redraws a surface put in anew (F5, hybriel#211)mre
  • 2eb783f5sync components 9a: shared Icon (icons/icons.hl), md-editor toolbar icons + single focus ring (components f4-icons ba96735)mre
  • 4dd46dadsync-components: copy icons/icons.hl + README (F4); testsmre
  • c92e4a0ftests/e2e-outside.mjs: real-Chrome E2E, a note pushed from another device while open, then typingmre
  • 0516b4ccmd-editor.hl: verbatim copy of components f3-mdvalue (an older text handed back is kept)mre
  • 38cc11ecmd-editor.hl: verbatim copy of components f3-mdvalue (an outside value change is shown by the editor)mre
  • 3e7e79f5reports/H1-hydrate.mdmre
  • d98775e8tests/browser.mjs: wait for hydration before the clicks after a goto('/') (tables new note, phone sidebar)mre
  • 1f3198b6tests/cdp.mjs: HL_CPU_THROTTLE=<rate> optional CPU throttling for gate runsmre
  • 39cf9fdfre-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
  • db07aa84tests: short-id-switch ports from env (NOTES_SWITCH_IDENT_PORT/_PORT), defaults unchangedmre
  • ef9f9feere-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