mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
a28d5a4b9fcf4e303c224f2476d9675c402e741e
* fix: sidebar highlight pill follows active session after list re-sort When the session list re-sorts (e.g. because updateSession bumps updatedAt), the active SidebarChatRow moves to a new DOM position but the highlight pill stays at its old pixel offset. This happens because the SidebarChatRow effect that re-measures position depends on [activeRef, isActive] — neither of which changes on a re-sort. Fix: compute a listOrderKey (joined session IDs) that changes whenever the list order changes, and include it in the activeSessionRefCallback and activeProjectRefCallback dependency arrays. This makes the callback a new reference on re-sort, which triggers SidebarChatRow's existing effect to re-fire and re-measure the highlight position. * fix: use MutationObserver for layout-driven highlight remeasurement Replace the listOrderKey workaround with a MutationObserver in useSidebarHighlight that watches for any DOM subtree changes in the nav container. This handles all cases where the active row's pixel position changes: list re-sorts, project expand/collapse, filtering, and show-more toggles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: debounce MutationObserver callback with requestAnimationFrame Wrap the MutationObserver callback in rAF to measure after the browser has completed layout, avoiding stale geometry from pre-layout reads. The trailing rAF also coalesces rapid-fire mutations into a single measurement, preventing redundant intermediate renders. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
Languages
Rust
63.6%
TypeScript
29.6%
JavaScript
1.7%
Shell
1.6%
Python
1.5%
Other
1.8%