Skip to content

Fix: code editor handle requests made in a widget tree reach their editor (FR-38) - #174

Merged
b-re-w merged 1 commit into
developfrom
feat/island-code-requests
Nov 6, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/island-code-requests

Conversation

@b-re-w

@b-re-w b-re-w commented Nov 6, 2026

Copy link
Copy Markdown
Member

Found while wiring the Ember editor's find and replace: handle.select, reveal and edit on a CodeEditorHandle created in a WidgetView tree never reached the editor, so nothing selected, scrolled or replaced, and no error was reported.

Cause

The page's flush of code editor requests (flush_code_edits) takes the whole queue and drops a request whose handle its renderer does not carry. A WidgetView tree has a ComposeRenderer of its own (its own editors table), and nothing flushed the requests for it.

What

After render_islands has rendered the trees, each request goes to the tree whose renderer carries the handle (ComposeRenderer::apply_editor_request, which the page's flush uses too); a handle no tree carries is dropped as before. EditorRequest::token().

Tests (FR-38)

  • fr38_a_code_editor_handle_in_a_widget_tree_reaches_its_editor: a WidgetView with a code editor and a button that asks its handle for an edit, a selection and a reveal; each goes out addressed to the island's editor. Verified to fail without the fix (the request is dropped).
  • Run: fr34_3_widgets_in_html 6, code_editor 8, fr34_html_bridge 20, lib; cargo fmt clean.

Stacked after #173 (merged).

…itor (FR-38)

The page's flush of code editor requests drops a request for a handle its renderer does not carry, and a
WidgetView tree has a renderer of its own that nothing flushed, so edit, select, reveal and fold asked of a
handle in a widget tree never left. After the trees are rendered each request now goes to the tree whose
renderer carries the handle; a handle no tree carries is still dropped. The request is applied by one
method of the renderer, which the page's flush uses too. Tested through a WidgetView with a code editor
whose button asks its handle for an edit, a selection and a reveal.
@b-re-w
b-re-w merged commit 877ef59 into develop Nov 6, 2026
4 checks passed
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.

1 participant