fix(client): persist manual session order across refreshes - #169
Merged
Conversation
Dragging a session row switched sessionSortMode to 'manual' (persisted) but the order itself was stripped from persistence, so every refresh reverted the list while leaving the user stuck in manual mode with an empty order. Persist manualSessionOrder alongside the mode; stale ids are already pruned on session kill and ignored by sortSessions. Fixes #157
Merged
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.
dsfaccini
pushed a commit
to dsfaccini/agentboard
that referenced
this pull request
Jul 27, 2026
Fixes gbasin#157. Dragging a session row flips `sessionSortMode` to `'manual'` — which **is** persisted — but the order array itself was stripped from persistence by a `partialize` in the settings store ("session-only state"). Net effect: every refresh reverted the list to an empty manual order, exactly as reported. Removes the `partialize` exclusion so `manualSessionOrder` persists to localStorage alongside the mode. Stale ids in a persisted order are harmless: `sortSessions` sends unknown keys to the end (sorted by createdAt), and kill-time pruning of the order array already exists. Playwright against an isolated instance: drag changed DOM order (gamma,beta,alpha → alpha,gamma,beta), reload reverted it; localStorage showed `sessionSortMode: "manual"` persisted while `manualSessionOrder` was absent. - `setManualSessionOrder` writes the order into persisted settings (fails on master) - persisted order + manual mode rehydrate into the store `bun run lint && bun run typecheck && bun run test` green.
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 #157.
What
Dragging a session row flips
sessionSortModeto'manual'— which is persisted — but the order array itself was stripped from persistence by apartializein the settings store ("session-only state"). Net effect: every refresh reverted the list to an empty manual order, exactly as reported.Removes the
partializeexclusion somanualSessionOrderpersists to localStorage alongside the mode. Stale ids in a persisted order are harmless:sortSessionssends unknown keys to the end (sorted by createdAt), and kill-time pruning of the order array already exists.Replication (before this change)
Playwright against an isolated instance: drag changed DOM order (gamma,beta,alpha → alpha,gamma,beta), reload reverted it; localStorage showed
sessionSortMode: "manual"persisted whilemanualSessionOrderwas absent.Tests
setManualSessionOrderwrites the order into persisted settings (fails on master)bun run lint && bun run typecheck && bun run testgreen.