feat(FN-3074): sort done column by recency, preserve merge-active state, ad
This merge adds done-column sorting by most recent completion while preserving merge-active state on verification bounces, introduces a comprehensive droid runtime regression test suite covering engine delegation, auth routes, and model routing, hardens the CLI native bundle externalization, and fix Fusion-Task-Id: FN-3074
This commit is contained in:
@@ -60,6 +60,16 @@ describe("registerModelRoutes droid-cli filter", () => {
|
||||
expect(response.models.some((model) => model.provider === "droid-cli")).toBe(true);
|
||||
});
|
||||
|
||||
it("filters droid-cli models when useDroidCli setting is unset", async () => {
|
||||
const { handler } = setup(undefined);
|
||||
const json = vi.fn();
|
||||
|
||||
await handler({}, { json });
|
||||
|
||||
const response = json.mock.calls[0][0] as { models: Array<{ provider: string }> };
|
||||
expect(response.models.some((model) => model.provider === "droid-cli")).toBe(false);
|
||||
});
|
||||
|
||||
it("includes resolved planning model when settings hierarchy resolves one", async () => {
|
||||
const { handler } = setup(false, {
|
||||
planningProvider: "openai",
|
||||
|
||||
@@ -950,6 +950,37 @@ describe("Droid CLI auth routes", () => {
|
||||
id: "droid-cli",
|
||||
name: "Factory AI — via Droid CLI",
|
||||
type: "cli",
|
||||
authenticated: true,
|
||||
}),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
it("GET /auth/status marks droid-cli unauthenticated when extension status is not ok", async () => {
|
||||
vi.spyOn(droidCliProbeModule, "probeDroidCli").mockResolvedValue({
|
||||
available: true,
|
||||
version: "droid 1.0.0",
|
||||
probeDurationMs: 10,
|
||||
});
|
||||
store.getGlobalSettingsStore = vi.fn().mockReturnValue({
|
||||
...createMockGlobalSettingsStore(),
|
||||
getSettings: vi.fn().mockResolvedValue({ useDroidCli: true }),
|
||||
});
|
||||
|
||||
const res = await GET(
|
||||
buildApp({ getDroidCliExtensionStatus: () => ({ status: "error", reason: "bad ext" }) } as Parameters<
|
||||
typeof createApiRoutes
|
||||
>[1]),
|
||||
"/api/auth/status",
|
||||
);
|
||||
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body.providers).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: "droid-cli",
|
||||
authenticated: false,
|
||||
type: "cli",
|
||||
}),
|
||||
]),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user