Skip to content

fix: retain reply editors when their margin card is hidden - #4404

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-4239
Oct 27, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-4239

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

A reply handoff treated a margin card hidden with visibility: hidden as still showing its editor: bare checkVisibility() ignores that property. The floating panel therefore took focus in a fresh mirror instead of carrying the native row, and returning to the card discarded the original editor. Reply handoffs now use the shared drawn predicate for both the current owner and destination views, preserving the editor, caret and undo history through the responsive transition intended by #3855.

The existing responsive-draft journey fails on current main at the original-editor identity assertion and passes with this change, for both comment and reply variants. Seven related cases covering hidden subjects and transfers between diff seats and margin cards passed. All 673 runtime tests pass, and the kernel build/type check passes.

The on-screen card, reply words and focus keep their existing presentation; the corrected behavior retains the native editing session during the hidden-card/panel/card transition. A served review-a-plan startup comparison keeps 31 code requests through widget upgrade and first server-state presentation; JavaScript decreases by 27 bytes, while total code bytes increase by 58 bytes. Both arms report no console errors or layout shifts. The fix adds no startup task or dependency.

Closes #4239 — automated triage

Reply handoffs used bare checkVisibility(), which treats visibility:hidden as visible. Use the shared drawn predicate for owner and destination readings so a responsive card hands its native editor to the panel and takes it back. This preserves the return-to-page behavior from #3855 without discarding caret or undo history.

Closes #4239
# Conflicts:
#	dist/kernel/kernel.json
@leaf-agent
leaf-agent merged commit 034d00c into main Oct 27, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4239 branch October 27, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Responsive margin draft replaces the leaf-text node holding typed words

1 participant