gitoria

notes

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc37488b1c37488b1MN report: alignment updatemrec37488b1/reports/N1-twowriters.md

1.8 KB

  1. # N1 — text from a second writer never reaches the first tab
  2. **Cause (notes' own code, components/notes.hl `settle`; not the server, not md-editor, not hl:web):** a tab keeps what it typed in `edits` and lays it over the server's list (`rowsOf`). An edit was dropped only when the server's text for that note was *exactly* the edit's text. Once another tab saved, the server text never equalled A's old (already sent) edit again, so A's stale edit stayed on top forever and hid every later text from B (server, tab C and B all had it; A only after F5). E1's "A→B 10/10, B→A never" is the same thing with roles swapped: whoever types second is the one that stays blind.
  3. Proof on the server side: a fresh third tab showed B's text; A's `edits` still held its old sent entry (probe in s/drv/probe.mjs).
  4. **Fix (.hl only, 3 lines in `settle`):** a sent edit (`sent == text`) is also done when the server's version of the note is not older than the edit (`n.edited >= e.when`). An edit still being typed (`sent != text`) is never dropped; a save that lost the race becomes the server's conflict copy as before (nothing lost); offline queue entries still lay over the list.
  5. **Gate (tests/browser.mjs, section after "one offline", `NOTES_GATE_UNTIL=twowriters`):** two real Chromes, same note, real clicks/keys into the editor: 3 rounds A types→B shows, B types→A shows; both tabs end identical with all marks; after reload of A nothing is lost. Old code (main c69ef9e + new gate): 3 FAIL ("B typed +b1, the other tab shows …+a1"); new code: 72 passed, 0 failed ×3 (69 + 3 new); theme: 22 files, 0 problems.
  6. **Real-browser (driver E1/drv/notes.mjs, copy of newest backup, own ports 8700+):** old: 1280 px B→A 0/2; new: 1280 px 6/6, 390×844 touch DPR 3 6/6 and BA order 4/4, no empty frame. Logs: N1/s/gate-old.log, gate-new{1,2,3}.log, s/shots*/ (PNG from the driver).
  7. Layout files untouched (MN's branch).

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