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
- 8c920932gate: the 11 old drop-zone checks now test the one-box pick mode (drop anywhere in the box, Choose files button inside it, no drop zone)mre
- 626de199MdEditor: copy and cut put the selection's Markdown on the clipboard, a clipboard with HTML only pastes its text, gate checks for copy, cut and paste (components#20)mre
- 5228126dUX: components synced from the tickets/layouts UX mission (comments: State select in the footer and button words; files-upload: one-box pick mode; modal: footer rule for its own footer). WIP: the gate's #18 pick-mode checks still expect the old drop zone (11 fail), see the UX2 reportmre
- 0a9216fbMdEditor: a Table button in the toolbar, a typed pipe row fills the cells, tables take the page theme's look; gate checks updated for 12 toolbar buttonsmre
- f9d405c8comments: reactions row half as far from its comment (creator 2026-10-24: 'half this distance please'); the 44 px tap targets staymre
- 4922f9cfsessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
- 0355975areports/MC-mobile.md, LOG, STATUS (MC)mre
- 3f0a7229Month view, date picker, range picker: names follow the page language (English by default, not the browser's), weekday/month names formatted in UTC (a UTC+12 zone showed Tue first), 44 px day cells and buttons, Send row air; gate checks at 390 px for every page, popup and dialog (MC)mre
- 29eb07eaPhone: 44 px targets on the site (brand, home links, buttons), comments, modal and pagination; the header is the brand alone on a phone; comments demo: labelled 'You are' group with the chosen user pressed (MC)mre
- d1cc83e2reports/E2-toolbar.mdmre
- 214c3183MdEditor on a phone: toolbar as two even rows of 44 px targets (no clipped icon, no swipe), 'Markdown source' label 15 px, table head 16 px; gate checks (E2)mre
- 9215bbaareports/F5-empty.mdmre
- 134b4e3eMdEditor: an editor the framework puts into the page is built at once (page observer), a surface put in anew under a built editor is redrawn; gates for both (hybriel#211)mre
- 0dce2899reports/K1-bubble.mdmre
- 6b0936a0comments: 'edited' foldable also drops the theme's border, margin and radius (display: contents alone left them computed)mre
- 8d79ff79comments bubble hugs its content: a readonly md-editor surface gets no inline min-height (it beat the stylesheet's min-height 0); 'edited' is a quiet label beside the time, versions unframed; gate checksmre
- ef253fecreports/F4-icons.mdmre
- ba96735ficons: README, md-editor README note, gate checks for the single focus ring and toolbar iconsmre
- 96c97691icons: shared Icon component; md-editor toolbar and files-upload remove use it; no inner focus ring in md-editormre
- 0d6863d6reports/F3-mdvalue.mdmre