Repository navigation
Draw lf-worktree and lf-worktree-diffs as Effect UI components - #7377
Merged
Merged
Conversation
Both widgets now mount through `defineWidget` in a shadow root with `lfPatch: "members"`, and their inputs read the element's and its members' attributes. A descendant's `lf-connect` reads them again, so a kept widget redraws in place and its native disclosure keeps its open state and focus. `worktree-view.js` and `worktree-diffs-view.js` are deleted. `lf-worktree-diffs`'s view wraps the overview and slot in a `display: contents` div, since an Effect UI view has one root. Stills show one visible difference: "+7" kerns as one text node rather than Lit's two. The adapter reads `inputs` through one guarded call, so a throw from a descendant's `lf-connect` stays on the widget as a signal-driven one does. The capture test now drives the defined elements rather than the deleted view functions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V22NWd3erndyoj2G9LEP7y
leaf-agent
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Maximilian · project thread
This is the second step of moving Leaf's widgets to Effect UI, after #7374.
lf-worktreeandlf-worktree-diffsnow draw as Effect UI components throughdefineWidget.What changes
lfPatch: "members". Theirinputsread the element's attributes, and for the collection its members' attributes.worktree-view.jsandworktree-diffs-view.jsare deleted.defineWidgetgainslfPatch. A descendant'slf-connectnow readsinputsagain, asLeafElementdraws again then, so a kept collection redraws its totals in place after a revision changes its members.inputsis read through one guarded call, so a throw from that re-read reports throughfailSoft, as a signal-driven one already does.lf-worktree-diffs's view wraps its overview and slot in adisplay: contentsdiv, because an Effect UI view has one root.What a user sees
leaf-dev stills --base origin/mainreportsworktree-startupunchanged.worktree-summariesandworktree-cases-opendiffer only in how "+7" kerns: Lit wrote "+" and "7" as two text nodes, and Effect UI writes one string. The styles diff lists only the wrapper div in place of the overview and slot standing directly in the shadow root.Tests
tests/browser/test_render_diff_controls.pyandtests/journeys/test_render_diff_controls.py, worktree tests (5 passed, WebKit skipped locally).tests/runtime/authored-capture.test.mjsandtests/runtime/effect-widget.test.mjs.pnpm run checkand pre-commit.🤖 Generated with Claude Code
https://claude.ai/code/session_01V22NWd3erndyoj2G9LEP7y
Generated by Claude Code