Skip to content

Read the banner and bottom band once in geometry.js, and keep a thread card in the visible viewport - #1251

Merged
max-sixty merged 1 commit into
mainfrom
agent-a6d9862eab866454f
Sep 27, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-a6d9862eab866454f

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

How much of the window the page shows was measured at each site that needed it. key-badge-placement.js (chromeTop), margin-projection.js (threadCardBoundary), composing/surface.js (floatBoundary, BANNER_CLEAR = 48), reading-place.js and design.js each read the banner's box, and the thread card and the composer each filtered the bottom chrome. The composer and the thread card applied one rule written twice, and only the composer clamped to the visual viewport (#923).

geometry.js now owns the reading. banner.js declares the banner (declareBanner) and keyboard/shortcut-bar.js declares the bottom band's boxes (declareBottomBand). bannerFoot() is where the room starts, and shownWindow({ within, gap }) is the visual viewport less the banner and the bottom-band boxes across its width, narrowed to a caller's box. The composer, thread card, key badges, target chooser, hint map, design legend and reading place all read from these, and chromeTop, BANNER_CLEAR and the banner/bottomChromeBoxes wiring into the response surface and margin projection are gone.

Behaviour that moved:

  • A thread card now stands inside the visual viewport, and re-places when pinch zoom or a phone's software keyboard resizes or scrolls it. Before this change a card low in the window kept its reply editor under the shrunk viewport, at a desktop and a phone width alike (test_a_thread_card_reply_stays_in_the_visible_viewport, which fails on the base at both widths).
  • The composer inside a reading region now also clears the banner and the bottom band. Before, a region's shown box replaced those edges rather than being intersected with them.
  • The composer's gap below the banner is 8px, where it was 6px, and the fixed 48px floor is gone.
  • bringForward treats a target as hidden when its bottom is above the banner's actual foot, rather than above 48px. On a phone the banner is 88px.
  • The reading place (blocksOnScreen) reads the visual viewport and stops at the bottom band, where it used to read to innerHeight.

🤖 Generated with Claude Code

…d card in the visible viewport

How much of the window the page shows was measured at each site that needed it. `key-badge-placement.js` (`chromeTop`), `margin-projection.js` (`threadCardBoundary`), `composing/surface.js` (`floatBoundary`, `BANNER_CLEAR = 48`), `reading-place.js` and `design.js` each read the banner's box, and the thread card and the composer each filtered the bottom chrome. The composer and the thread card applied one rule written twice, and only the composer clamped to the visual viewport (#923).

`geometry.js` now owns the reading. `banner.js` declares the banner (`declareBanner`) and `keyboard/shortcut-bar.js` declares the bottom band's boxes (`declareBottomBand`). `bannerFoot()` is where the room starts, and `shownWindow({ within, gap })` is the visual viewport less the banner and the bottom-band boxes across its width, narrowed to a caller's box. The composer, thread card, key badges, target chooser, hint map, design legend and reading place all read from these, and `chromeTop`, `BANNER_CLEAR` and the `banner`/`bottomChromeBoxes` wiring into the response surface and margin projection are gone.

Behaviour that moved:

- A thread card now stands inside the visual viewport, and re-places when pinch zoom or a phone's software keyboard resizes or scrolls it. Before this change a card low in the window kept its reply editor under the shrunk viewport, at a desktop and a phone width alike (`test_a_thread_card_reply_stays_in_the_visible_viewport`, which fails on the base at both widths).
- The composer inside a reading region now also clears the banner and the bottom band. Before, a region's shown box replaced those edges rather than being intersected with them.
- The composer's gap below the banner is 8px, where it was 6px, and the fixed 48px floor is gone.
- `bringForward` treats a target as hidden when its bottom is above the banner's actual foot, rather than above 48px. On a phone the banner is 88px.
- The reading place (`blocksOnScreen`) reads the visual viewport and stops at the bottom band, where it used to read to `innerHeight`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit a618ac1 into main Sep 27, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-a6d9862eab866454f branch September 27, 2026 00:04
max-sixty added a commit that referenced this pull request Sep 27, 2026
The concept survey's drifted duplicates now each have one owner
(#1214–#1221, #1223, #1228, #1231, #1235, #1244, #1245, #1247, #1250,
#1251, #1254, #1260), so the survey note never lands. What it found and
nobody has taken becomes `TODO.md` entries:

- **Shared definitions** (new section under Next): re-addressing
resource references in one pass instead of `http.py`'s regex scopers and
three head composers; `tests/render_harness.py` `told()` beside
`pageReadiness`'s `data` and `log` stages (#1250), which answer the same
question; Python still naming a thread's identity a root
(`thread_roots`, `FrozenThreadReading.roots`) now that the runtime keys
threads on the served `id` (#1260).
- **Requests**: the existing "Decide whether requests earn their weight"
entry now says kept requests need one owner for seat availability, which
four runtime modules restate.
- **Implementation candidates**: the unresolved-gesture ledger as one
state machine, deferred until a change has to touch it, since nothing
there has drifted and it is the hottest race path.

The survey's small undrifted items and its list of deliberate splits are
dropped: none has drifted, and the splits are intended.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants