hermes-agent/apps
Brooklyn Nicholson 570337c099 fix(desktop): clearing the composer lands on the same empty state every way
Select-all + Delete cleared the composer; select-all + Cut left it holding
a draft. Both produce identical DOM, so the split was in the reader.

An emptied editor keeps a placeholder <br> \u2014 scaffolding
normalizeComposerEditorDom adds so the contenteditable doesn't collapse to
a sliver, not a line the user typed. composerPlainText read it as "\n",
and syncDraftFromEditor (session swap, pagehide) skipped the
normalize+sanitize its rAF twin runs. Cut's residue reached that reader;
Delete's went through the flush path and got cleaned.

Fixed where the two disagree rather than at each call site: an editor
holding nothing but its placeholder break reads as empty. A real
Shift+Enter break, a trailing break after text, and a nested lone <br>
are all unchanged \u2014 the exemption is scoped to the editor root by its slot
marker. syncDraftFromEditor now normalizes and sanitizes like the flush
path, so both readers see one truth.
2026-07-30 07:29:31 -05:00
..
bootstrap-installer test(installer): pin own-pid adopt for desktop-prewritten update marker 2026-07-30 17:57:13 +07:00
desktop fix(desktop): clearing the composer lands on the same empty state every way 2026-07-30 07:29:31 -05:00
shared refactor: drop the shared subpath export, keeping package.json untouched 2026-07-28 03:54:49 -05:00