feat: harden local shell, SFTP, and desktop session reliability
Finder-launched terminals now inherit a login PATH so tools like ollama resolve, destructive SFTP/editor actions require confirmation, and terminal search plus window dragging work again. SSH forwards and RDP sessions keep listeners and survive reconnect without FastPath crashes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
188f3556ed
commit
08696896f9
223 files changed
+13493
-3423
No files matched your search
@@ -0,0 +1,41 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { sortTransferTasks } from '../../../src/components/sftp/TransferPanel'
|
||||
import type { TransferTask } from '../../../shared/types/sftp.types'
|
||||
|
||||
function task(
|
||||
id: string,
|
||||
status: TransferTask['status']
|
||||
): TransferTask {
|
||||
return {
|
||||
id,
|
||||
type: 'upload',
|
||||
fileName: id,
|
||||
filePath: `/${id}`,
|
||||
status,
|
||||
progress: status === 'transferring' ? 40 : 0,
|
||||
total: 100,
|
||||
transferred: status === 'transferring' ? 40 : 0,
|
||||
}
|
||||
}
|
||||
|
||||
describe('sortTransferTasks', () => {
|
||||
it('puts transferring tasks first, then pending, then finished', () => {
|
||||
const ordered = sortTransferTasks([
|
||||
task('done', 'completed'),
|
||||
task('wait', 'pending'),
|
||||
task('active', 'transferring'),
|
||||
task('fail', 'failed'),
|
||||
task('wait2', 'pending'),
|
||||
])
|
||||
expect(ordered.map((t) => t.id)).toEqual(['active', 'wait', 'wait2', 'fail', 'done'])
|
||||
})
|
||||
|
||||
it('keeps relative order within the same status', () => {
|
||||
const ordered = sortTransferTasks([
|
||||
task('a', 'pending'),
|
||||
task('b', 'pending'),
|
||||
task('c', 'pending'),
|
||||
])
|
||||
expect(ordered.map((t) => t.id)).toEqual(['a', 'b', 'c'])
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user