Skip to content

fix(sftp): recover from failed profile migration - #2840

Merged
bajrangCoder merged 4 commits into
mainfrom
fix-sftp-migration-startup
Sep 1, 2026
Merged

fix(sftp): recover from failed profile migration#2840
bajrangCoder merged 4 commits into
mainfrom
fix-sftp-migration-startup

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes SFTP migration recover from profile-encryption failures instead of blocking startup.

  • Migrates folder expansion-state keys with the folder’s opaque profile identity.
  • Removes references whose credentials cannot be secured while preserving unsaved files as local recovery tabs.
  • Reports failed migrations after workspace startup and adds unit coverage for migration and recovery paths.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/lib/sftpProfiles.js Implements recoverable migration failures, aligned folder expansion-key migration, credential scrubbing, and unsaved-tab recovery.
src/main.js Logs migration failures and displays an escaped post-startup recovery report.
tests/unit/sftpProfiles.test.js Covers shared folder profiles, failed-reference removal, malformed URLs, key cleanup, and unsaved-file recovery.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Read persisted SFTP reference] --> B{Already opaque?}
    B -->|Yes| C[Keep profile reference]
    B -->|No| D{Folder profile available?}
    D -->|Yes| E[Rewrite with folder profile]
    D -->|No| F[Create encrypted native profile]
    F -->|Success| G[Rewrite as opaque profile URL]
    F -->|Failure| H[Remove saved reference]
    H --> I{Unsaved editor file?}
    I -->|Yes| J[Restore as local recovery tab]
    I -->|No| K[Discard reference]
    J --> L[Show migration report after startup]
    K --> L
Loading

Reviews (4): Last reviewed commit: "fix" | Re-trigger Greptile

Comment thread src/lib/sftpProfiles.js Outdated
@bajrangCoder

This comment was marked as outdated.

Comment thread src/lib/sftpProfiles.js Outdated
@bajrangCoder

This comment was marked as outdated.

Comment thread src/lib/sftpProfiles.js Outdated
@bajrangCoder

This comment was marked as outdated.

@bajrangCoder bajrangCoder added the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Aug 30, 2026
@github-actions github-actions Bot removed the CI: RUN ON-DEMAND PREVIEW RELEASES Triggers an on-demand preview build for this pull request via CI workflow. label Aug 30, 2026
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Preview Release for this, has been built.

Click here to view that github actions build

@bajrangCoder
bajrangCoder added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit c735b50 Sep 1, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Sep 1, 2026
@bajrangCoder
bajrangCoder deleted the fix-sftp-migration-startup branch September 1, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant