components
All repositories: gitoria
3.3 KB
# F5 — MdEditor draws an EMPTY comment after a push (hybriel#211)Branch f5-empty (components 134b4e3 on main 0dce289; tickets d74a548, notes c69ef9e, layouts 02aa74a: verbatim sync via tools/sync-components.sh). Not merged, pushed or deployed. Stopped early at the quota (81 %): fix complete, loops 14 new / 16 old runs instead of 16/16.## CauseF3's value-following is not the culprit. A push changes the bound `value`; hl:web then builds the comment row's MdEditor ANEW (old node removed, new `md-editor` inserted: seen as `COMMENT-BUBBLE +MD-EDITOR -MD-EDITOR`). A new editor was drawn only by the 100 ms CSS animation (`animationiteration` -> mdMount), so every new row showed an EMPTY `article` for 100 ms or more (longer under load). The gate's wait (`article` matches /elsewhere/) is already satisfied by the OLD node's article (the data-value observer drew it ~30 ms after the click), so a check landing between the node swap and the mount read "" with the new data-value and the "Edited 3 times" title - exactly Arachne's log. Users see a flash of an empty comment (long on a slow device). Not a stale mdSeen or a load() clearing the wrong node; the old node's observer is harmless.## Fix (md-editor.hl, pure Hybriel)- mountRoot(root): the one-time build, split out of mdMount; mdMount only calls it. The first mounted editor starts ONE page-wide MutationObserver (`watchPage`) which mounts every md-editor added later (`mountAll`) in the same microtask checkpoint, before the first frame (not after 100 ms).- `rebuilt(root)`: root.mdSurface remembers the article drawn into; if the framework puts a different article under a built root (child-list observer, followValue, mdMount) the field's value is drawn into it at once = the defensive redraw. F3's logic (mdSeen, own, followValue) unchanged.## Proof- Deterministic gates (tests/browser.mjs, +2): "the push builds a new editor, and it is never empty in a frame" (page observer + requestAnimationFrame on every added readonly editor) and "a surface replaced under a built editor is drawn again from its value" (forced article swap). On OLD md-editor: both FAIL (499 passed, 2 failed). New: 501 passed, 0 failed.- Original gate (main's browser.mjs, 499 checks) full runs: OLD md-editor 16 runs: 14 x 499/0 and 2 runs crashed at the "Edit opens" step (`form.comment-edit input.value` null - a neighbouring race of the same kind: edit form's editor not there/mounted yet); NEW md-editor 14 runs: 14 x 499/0 (run 15 killed at the quota). The exact 1-in-3 failure of the push check did not show on this machine (old 0/16 there; a focused 60x loop of the push also 0/60), so the loop does not discriminate here; the deterministic gates above are the proof.- Deploy gates, new == main (app HEAD without the sync), 0 failed: tickets browser 389/0, events 52/0, theme 46 files 0 problems; layouts browser 311/0, theme 44; notes browser 69/0, theme 22. Components 501/0 (499 + 2).- F2 repro (notes copy): `{"field":"after","shown":"after"} OK`. Notes browser gate with HL_CPU_THROTTLE=6: 3 x 69/0.- Not done (quota): real-browser E2E on lisbeth (no UI change; the gate runs the headless real-click flow), the remaining loop runs.## Left behindNothing running; ports 8700-8729 free of mine; tabs closed; /tmp/hl-browser-tier-* of mine removed. Logs: atlas/F5/s/runs/. Worktrees atlas/F5/{wt,wt-old,base-*,tickets,notes,layouts}.
Branches
Latest commits
- 6fd953e3range-picker: nest Style rules in the language's formmre
- f661951ddate-picker: nest Style rules in the language's formmre
- 363577e6media-player: nest Style rules in the language's formmre
- 0b3fd8c9comments: nest Style rules in the language's formmre
- 67e043c8plugins/web/README.md from hybriel cb9e480dmre
- 519b56e9styles.hl: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- 29f63d01md-editor: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- 869f49c7files-upload: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- f60dab20month-view: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- 5b3c349aRe-vendor to Hybriel set day35 (cb9e480d): plugins core and web sources, README vendoring notemre
- 3449b117components: a startup error prints its message before exit 1 (hybriel#247)mre
- 59704ce1Merge branch 'n5b-pipes'mre
- 23b9164aMdEditor: a clipboard whose text is only the names or file:// paths of its files (a file manager copy) is about the files, as before; any other text wins (tickets#49); gate casesmre
- b0f1ec28MdEditor: a clipboard with text always pastes the text, also when a picture is on it too (a spreadsheet or office app), files on or off; a picture alone still goes to the files; real Ctrl+V gate tests/md-paste-files.mjs (tickets#49)mre
- ad4e929bMdEditor: pipe rows without a delimiter row are a table (first row = header, short rows padded, written back without an invented | --- | line) (notes#5)mre
- 4bd11128MdEditor: the Table button's empty table is written as a real pipe table (empty cells), so it survives the source switch, a save and a reload (notes#7)mre
- 7437e32bMdEditor draws its surface at once when claimed from server HTML: 1 ms mount animation, the first editor mounts all editors of the pagemre
- 5de0264cRe-vendor onto Hybriel master acaceaf3 (set-day27b): binary, lib and plugins; exit 1 on a startup fault; .gitignore binmre
- 79c77e7dMerge sb3-standby: components deploys through its standbymre
- c5442043components: no jobs switch needed in the standbymre