Repository navigation
Use Lit from first paint through TOC and activity updates - #3535
Merged
Merged
Conversation
…king # Conflicts: # skills/leaf/packages/default/vendor/lf-activity-initial.js # skills/leaf/packages/default/widgets/activity-view.js # skills/leaf/packages/default/widgets/lf-activity.js
leaf-agent
reviewed
Oct 22, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The startup path for pages without an early Lit drawing needs to stay lean.
Derive producer dependencies during build and select the shared facade only for early Lit pages, retaining normal module loading elsewhere and one implementation in offline exports. Keep late producer initialization on the same namespace. Isolate the saved-record test loop from the Playwright session loop exposed by the new browser coverage.
…king # Conflicts: # skills/leaf/kernel/kernel.json
leaf-agent
approved these changes
Oct 22, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 22, 2026
…3537) Visual review now gives each capture case a stable dashboard with a “Looks right” checkbox and feedback through Leaf threads. This replaces verdict radio buttons and shifting inspection controls with retained case views, direct thread access, and a More inspection popover. Screenshot comparison remains owned by `lf-shot`. Each case is also a separate On me obligation. The new generic `x-awaits.records` declaration derives those obligations from a bound data contract’s record keys; the server folds approvals, Undo, and case-specific discussion into their current state. Shared `m` / `Shift+m` navigation reveals the selected datum, including cases inside frozen thread widgets. Local `n`, `a`, `c`, and `i` shortcuts cover case navigation, approval, feedback, and inspection. The main review boundaries are the visual-review package (presentation and approval contract), `obligations.py` and its canonical reading inputs (per-record state), and shared obligation arrival (datum reveal and focus). Package-author documentation, schemas, generated bundles, and affected callers move together. Existing radio-verdict tests are replaced with approval, thread, navigation, reading-continuity, and responsive-layout coverage. Validation: 78 focused model/browser tests passed after integrating main, along with the full `pnpm run check`. Independent live review covered desktop and phone layouts, keyboard navigation, feedback, and On me arrival. Earlier matched startup captures showed no layout shifts or console errors. Final lint refinements passed pre-commit and 517 runtime tests. CI exposed an extra handover for generated options; the repair preserves their log ownership, with 19 focused stop/obligation checks. The comparison transaction test now permits the data read its obligation inventory needs while checking the lock remains held. The website loop-order test reuses the fix already on main in #3535. The broader redesign of `lf-shot` comparison and pixel/outline inspection controls is separate work. > _This was written by Codex on behalf of max-sixty_
leaf-agent
added a commit
that referenced
this pull request
Oct 22, 2026
The streamed initial host browser test failed before opening a page because its synthetic resource map omitted the build's initial dependency manifest. The delivery code added by #3535 reads that manifest to select a producer's prerequisites. This fixture now supplies the committed manifest with its JSON content type, so the test again exercises the full browser behavior it protects. Both Chromium and Firefox cases failed with `KeyError: '/vendor/initial-dependencies.json'` in [main CI run 39741006770](https://github.com/max-sixty/leaf/actions/runs/39741006770) and passed locally with this change. Co-authored-by: leaf-agent <[email protected]>
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.
The table of contents and activity feed currently build their first drawing by hand, then maintain custom row maps and DOM reconciliation after startup. This change lets Lit own both drawings from first paint through live updates, preserving their nodes, focus, native disclosure state and held activity.
Build metadata records which initial producers import Lit. Only pages using those producers initialize Lit before first paint; their module imports resolve to that same instance. Other pages load normal module Lit, with no extra request, and can still initialize later-arriving widgets. Each producer returns its template closure to the live widget so upgrade retains the same Lit parts. Both widgets use keyed
repeat; the shared mover preserves focus during live reordering. Hosted and offline delivery select one implementation, and the authoring contract describes the same pattern for package authors.On the combined-widget fixture against the integrated base, initial HTML grows by 34,358 bytes while code falls by 44,394 bytes and two requests (10,036 fewer bytes overall). A plain page has no early Lit, keeps the same 36 code requests, and adds 2,011 decoded bytes overall; normal Lit grows by 524 gzip bytes to expose its namespace for later producers. These are byte/request comparisons, not timing claims. Shared build and delivery support increases maintained code overall while removing the two hand-written reconciliation mechanisms.
Validation: 519 runtime, 132 framework and 85 Worker tests; 67 focused delivery model tests; browser coverage for early-to-live node identity, focus, disclosure, activity holding and print; streamed first paint in Chromium and Firefox; both offline delivery paths and late-arriving widgets with one Lit instance. Independent UI review exercised desktop/phone, light/dark, mouse, keyboard and touch, with 19 identical matched screenshots against the pre-integration base. After integrating main's activity-decoration cleanup, the affected activity and handoff cases were rerun. The browser coverage also exposed a test-order dependency in the existing saved-record regression: its deliberate asyncio loop now runs in its own worker, preserving active-loop publication coverage without colliding with Playwright's session loop.