Repository navigation
fix(threads): attach expanded activity to its row - #491
Merged
Merged
Conversation
nixuuu
force-pushed
the
fix/timeline-expanded-rows
branch
from
November 10, 2026 12:42
369c197 to
da47d52
Compare
This was referenced Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
## Problem In Settings → Scheduled tasks, collapsing a task's details (the "N runs" disclosure) cleared the content at once and left a blank band. The rows below then snapped up instead of easing. The user's 120 fps recording shows the clip shrinking far faster than the row box. ## Cause `expandGrid` (motion.ts) tweened `grid-template-rows: t fr` on the wrapper. In an auto-height grid, Chromium sizes the wrapper to t × content but the `t fr` track (the clipping child) to t² × content. Measured in headless Chromium at t = 0.5: wrapper 84 px, clip 42 px. Content vanished early, and the leftover band snapped shut when the element unmounted. Expanding had the same mismatch in reverse. ## Fix - `expandGrid(node)` tweens the wrapper's measured height (`--duration-fast`, `--ease-smooth-out`, with a fade), and the `1fr` track follows it exactly (verified: wrapper = clip at every step). The height comes from the clipping child's `scrollHeight`, so a toggle reversed mid-way keeps its scale. Reduced motion stays instant. The grid mode of `Disclosure` (activity frames) gets the same fix. - The schedule row body is now a flex column, and the details wrapper cancels its 2 px gap (`-mt-0.5` / `pt-2.5`), so nothing moves at either end of the motion. A grid row would clamp the negative margin. The final layout is unchanged. - Mobile: details used to mount at full height in one frame. A new shared `ui/Accordion` (measured height + fade on `fast`, the same both ways, instant with reduced motion) makes the cards below glide. JS only; the runtime fingerprint is unchanged, so it ships OTA. Fixes: #694 Related: #491 ## Checks - `bun install`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check`: clean - web build: passed; `expo export` iOS + Android: passed; fingerprint sources contain none of the changed files - Browser review on an isolated stack: built web, fixture schedules, Chromium via Playwright, sampled every animation frame: - Before: on collapse the clip fell far behind the wrapper, leaving a blank band, then the rows snapped. - After, collapse at 1440 px light: wrapper = clip on every frame (246 → 174 → 81 → 32 → 11 → 3 → 0 px), next row 525 → 279 px, no step at mount or unmount. Expand mirrors it. - After, 390 px dark: the same (298 → 0 px). - With `prefers-reduced-motion: reduce` it is instant both ways. - Pre-existing and unrelated: an intermittent `Cannot read properties of undefined (reading 'component')` in SvelteKit's client router on the first navigation. It reproduces on plain `dev` (4397875) in the same stack. - Mobile: typecheck and export pass; not checked on a device. ## Copy audit (§8) No UI text changes.
nixuuu
added a commit
that referenced
this pull request
Nov 27, 2026
## Problem
Collapsing an expanded tool group ("Ran 1 command") glitched: in the
first frame the rows under the header jumped down by the fold gap (12 px
at the end of a fold, 4 px inside it), detached from the header as a
separate block, and only then shrank. The content below jumped down too
before collapsing.
Cause: an open group's header had no bottom gap (its rows hang right
under it), a closed one gets the fold's gap. That gap appeared at once
while the rows were still animating out.
## Fix
- `feed.ts`: an open group's header is marked like a closed one, so it
keeps one gap in both states; the group's first row is marked `lead`.
- `FeedRowView.svelte`: the `lead` row is drawn up into the header's gap
(`-mt-3` / `-mt-1`, `-mt-3` in fork history). The open group looks the
same as before; toggling no longer changes the header's height.
- `motion.ts` / `VirtualRow.svelte`: exiting feed rows clip only their
bottom edge (`expand` option `overhang`), so the drawn-up part stays
visible until the row is gone.
- `docs/timeline-folding.md` updated.
## Verification (local)
Per-frame measurement on `/dev/long-thread` in Chrome (with a temporary
local harness, not committed):
| | Row top vs header | Content below |
|---|---|---|
| Before | jumps 0 → 12 px | 116 → **128** → 12 |
| After | 0 px every frame | 116 → 12, monotonic |
Also checked: a group inside a fold (4 px gap), a single-row group,
opening (header does not move), and slowed-down frames (rows fold up
under the header). `apps/web` typecheck, lint of the edited files and
the feed tests (`work-tool-groups`, `feed-prefix`, `work-fold-state`,
`steer-folds`, `notice-folds`, `work-history-gaps`) pass locally; the
rest is left to CI.
Not changed: mobile, which has its own disclosure.
Copy audit (docs/copy.md §8): no UI text changed.
Related: #491
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Expanded tool details previously appeared as disconnected boxes below their tinted trigger. Put the rail and neutral surface around the trigger and body, with a consistent inner inset. Tool groups continue that surface across independently virtualized rows; their children use indentation rather than additional activity boxes. Thoughts use a quieter attached surface, and failed activity keeps its neutral background.
Individual web disclosures animate a grid track from
0frto1frusing the existing motion tokens, with matching corner transitions and immediate reduced-motion behavior. Group row entrances retain their final measured heights to preserve virtual-feed anchoring. Closed details still unmount; existing keys, remembered expansion and row memoization are preserved. Expanded commands expose the full command, including long single-line commands, in a contained scroll area.Mobile mirrors the structure using JavaScript-only changes and retains its anchored toggles.
Fixes: #473
Validation:
bun install --frozen-lockfile,bun run gen:check,bun run typecheck,bun run lint,bun run format:check, and the web build.bun test apps/web/test/work-fold-state.test.ts. No UI tests added or run; the full integration/temp-cleanup suite remains a CI gate.[email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactive: iOS6ddec9ef559ee0095ac33e94ff9418a942053b17, Android5f6eae3ab278f1cd543e9ed763f923a319b65ec9, both unchanged. Native device visuals were not checked.Copy audit: no copy changes.