Merge origin/master into provider routing connections

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* origin/master:
  fix(ui): let a selected saved subscription be used without a tile click (#14996)
  fix: report pending execution phase at Stop timeout (#14990)
  fix: retain resolved ACP execution timeout metadata (#14986)
  fix(agents): reduce hiring templates to role descriptions (#14985)
This commit is contained in:
DottaandPaperclip committed 2026-10-02 21:56:32 -05:00
commit cba9868517
60 files changed
+2587 -1065

No files matched your search

@@ -378,6 +378,36 @@ describe("AgentProviderConnection reuse", () => {
});
expect(host.textContent).toContain("New subscription login");
});
it("lets a visible saved subscription be used without opening the provider first", async () => {
const { test, connected } = await mount("codex_local", false, true, true);
expect(host.querySelector("select")).not.toBeNull();
const use = [...host.querySelectorAll("button")].find((b) =>
b.textContent?.includes("Use saved subscription"),
)!;
expect(use.disabled).toBe(false);
click("Use saved subscription");
await vi.waitFor(() =>
expect(connected).toHaveBeenCalledWith({
env: {
CODEX_HOME: { type: "secret_ref", secretId: "codex-home", version: "latest" },
},
}),
);
expect(test).toHaveBeenCalledWith(connected.mock.calls[0][0]);
});
it("still requires opening the provider before starting a new subscription login", async () => {
await mount("codex_local", false, true, true);
flushSync(() => {
const select = host.querySelector("select")!;
select.value = "";
select.dispatchEvent(new Event("change", { bubbles: true }));
});
const primary = [...host.querySelectorAll("button")].find((b) =>
b.textContent?.includes("Connect"),
)!;
expect(primary.disabled).toBe(true);
expect(mocks.loginPanel).not.toHaveBeenCalled();
});
it.each(["claude_local", "codex_local"] as const)(
"passes a personal reference without credentials for %s",
async (adapter) => {
@@ -419,7 +419,9 @@ export function AgentProviderConnection({
(!managedAccount && auth.isPending) ||
savedKeys.loading ||
(adapterType === "claude_local" && storedLogin.isPending) ||
!opened ||
// The saved-subscription chooser renders outside the opened section,
// so reusing the visible choice must not wait for a tile click.
(!opened && !(method === "subscription" && savedSubscription)) ||
(Boolean(needsLogin) && (!authorizationUrl || loginPhase !== "ready")) ||
(method === "api" &&
!apiKey.trim() &&