Skip to content

fix(client): snap session rows on auto-resort instead of animating - #170

Merged
gbasin merged 1 commit into
masterfrom
fix/snap-auto-resort
Jul 24, 2026
Merged

fix(client): snap session rows on auto-resort instead of animating#170
gbasin merged 1 commit into
masterfrom
fix/snap-auto-resort

Conversation

@gbasin

@gbasin gbasin commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Fixes #159.

What

The reporter's screenshot shows two sessions' names character-interleaved in a single row. Replicated: with status-based sorting, a status flip (e.g. a session going working↔waiting as you click around) triggers a framer-motion layout animation that slides rows through each other — a frame capture caught two rows' text overlapped mid-flight, matching the screenshot. Transient on Chromium; on a browser where the layout animation stalls (the component already carries a Safari fallback for exactly that), the overlap sticks.

Per the maintainer's call: auto-resorts now snap instead of animating.

  • Remove the per-row framer layout prop and the layoutAnimationsDisabled plumbing that existed only to fence it off during drags.
  • AnimatePresence switches popLayoutsync: without sibling layout animations, popLayout would overlap an exiting row with the row snapping into its place; sync collapses the exiting row in flow (exit already animates height: 0).
  • Drag previews still animate via dnd-kit transforms; enter/exit animations unchanged.

Verification

Frame-capture harness (60ms interval) against an isolated instance, status sort, forced status flip while clicking another session:

  • Before: intermediate frames show two rows' text overlapped.
  • After: order changes atomically between consecutive frames; zero overlap frames. Drag reorder still works.

bun run lint && bun run typecheck && bun run test green.

Framer-motion layout animations slid rows through each other during
status/activity-driven resorts, transiently rendering two sessions'
text overlapped in one row — and stuck that way on browsers where the
layout animation stalls. Remove the per-row layout animation so
auto-resorts snap; drag previews still animate via dnd-kit transforms,
and enter/exit animations are unchanged. AnimatePresence switches from
popLayout to sync so an exiting row collapses in flow instead of
overlapping the sibling that takes its place.

Fixes #159
@gbasin
gbasin merged commit 90b1d0a into master Jul 24, 2026
6 checks passed
@gbasin
gbasin deleted the fix/snap-auto-resort branch July 24, 2026 01:28
@gbasin gbasin mentioned this pull request Jul 24, 2026
gbasin added a commit that referenced this pull request Jul 24, 2026
Bumps version to 0.4.5. Included since 0.4.4:

- fix(terminal): read pty client identity via list-clients instead of
display-message -c (#165) — fixes #161 and the tmux 3.2a failure in #156
- fix(terminal): paste into the session the pty client is attached to
(#166)
- feat(settings): runtime toggle for prefer-window-name (#167)
- fix(client): persist manual session order across refreshes (#169) —
fixes #157
- fix(client): snap session rows on auto-resort instead of animating
(#170) — fixes #159

Merging triggers the tag + release workflow.
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.

Clicking a different chat icon to switch --> triggers view corruption (0.3.3)

1 participant