Repository navigation
fix(web): keep thread content still while the composer folds - #756
Merged
Merged
Conversation
The thread reserves the composer's full height plus a 40 px margin, so the composer folds and opens inside that space without moving rows. The fold now follows the reader's scroll instead of toggling. Related: #738
nixuuu
force-pushed
the
fix/web-composer-scroll-reserve
branch
from
November 14, 2026 20:57
823a33c to
b2e8615
Compare
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
The fade above the composer now starts right at the composer's visible edge instead of above the whole footer shell. Before, the shell (including the reserved strip above the composer) was solid surface and the gradient began only above it, so "Jump to latest" sat on a solid band with the gradient starting behind it. Now the solid surface covers only the area below the visible edge (`--feed-edge`, measured by `footer-edge.ts`), and a 4 rem gradient rises from that edge, so the button sits on the colour transition — the fade reads as the composer's shadow. - The gradient follows the composer's visible edge in every state (compact, expanded, drafts tab/panels), since `--feed-edge` already tracks it per frame. - Colour unchanged: `surface` → transparent (#750). Related: #750, #756 Checked on the `/dev/long-thread` route in Chromium, dark and light, scrolled up with Jump to latest visible. Checks: format:check, lint, web typecheck.
nixuuu
added a commit
that referenced
this pull request
Nov 15, 2026
## Change Running many threads made each renderer fetch background history and repeatedly reload panels and PR lists. The BFF now materializes overview, thread metadata and settings from one owner/target-scoped `WatchOverview`, shares loaded read models and pushes complete projections over SSE. Ready-key lookup is O(1); response encoding and list traversal still scale with response size. - Move bounded history warming to the BFF and remove renderer `/warm` requests and panel/PR polling. Visible history and older pages remain on demand. - Share and reactively refresh panels, PR lists, proxies, model catalogs, bots and updates. Bound caches/queues and fence old results across reconnects, sharing resets and target changes. - Allow independent diagnostics sessions with browser/BFF submission cooldown, accept GitHub avatar version hashes, and keep infinite decorative animations out of composer transition controls. - Update the affected Polish architecture, API, performance, diagnostics, connector and GitHub docs. ## Verification - After rebasing onto current `dev`: 17 real-gRPC BFF integration tests / 100 assertions passed through `check:tmp`; temporary directory clean. Web and integration-package typechecks and test-shard ownership check passed. - Earlier focused checks passed for diagnostics, avatars/panels, shared-query invalidation/projection races, gateway/mobile/domain typechecks, and edited-file lint/formatting. - Inspected light/dark at desktop and phone widths. Reconnect recovery and rapid thread navigation worked without page errors. - Isolated browser probe with 12 synthetic thread submissions: the observed renderer issued 3 HTTP requests over 12.1 seconds, with no `/warm`, panel or PR-list requests. This is a synthetic sample, not a production percentile. - No user-facing copy changed. Full generated-code checks, repository-wide checks, remaining test shards and builds are left to CI. Fixes: #623 Fixes: #569 Fixes: #756
This was referenced Nov 16, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 26, 2026
## Change - Determine summary docking and the side panel's placement from their target widths. Use ResizeObserver data for the live floating-summary breakpoint. Keep the existing CSS transitions for the sidebar, side panel and summary. - Prepare the composer's paused transitions once per scroll segment. Subsequent frames only seek those transitions to the current scroll progress. ## Verification - Headless Chromium with a seeded Canopy workspace. Six sidebar toggles produced 1,029 geometry reads on the observed columns before the change and zero after. Width samples matched. The p95 requestAnimationFrame interval was 16.7 ms in both versions. - A controlled Chromium composer comparison matched all 25 samples, including reversal and settlement. Animation pause calls fell from 63 to 18 with the same number of seeks. Checked folding and reopening in the live workspace. - Checked the summary and side panel at 1,440 px and 410 px, and confirmed navigation restores each thread's panel state without a grid transition. - Web typecheck, lint on changed code, and diff checks passed locally. Repository-wide verification runs in CI. Frame presentation in Electron at 120 Hz remains unmeasured. Refs: #755 Refs: #756 Related: #1294
nixuuu
added a commit
that referenced
this pull request
Nov 27, 2026
## Problem - Opening a composer tray (tasks, subagents, queue, goal details) moved the whole thread up with it. Closing the tray snapped the thread back down. - After the composer shrank, up to ~120 px of empty space stayed between the last message and the composer. This happened after sending a multi-line draft, or when a strip above the composer went away. ## Cause Both problems come from the feed's end reserve (`footer-reserve.ts`), introduced in #756: - **Tray jump.** The reserve counted an opening tray's height. It grew every frame and pinned a reader at the end, so the rows moved with the tray. When the tray closed, the reserve shrank in one step and the rows jumped back. - **Gap.** The reserve shrank only when it was more than 2 × margin (80 px) too large. Any shrink under 80 px stayed on top of the 40 px margin. ## Changes - `footer-edge.ts`: footer content marked `data-feed-overlay` no longer counts towards the reserve. This covers every measurement: the first one, the ResizeObserver path and the settle path (`reserveHeight`). - `ComposerPanelBody` (tasks, subagents, queue) and the `GoalBar` details carry the marker, so these trays open over the thread. - Panel headers still count towards the reserve. - `footer-reserve.ts`: for a reader at the end, the reserve now shrinks with the footer frame by frame, the same way it grows. For a reader scrolled up, the reserve keeps the space until they follow the end again, as before. - Tray motion is unchanged: it already uses the motion tokens (open on `--duration-slow`, close on `--duration-medium`, `--ease-smooth-out`). - Comments in `footer-reserve.ts` and `motion.css` now describe the new behaviour. **Trade-off:** an open tray now covers the bottom of the thread instead of pushing it up. The tray is at most 20dvh. This is how the composer's own fold already behaves. ## Verification Tested in Chrome on the dev-only `/dev/long-thread` route with a temporary footer: a real `TasksPanel` above a resizable composer box, using the same `footerFit` as the thread page. The temporary changes are not in this PR. Positions were traced every frame: | Scenario | Before | After | |---|---|---| | Tray open, then closed (last row's top) | 636 → 543 px with the tray, then a jump to 627 px | stays at 636 px | | Composer grows by 64 px, then shrinks back (gap to composer) | 96 → 160 px | 96 px, rows glide down with the composer | | Reader scrolled up, composer grows and shrinks (row position) | — | stays at 259 px | - Local checks: `oxlint` on the edited files and `svelte-check` for `apps/web` both pass. - Left to CI: the full gate. - No test added: the repo rules exclude web UI tests. **Copy audit (docs/copy.md §8):** not applicable, no UI text changed. Fixes: #756 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
nixuuu
added a commit
that referenced
this pull request
Nov 28, 2026
Slow scrolling let the toolbar drift below the composer and made the shortcut hint add a whole line when reopening. A large wheel delta could switch the composer from 150 to 52 px in one frame. The toolbar now stays aligned with the primary action, and the shortcut hint folds with the editor. The fold tracks small scroll deltas and limits how far a large delta can move it per frame. Reversing a gesture continues from the current geometry. Pausing completes the nearer endpoint and scrolling back resumes from the distance where the composer folded. Fixes: #756 ## Verification - Exercised the thread page against a local gateway and scripted worker in Chromium at 1200 and 390 px. Checked slow scrolling, a pause inside the end zone, large wheel deltas, rapid reversals and Jump to latest. The toolbar stayed within the composer and the feed reserve stayed constant. - Checked that a multiline draft survives folding and expands on focus. With reduced motion, every sampled frame showed one of the two endpoint heights. - Web typecheck, targeted lint, formatting and diff checks passed locally. Repository-wide verification runs in CI.
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.
Fixes user feedback from the desktop app (nightly): when the composer switched between compact and full, the thread content moved on the Y axis together with the composer's animation.
Related: #738
Changes
1. A fixed end reserve. The space under the rows (the spacer in
VirtualFeed) is now the composer's full height plus a 40 px margin (Y). It is not the composer's current height.footer-motion.ts) is removed.footer-reserve.tsholds this logic. While compact, the full height is the last expanded height plus any growth in the compact state. A thread that reopens compact starts from the last full height measured.2. The fold follows the scroll.
composer-compaction.tsnow produces a progress value from 0 (full) to 1 (compact) instead of a toggle.composer-morph.tsflipscompactonce. It keeps the CSS transitions that the flip starts, pauses them, and seeks them to the progress: onecurrentTimewrite per frame, with linear easing while scrubbing. There is no JS layout and no per-frame read-after-write.scrollendafter every wheel notch), the nearer state finishes. Focus, typing and Jump to latest open the composer at the transitions' own pace.prefers-reduced-motion, the state switches only at either end, with no tween and no shift.3. Built on #750's
footer-edge.ts.watchFooterEdgeis now the single footer observer. It reports the visible edge (Jump to latest, fade) and the footer height (reserve).surface, and the button sits 8 px above the composer's visible edge, centred on the composer.ComposerFold(composer-fold.svelte.ts) wires these together for the thread page.docs/ui-scale.mddescribes the reserve and the scroll-linked fold.Measurements
These ran on the review host with the bench stack (
scripts/bench/client-stack.ts, 1000-turn synthetic thread) and Playwright Chromium. "Shift" is the per-frame movement of a visible row that the scroll does not explain: Δrow top + ΔscrollTop.Shift was 0 px in every phase at 1100×800 light, 1440×900 dark, 2560×1440 light and 390×844 dark, and with reduced motion.
Frame times (rAF intervals over the whole probe, ~670 frames):
Isolated long frames (33–117 ms) appear in both runs. A trace of repeated focus expansions showed no long task; the one-off is the first focus.
Anchoring (#750): "Jump to latest" is 8 px above the visible edge (7.6–8.4 px mid-scrub), 0 px off the composer axis, at 390, 1100, 1440 and 2560 in both themes. The fade colour equals the thread surface in both themes.
Streaming: send, queue a follow-up, attach a file and write a multi-line draft at the end (composer 238 → 461 px). The reader stays at the end through all of it; the composer folds and reopens mid-stream.
At 390 px, ending a turn with a steer can move the reader to the start of an answer taller than the visible area. This is the existing answer-start alignment: the threshold now uses the reserve, which is the real visible space at the end.
Not covered
No UI test suites added.
Checks
bun install,gen:check,typecheck,lint,format:checkand the web build pass (withnice, temp files in/var/tmp).Copy audit (§8)
No UI text changed.
docs/ui-scale.md(Polish) describes the reserve and the scroll-linked fold.Rebased on #755 (sidebar column in CSS)
#755 touched
motion.cssand the thread page too. There was no textual conflict and no overlap in behaviour. The footer sits inside.chat-column, so it moves with #755's CSS placement. The morph only captures transitions inside the composer's own subtree, so a sidebar toggle and a scroll-linked fold can't capture each other's animations.I re-ran the probe on the review host (bench stack, dev mode). It added a sidebar toggle in three states: pinned at the end, compact while scrolled up, and with a multi-line draft at the end. It also recorded the painted jump-button gap from a ResizeObserver created after the app's.
The same probe on plain
dev:The long frames on sidebar toggles in dev mode (150–517 ms) are identical on plain
devand on this branch.Checks after the rebase:
bun install,gen:check,typecheck,lint,format:checkand the web build pass.