Skip to content

Hide "Release" button for UI-created sessions #150

Description

@rado0x54

Bug

In the sidebar, sessions created from the web UI show a Release button alongside Close. Clicking Release appears to do nothing — a hard refresh brings the Release button right back, indicating the backend never relinquished control.

This appears to align with backend behavior: UI clients default to control mode on attach (src/server/ws-message-router.ts:58-63), so "releasing" a UI session has no meaningful effect for that client.

Expected

The Release button should not be rendered for UI-created sessions (source === "ui"). Release/Take Control only makes sense for sessions whose primary controller is an MCP/SSH client and the UI is observing.

Repro

  1. Create a session from the web UI.
  2. In the sidebar, click Release on that session.
  3. Hard-refresh the page — the Release button is still there; control was never released.

Suggested fix

client/src/lib/components/Sidebar.svelte:117-126 — only render the Release branch when sess.source !== "ui" (or, more generally, only show Release/Take Control controls for sessions where another client is the natural controller).

Notes

  • TerminalSource is defined as "ui" | "mcp" | "ssh" (src/terminal/types.ts:4).
  • SessionListEntry.source is already exposed to the client (client/src/lib/stores/ws.ts), and the session detail line already renders ({sess.source}), so no extra plumbing is needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions