Skip to content

Server profile: switch "File transfer only (no terminal)" #1669

Backlog

Description

@smart-ssh-planner

Goal

A server profile can be marked "File transfer only": the session then skips command probes and the terminal and goes straight to the file browser – for servers whose detection is slow or ambiguous.

Context

  • Pattern to follow: elevation_allowed (Server profile: setting "Allow elevated rights in the file browser" #1194): crates/core/src/profiles/types.rs:85-95, migration crates/persistence-sqlite/migrations/0028_server_elevation_allowed.sql, crates/app-logic/src/dto/server.rs:98,139,431, crates/app-logic/src/servers.rs:94,222, servers/duplicate.rs, backup_store.rs:110,311, form test ServerForm.elevationAllowed.test.tsx.
  • Capability detection in build_session comes from the blocking issue.

Requirements

  • Profile field file_transfer_only: bool, default false; new migration; DTO, create/update/duplicate, backup/restore, ssh-config import (default false).
  • Server form, next to "Allow elevated rights": checkbox "File transfer only (no terminal)" with help text "Skips the terminal and command checks. For servers that only allow SFTP." (decided by maintainer). Texts in all locales.
  • file_transfer_only = true: build_session runs no exec probes and sets exec=false, shell=Unavailable; SFTP via subsystem only (no exec fallback). If SFTP fails, the connect fails with a clear message that names the setting.
  • Elevated rights are not offered for such a session (follows from exec=false).

Acceptance Criteria

  • Migration adds the column with default 0; existing profiles load with false.
  • Create, edit, duplicate, backup/restore keep the value (tests).
  • Form: checkbox saves and loads (test like ServerForm.elevationAllowed.test.tsx).
  • Connect with the flag: no exec call on the mock transport, capabilities exec=false, shell=unavailable, sftp=true (test).
  • Connect with the flag and SFTP refused: connect error with the setting named (test).
  • Relevant automated tests pass

Technical Notes

  • Data model + migration: new migration file; number it after the newest one on develop at implementation time.

Files: crates/core/src/profiles/types.rs, crates/core/src/testing.rs, crates/persistence-sqlite/migrations/ (new), crates/persistence-sqlite/src/, crates/app-logic/src/dto/server.rs, crates/app-logic/src/servers.rs, crates/app-logic/src/servers/duplicate.rs, crates/app-logic/src/connect/session_builder.rs, crates/app-shell/src/commands/servers.rs, crates/app-shell/src/ssh_config_apply.rs, apps/smart-ssh-community/frontend/src/components/ServerForm*, apps/smart-ssh-community/frontend/src/locales/, apps/smart-ssh-community/frontend/src/generated/ipc.ts, docs/specs/0003-server-profile-datenmodell.md, changelog.d/

Spec impact: update 0003

Open questions

Related Work

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrontendpersistence

    Fields

    Priority

    P2 - Normal

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions