Scope measured-height vars to each chat surface - #71840
Merged
Merged
Conversation
The composer and the out-of-flow status stack published their measured heights onto document.documentElement, but both components mount once per chat surface. Session tiles render a full ChatView beside the workspace pane, so N surfaces raced for one value: a background tab with a tall status stack inflated the foreground thread's bottom clearance and pushed its jump-to-bottom button into mid-screen. Whichever surface unmounted last also cleared the var for everyone still showing. Publish onto the surface's own root instead, and re-declare the clearance calc there — `:root` substitutes the root measurements once, so scoping only the inputs would leave every thread reading the same value.
Contributor
૮ >ﻌ< ა ci reviewran on e7f4b95 ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job1 visual diff. inline evidence is publishing... |
Fold the null fallback into chatSurfaceRoot so both callers share one target resolution, hoist the var names next to it, and drop the duplicated rationale from the status-stack comment.
OutThisLife
enabled auto-merge
July 26, 2026 08:26
1 task
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…ck-scope Scope measured-height vars to each chat surface
33hodl
pushed a commit
to 33hodl/hermes-agent
that referenced
this pull request
Aug 12, 2026
…ck-scope Scope measured-height vars to each chat surface
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 thread's bottom padding could balloon and the jump-to-bottom button drift into mid-screen, driven by a chat you weren't looking at.
The composer and the out-of-flow status stack each publish a measured height so the thread can reserve clearance for them. Both wrote to
document.documentElement— one global slot — while the components writing them mount once per chat surface. Session tiles render a full ChatView (thread, composer, status stack) beside the workspace pane, so several surfaces competed for the same value and the tallest background stack won. Unmount made it worse: whichever surface tore down last cleared the var for every surface still on screen.Each surface now publishes onto its own root and reads its own measurements through normal inheritance. The clearance
calcis re-declared per surface as well —:rootsubstitutes the root values once, so scoping only the inputs would have left every thread resolving the same number. A composer rendered outside a chat surface (the popped-out window) still falls back to the document root.Remeasuring on session switch can't solve this: multiple surfaces are visible simultaneously, so there is no single correct value to remeasure to.
Verified by reverting to the global write and re-running the new tests: 3 of 4 fail there, all 4 pass here.