diff --git a/src/client/sidebar.module.css b/src/client/sidebar.module.css index e0b9852..a112375 100644 --- a/src/client/sidebar.module.css +++ b/src/client/sidebar.module.css @@ -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); } diff --git a/src/index.ts b/src/index.ts index cfdfe46..f5362ab 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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. */ diff --git a/src/pty-manager.ts b/src/pty-manager.ts index 0b0a068..93a56f5 100644 --- a/src/pty-manager.ts +++ b/src/pty-manager.ts @@ -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)