Repository navigation
fix: restore margin folds after reaction choices close - #2753
Merged
Merged
Conversation
This was referenced Oct 13, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 13, 2026
The constrained margin scroll test prepends a 300 px scroller, then assumes its new target is visible. In [main CI run 38392091985](https://github.com/max-sixty/leaf/actions/runs/38392091985), browser scroll anchoring left the target and its correctly aligned margin row at `top: -106`; the visibility assertion failed before the test made its first inner scroll. This change brings the new target into view after rendering, then checks the same margin alignment and visibility through every scroll step. The `sticky-ancestor` case failed on current `main` before the change. After it, all three constrained-position cases passed locally (`uv run pytest -q -n0 'tests/browser/test_render_margin.py::test_observed_scroll_retains_the_seat_of_a_constrained_target'`). The run's other failures have separate repairs in #2748, #2749, #2752, and #2753. Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 14, 2026
…in pages (#2850) `pnpm run check:browser` now type-checks `leaf.js`, the kernel's `widgets/`, and every bundled package's `initial.js` and widget modules under the same non-strict `checkJs` program #2803 added for the runtime. Pages no longer carry `vendor/browser-runtime.d.ts`: the build stops generating it, and a freshly vendored page (`leaf page init --package diff --package playwright`) has no `.d.ts` file. ## How the framework's types reach the check now The generated declaration file sat beside `vendor/browser-runtime.js` so that tsc would prefer it over the compiled, type-blanked facade. Since it lived in the layer's `vendor/`, `leaf page init` copied it into every page. Instead: - `build/browser/tsconfig.json` holds one `paths` map, which `tsconfig.runtime.json` now `extends`. It resolves the rooted paths a page serves, including each package's `vendor/` and `widgets/`, and maps `/vendor/browser-runtime.js` to `index.ts`. - `paths` applies only to non-relative specifiers, so the 39 runtime modules (and `leaf.js`) that imported the facade as `../vendor/browser-runtime.js` now import `/vendor/browser-runtime.js`. That was already the convention: four runtime modules used it, and `layer_import_map` says every layer module names its dependencies by rooted path. The import map, export, kernel bundle and Node test hooks all resolve it already, and a probe of `pr-walkthrough` boots with no errors. - A relative facade import would silently type against the blanked facade, so the runtime's ESLint ownership rule (`semanticStoreOwnershipRule`) now refuses one, with a test in `build/browser/architecture.test.mjs`. - The build's diagnostic filter drops diagnostics in each package's `vendor/` as well as the layer's. ## What the wider check found - **Dead wiring:** `leaf.js` passed `foldMarginEntryOptions` and `unfoldedMarginEntries` to `createReactionController`, which stopped reading them in #2753; the overlay no longer exports either, so both were always `undefined`. Removed, with the stale field in `tests/runtime/reactions.test.mjs`. - **Wrong declarations, corrected at their owner:** `claimTraversals` declared that a claim receives a string, but it receives the traversal's `URL` (`lf-tabs` reads `url.hash`). `readDiffCoordinate` now declares the coordinate it returns. - `lf-trace` used `peer?.#bookmarks`. tsc refuses that as a grammar error (TS18030), which stopped the whole program, so it now reads `peer && peer.#bookmarks`. - Web Awesome's `wa-comparison` and `wa-radio` declarations join the program, so `offer()` and `createElement` type those controls. The rest are JSDoc casts and parameter types. I found no behavior bug. ## Checks `pnpm run check:framework` (browser build check, including both type programs, plus 110 Node tests) and `pnpm run test:runtime` (470 tests) pass. Focused pytest on `test_unused_exports.py`, `test_interact_document.py`, `test_interact_layer.py`, `test_distribution.py` and `test_module_url_delivery.py` passes (440 tests), as does pre-commit, including ESLint over every runtime module. An error injected into a package widget fails `check:browser`. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
Reaction mode now borrows a margin disclosure through the projection that owns it. The projection closes any thread preview before recording the prior fold, then returns a release operation that restores that fold only while reaction mode still owns it. This prevents an empty, expanded cluster after the temporary choices disappear and keeps a fold the user opened for themselves.
The two reported browser tests failed on
mainbefore this change and pass with it. The nearby reaction and panel browser checks pass, as doespnpm run test:runtime(406 tests).Closes #2750 — automated triage