Skip to content

Improve uploads and add external editor support - #9

Merged
LukeGus merged 2 commits into
Termix-SSH:dev-1.1.0from
deanxbox:main
Oct 20, 2026
Merged

LukeGus merged 2 commits into
Termix-SSH:dev-1.1.0from
deanxbox:main

Conversation

@deanxbox

Copy link
Copy Markdown

Pipeline SFTP writes with bounded concurrency to avoid waiting for a round trip after every chunk, and upload up to four files concurrently with one progress dialog showing file and byte counts, themed progress, live transfer speed, and cancellation.

Add an Open Externally context-menu action for text files, with guarded UTF-8 decoding, large-file confirmation, and serialized saves. Prevent Enter and Escape in rename and create inputs from triggering the grid's global keyboard shortcuts. Route single- and multi-file drops through the shared upload dialog.

Overview

Improve SFTP upload throughput and provide a shared, cancellable upload experience. Add a safer external-editor workflow for text files and prevent rename/create keyboard shortcuts from leaking into the grid.

  • Added: Bounded-concurrency SFTP writes, four-file upload concurrency, a shared upload progress dialog, and Open Externally for text files.
  • Updated: Single- and multi-file drops use the shared upload dialog; rename and create inputs no longer trigger grid shortcuts on Enter or Escape.
  • Fixed: External-editor content is decoded as UTF-8 with fatal error handling and BOM preservation; saves are serialized per path, editor sessions close on reopen/unmount, and stale opens are handled.

Changes Made

  • Rename/create keyboard handling: Enter and Escape in these inputs could also trigger the grid's global keyboard shortcuts. Prevented those keystrokes from propagating to the grid.
  • Uploads: SFTP writes previously waited for each chunk's round trip, and file uploads lacked a shared multi-file progress experience. Added bounded pipelining, up to four concurrent file uploads, and one shared dialog for single- and multi-file drops. The dialog shows file and byte counts, themed progress, browser-to-backend transfer speed, and cancellation. Uploads over 1.5 GB still use the existing chunked endpoint.
  • Open Externally: The action is limited to text files because external-editor saves return UTF-8. Added fatal UTF-8 decoding with BOM preservation, confirmation for large files, per-path serialized saves, editor-session cleanup on reopen and unmount, and stale-open handling. Reused the existing translated fileManager.openExternalEditor label; added the English keys externalEditorTextOnly and uploadFilesDone.
  • Tests: Added SFTP pipelined-write tests and updated upload-cancellation and grid keyboard tests.

Related Issues

  • None linked

Screenshots / Demos

image image

Checklist

  • Code follows the project style
  • Works on mobile and desktop (if it has UI) — only the desktop app was manually tested; mobile and web builds were not tested.
  • Tests pass and new code has tests — typecheck and Prettier checks are clean; all 40 files / 203 tests pass, including the new tests.
  • Added the change to CHANGELOG.md (if the repo has one) — CHANGELOG.md is unchanged and has no Unreleased section.
  • I have read the repo's CONTRIBUTING.md — it lists build, test, typecheck, manifest validation, and Prettier commands.

Only the desktop app was manually tested (Open Externally, upload dialog, rename on Enter, and upload speed); other locales were not updated. No real-SFTP benchmark numbers are available. Partial remote files after failed uploads are a pre-existing behaviour.

Pipeline SFTP writes with bounded concurrency to avoid waiting for a
round trip after every chunk, and upload up to four files concurrently
with one progress dialog showing file and byte counts, themed progress,
live transfer speed, and cancellation.

Add an Open Externally context-menu action for text files, with guarded
UTF-8 decoding, large-file confirmation, and serialized saves. Prevent
Enter and Escape in rename and create inputs from triggering the grid's
global keyboard shortcuts. Route single- and multi-file drops through
the shared upload dialog.
@termix-triage-bot

termix-triage-bot Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

AI review | Needs changes

Adds pipelined SFTP uploads, multi-file progress tracking, and an external editor workflow. The BOM handling contradicts the PR description, and the PR title misses the required conventional prefix.

  • minor src/frontend/FileManager.tsx:1868 PR description claims 'BOM preservation', but new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }) explicitly strips the BOM. Files saved through the external editor will lose their BOM.
  • minor src/frontend/FileManager.tsx:1288 uploadPath falls back to base when dirPart is empty. If base (currentPath) does not end with a trailing slash, uploadSSHFile may misinterpret the target directory or create malformed paths.

Reviewed 8f84e07. AI can be wrong, a maintainer still decides. Comment /termix review to run it again.

Replace the upload speed fallback with an invisible non-breaking space and
reserve right-aligned space for the reading. Decode base64 in 3 MB slices
into a preallocated byte array when opening files externally.

Add round-trip tests for empty, small, and multi-slice inputs.
@LukeGus
LukeGus changed the base branch from main to dev-1.1.0 October 20, 2026 03:11
@LukeGus
LukeGus merged commit abcd1b0 into Termix-SSH:dev-1.1.0 Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants