Repository navigation
Count a capped overlay stack by what it reads, not by how the cap is spelled - #9253
Merged
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…spelled Three tests assert every bottom-right overlay stack caps itself, and counted the literal `maxHeight: stack.maxHeight` in provider.tsx to do it. #9246 keeps the cap but wraps it -- `maxHeight: railMaxHeight(stack.maxHeight)`, which is the same value plus a constant gutter so the rail's overflow clip stops slicing the shadow off its bottom card -- and all three went red against a PR that had not removed a single cap. The tests are right about what they care about and wrong about how they check it. This file already made the same mistake once and fixed it the same way; the comment two lines below one of these assertions says so: Counted by the layer they sit on, not by a literal z-index: the overlay rail reads its depth from Z_LAYER now. _capped_stacks matches the cap being DERIVED from stack.maxHeight, through an optional wrapping call. That still fails on everything the count was protecting, verified by mutation: the cap dropped entirely, the cap hardcoded to a number so it no longer tracks the measurement, and only one of the two stacks capped -- the exact bug the "== stacks" comparison exists to catch. #9246's wrapped form passes, and its branch goes from 3 failures to 187 passed with this test alone swapped in. Nothing about the assertions' subject changes. A cap that stops reading stack.maxHeight still fails.
danielhanchen
force-pushed
the
fix-overlay-cap-guard
branch
from
August 19, 2026 05:03
0e14b3d to
d17e89f
Compare
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.
Three tests in
test_update_release_notes.pyassert every bottom-right overlay stack caps itself, and counted the literal stringmaxHeight: stack.maxHeightinprovider.tsxto do it.#9246 keeps the cap but wraps it:
railMaxHeight(cardsRoom)returnscardsRoom + STACK_SHADOW_GUTTER— the same measured cap plus a constant, so the rail's overflow clip stops slicing the shadow off its bottom card. All three tests went red against a PR that had not removed a single cap.The tests are right about their subject and wrong about their method
This file already made this mistake once and fixed it the same way. The comment sits two lines above one of the failing assertions:
_capped_stacks()now matches the cap being derived fromstack.maxHeight, through an optional wrapping call. Nothing about what the assertions are about changes: a cap that stops readingstack.maxHeightstill fails.Mutation-checked
railMaxHeight(stack.maxHeight)600, no longer tracking the measurementThat last one is the exact bug the
== stackscomparison exists to catch, and it still does.Verification
tests/studio4249 passed.#9246 needs no change; it goes green once this lands and it rebases.