fix(host,client): abort superseded listings on the wire; keep the native swap resolvable
Supersession (newer navigation, path editing, closing, unmount) now aborts the in-flight listing's request instead of only discarding its result: the browser mints an AbortController per listing, the signal rides the workspace face (IWorkspaces.listDirectory gains an optional signal) onto the fetch carrier, and the Host scan stops with it (817's cancellation chain). apps/cli keeps both picker packages as dependencies so the documented one-row cordis.yml swap to the native backend resolves at boot.
This commit is contained in:
@@ -115,7 +115,7 @@ export class TestWorkspaces implements IWorkspaces {
|
||||
* @param path - absolute directory to list; absent lists the home level.
|
||||
* @returns the level's listing.
|
||||
*/
|
||||
async listDirectory(path?: string): Promise<DirectoryListing> {
|
||||
async listDirectory(path?: string, _signal?: AbortSignal): Promise<DirectoryListing> {
|
||||
this.calls.push({ method: 'listDirectory', args: [path] })
|
||||
const stub = this.stubs.get('listDirectory')
|
||||
if (stub !== undefined) return await (stub(path) as Promise<DirectoryListing>)
|
||||
|
||||
Reference in New Issue
Block a user