tui: fix memory leaks in session management and improve permission error handling

This commit is contained in:
Dax Raad
2026-01-01 21:28:11 -05:00
parent 2aaea71eb3
commit dad9c917d2
5 changed files with 123 additions and 9 deletions

View File

@@ -451,7 +451,7 @@ test("ask - throws RejectedError when action is deny", async () => {
always: [],
ruleset: [{ permission: "bash", pattern: "*", action: "deny" }],
}),
).rejects.toBeInstanceOf(PermissionNext.RejectedError)
).rejects.toBeInstanceOf(PermissionNext.AutoRejectedError)
},
})
})
@@ -628,7 +628,7 @@ test("ask - checks all patterns and stops on first deny", async () => {
{ permission: "bash", pattern: "rm *", action: "deny" },
],
}),
).rejects.toBeInstanceOf(PermissionNext.RejectedError)
).rejects.toBeInstanceOf(PermissionNext.AutoRejectedError)
},
})
})