COD-139 add session pinning (float pinned sessions to top of session manager list)

Pin/unpin a session via POST /api/sessions/:id/pin {pinned}; pinned sessions
sort above unpinned in the unified session manager list (COD-121), ordered by
pinnedAt descending. Pin state lives on SessionState, persists to state.json,
and survives reload/reconnect/restart (persisted-input carries pinned; the
merge skips undefined so a recovered live session can't clobber it). New SSE
event session:pinned re-sorts the open list live across clients. Pin/Unpin
affordance in the session-row kebab menu with a 📌 glyph + amber highlight.

(cherry picked from commit 82749747039afcd4a3104f6a97ce7d3c2ddd048d)
This commit is contained in:
Aamer Akhter
2026-07-17 16:25:29 -04:00
parent 8807b3ff6d
commit 5792c2d62e
13 changed files with 413 additions and 3 deletions
+19
View File
@@ -2794,6 +2794,25 @@ body.touch-device .terminal-container .xterm .xterm-helper-textarea {
background: rgba(255, 255, 255, 0.05);
}
/* COD-139: pinned sessions float to the top with a subtle accent highlight. */
.history-item.is-pinned {
border-color: rgba(245, 158, 11, 0.35);
background: rgba(245, 158, 11, 0.08);
box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.7);
}
.history-item.is-pinned:hover {
border-color: rgba(245, 158, 11, 0.5);
background: rgba(245, 158, 11, 0.12);
}
.history-item-pin {
margin-right: 0.35rem;
font-size: 0.75rem;
line-height: 1;
vertical-align: baseline;
}
.history-item-main {
display: flex;
align-items: center;