merge #130: drag-release bounce, session-delete terminal cleanup, silent resize (chalei1122-cell)

# Conflicts:
#	src/client/Sidebar.tsx
This commit is contained in:
HuanLinOTO
2026-08-24 01:33:44 +08:00
3 changed files with 17 additions and 4 deletions
+4 -4
View File
@@ -182,7 +182,7 @@
}
.panelResizeActive {
background: var(--dsw-alias-interactive-bg-hover-accent);
/* Drag feedback disabled by local preference: no highlight while resizing. */
}
.panelBody {
@@ -267,7 +267,7 @@ body[data-dsh-sidebar-dragging] .bottomPanel {
}
.bottomResizeActive {
background: var(--dsw-alias-interactive-bg-hover-accent);
/* Drag feedback disabled by local preference: no highlight while resizing. */
}
/* The bottom panel's close control: the app's icon-button pattern (28px
@@ -504,8 +504,8 @@ body[data-dsh-sidebar-dragging] .bottomPanel {
touch-action: none;
}
.cornerHandle:hover,
.cornerHandle[data-dragging] {
.cornerHandle:hover {
/* Only hover feedback stays; dragging highlight disabled by local preference. */
background: var(--dsw-alias-interactive-bg-hover-accent);
}
+7
View File
@@ -935,6 +935,13 @@ export function apply(ctx: Context, config?: SidebarConfig): void {
wss.close()
agentListWss.close()
}, 'dsh-better-sidebar: teardown')
// Close all UI terminals of a session when the conversation is deleted —
// terminals follow the session, not the reconnect grace. Agent terminals
// are owned by the agent lifecycle and are not touched here.
ctx.on('session/disposed', (session) => {
try { ptyManager.closeSession(session?.id) } catch {}
}, { global: true })
}
/** Push the live agent-terminal list for one session to a connected sidebar view. */
+6
View File
@@ -243,6 +243,12 @@ export class PtyManager {
}
}
/** Close every terminal of one session (the conversation was deleted —
* terminals must follow the session, not linger until the grace expires). */
closeSession(sessionId: string): void {
for (const key of this.keysOf(sessionId)) this.close(key)
}
/** Close every terminal (plugin teardown). */
disposeAll(): void {
for (const timer of this.pendingCloses.values()) clearTimeout(timer)