Repository navigation
feat(ui): expose committed clipped layout widths - #24
Merged
Merged
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This was referenced Nov 9, 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.
Summary
Element.TrackLayoutWidth()andCommittedSpace.LayoutWidth()for non-scrolling boxes. Local-DIP client/content widths include padding, exclude borders, and preserve finite clipping constraints.scrollWidth.contentW, with a separate cache-input boolean. Existing scrolling metrics, dependencies and toolchain are unchanged. Document the downstream nowrap/nonshrinking-pill contract.Conflict resolution: ordinary merge of
mainatfc67c1f293461d4db5814c06a88125e34e6c1355into the original PR head6fe0971afd238172731757343d6082e130744ce0, producing420f520bffa776d0aa7838c0fafb1f8dac9795fd. The only textual conflict was two independent sections indocs/ui/migration.md; both are retained. Regenerated the UI facade and migration API index from the combined source. Navigation registration, its event-only cache classification, width tracking and its layout-cache input all remain. No feature redesign, dependency changes or rewritten history.Testing
CGO_ENABLED=0 go test -count=1 -timeout 20m -exec <owned-domain-wrapper> ./...passed.MYGO_E2Ewas absent in every child. Darwin tests run in the previously verified synthetic bundle, with a pre-main bundle-ID guard; isolatedTestLocalesalso passed. The former baseline locale failure is fixed by fix: keep Darwin preferred languages global #25, now included frommain.TestNavigationKeysRespectFocusedChildAndNearestOwner,TestCommittedLayoutWidth,TestLayoutInputs,TestLayoutCacheMatches,TestLayoutCacheReuses,TestLayoutCacheInvalidates). Race tooling usesCGO_ENABLED=1; production builds and ordinary tests remain cgo-free. No test assertions were changed for this merge.go generate ./uiand existingTestUIAPIpass; a second generation preserved the facade/index byte-for-byte.gofmtand both staged/unstaged whitespace checks passed.CGO_ENABLED=0 go build ./...,go vet ./..., andgo vet -tags mygo_noinspector ./...passed for macOS/arm64, Linux/amd64+arm64 and Windows/amd64+arm64. JS/wasm source-package build/vet passed, excluding the CLI and test-only packages.bun install --frozen-lockfile,bun run build,bun run test(251 tests) andbun run typecheckpassed.Release sizes against current
main(fc67c1f2), identical Go 1.27.3,CGO_ENABLED=0,-buildvcs=false -trimpath -tags mygo_noinspector, production linker flags (-s -w, plus-H=windowsguion Windows):This is not fully size-neutral. Fresh unstripped
-dumpdep/nmcomparisons showcomputeBox → (*node).keepLayoutWidth(208 bytes on macOS ARM64; 384 bytes on Windows AMD64), plus growth ofcomputeBox(32/64 bytes) andsameLayout(32/32 bytes), symbol/type metadata and final-file alignment. No new library/dependency or registry is introduced.Tested on:
AI disclosure
Link to Devin session: https://app.devin.ai/sessions/79be43a0fc7b4ee3b783fa85566b6c1d
Open in Devin Desktop: https://app.devin.ai/desktop/session/79be43a0fc7b4ee3b783fa85566b6c1d?variant=devin
Requested by: @tiensonqin