fix(files): a workspace whose folder was deleted leaves the Files places
The lane payload carries folder_missing (ENOENT/ENOTDIR only). Files hides such a workspace and never reopens it as the default place; the Workspace sidebar strikes its name through with a hint to remove it from its menu. A folder that cannot be read no longer keeps the previous folder's entries under its error, and a change in Files re-reads the workspace list.
This commit is contained in:
@@ -337,6 +337,16 @@ describe("lanes lib", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("payload says folder_missing only when the folder is gone", () => {
|
||||
const fs = require("node:fs");
|
||||
const dir = fs.mkdtempSync(pathMod.join(os.tmpdir(), "lane-gone-"));
|
||||
const l = lanes.createLane({ cwd: dir });
|
||||
assert.equal(lanes.lanePayload(lanes.getLane(l.id)).folder_missing, false);
|
||||
fs.rmSync(dir, { recursive: true });
|
||||
assert.equal(lanes.lanePayload(lanes.getLane(l.id)).folder_missing, true);
|
||||
lanes.deleteLane(l.id);
|
||||
});
|
||||
|
||||
it("payload carries node states and progress", () => {
|
||||
const l = lanes.createLane({ cwd: "/tmp/wt/d" });
|
||||
lanes.setStage(l.id, { stage: "review" });
|
||||
|
||||
Reference in New Issue
Block a user