Skip to content

Session view: "No shell available" panel and "File transfer not available" in the file browser #1668

Backlog

Description

@smart-ssh-planner

Goal

On a server without a shell the session view shows a "No shell available" panel instead of the terminal and opens the file browser; on a server without SFTP the file browser shows "File transfer not available".

Context

  • components/SessionView.tsx (in apps/smart-ssh-community/frontend/src/): right panel toggles "terminal" | "files" (:136), both stay mounted (:393-394), toggle buttons :474-500, narrow tabs :380, <TerminalView> :601-607, <FileBrowserPanel> :609. MCP early return :328-352 is the precedent for a terminal-less layout.
  • TerminalView.tsx startShell (:136-146) writes open errors into xterm and restarts the shell when the link goes live (:190-200).
  • Visual precedent for a placeholder: UnusableServerPanel.tsx.
  • Capabilities and the event session-capabilities-changed come from the blocking issue.

Requirements

  • shell = "unavailable": the terminal area shows a panel (decided by maintainer) – title "No shell available", text "This server only allows file transfer. Manage files in the file browser." The right panel switches to "files" once when the capability becomes known; the terminal toggle stays visible and shows the panel. TerminalView does not call startShell for this session.
  • sftp = false: the file browser area shows "File transfer not available" with text "This server offers no SFTP access. Use the terminal to work with files." No listing request is sent.
  • sftp_via_exec = true: the file browser works as usual (no visible difference).
  • Both panels in narrow layout too; texts in all locales.
  • shell = "unknown": today's behaviour.

Acceptance Criteria

  • Component test: capabilities shell=unavailable → panel shown, no open_terminal call, files view active.
  • Component test: event session-capabilities-changed to shell=unavailable while the terminal view is shown → switches to files and shows the panel; no further open_terminal call.
  • Component test: sftp=false → file browser placeholder, no list call.
  • Narrow layout shows both placeholders (test).
  • All capabilities available: no visible change (existing tests green).
  • Texts present in every locale under src/locales/.
  • Playwright e2e with the fake backend: SFTP-only session shows the panel and lists files.
  • Relevant automated tests pass

Technical Notes

  • Frontend only; no backend change. Follow the styling of UnusableServerPanel.tsx.

Files: apps/smart-ssh-community/frontend/src/components/SessionView.tsx, apps/smart-ssh-community/frontend/src/components/TerminalView.tsx, apps/smart-ssh-community/frontend/src/components/FileBrowserPanel.tsx, apps/smart-ssh-community/frontend/src/components/ (new placeholder component and tests), apps/smart-ssh-community/frontend/src/api/api.ts, apps/smart-ssh-community/frontend/src/locales/, apps/smart-ssh-community/frontend/e2e/, docs/specs/0053-filemanager-layout.md, changelog.d/

Spec impact: update 0053

Open questions

Related Work

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrontend

    Fields

    Priority

    P2 - Normal

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions