chore(vendor): import pi 1.3.0

Imported as a linear vendor commit so forge rebases do not replay the upstream root tree.

git-subtree-dir: third_party/pi

git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
This commit is contained in:
2026-10-15 17:58:48 -04:00
parent 719370c8f7
commit 6081e3e325
1743 changed files with 205460 additions and 131705 deletions

View File

@@ -218,13 +218,15 @@ describe("session selector path/delete interactions", () => {
it("does not start redundant All loads when toggling scopes while All is already loading", async () => {
const currentSessions = [makeSession({ id: "current" })];
const allSessions = [makeSession({ id: "all" })];
const allDeferred = createDeferred<SessionInfo[]>();
let allLoadCalls = 0;
const selector = new SessionSelectorComponent(
async () => currentSessions,
async () => {
async (onProgress) => {
allLoadCalls++;
onProgress?.(1, 2, allSessions);
return allDeferred.promise;
},
() => {},
@@ -241,8 +243,10 @@ describe("session selector path/delete interactions", () => {
list.handleInput("\t"); // current -> all again while load pending
expect(allLoadCalls).toBe(1);
expect(selector.getSessionList().getSelectedSessionPath()).toBe(allSessions[0]!.path);
expect(selector.render(120).join("\n")).toContain("Loading");
allDeferred.resolve([makeSession({ id: "all" })]);
allDeferred.resolve(allSessions);
await flushPromises();
});