tui: newly pinned sessions now append to the end of the list instead of jumping to the top

This commit is contained in:
Dax Raad 2026-05-15 23:57:40 -04:00
parent e36d6a0cbe
commit 042e6a5c86

View file

@ -457,7 +457,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
const exists = sessionStore.pinned.includes(sessionID)
const next = exists
? sessionStore.pinned.filter((x) => x !== sessionID)
: [sessionID, ...sessionStore.pinned]
: [...sessionStore.pinned, sessionID]
setSessionStore("pinned", next)
save()
})