Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export class EvolutionMenuComponent extends Container implements Focusable {
const cancellableJob =
[overview.activeJob, overview.newestResumableJob].find((job) => job?.cancellable === true) ?? null;
return [
{ label: "Refresh", enabled: evolutionEnabled, select: () => void this.refresh() },
{ label: "Refresh", enabled: true, select: () => void this.refresh() },
{
label: "Evolve",
enabled: evolutionEnabled && overview.activeJob === null,
Expand Down
12 changes: 10 additions & 2 deletions packages/coding-agent/test/evolution-menu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ describe("EvolutionMenuComponent", () => {
component.dispose();
});

it("persists the self-evolution toggle and disables every other action", async () => {
it("keeps durable refresh available when self-evolution is disabled", async () => {
const fixture = client(overview());
const component = new EvolutionMenuComponent(
fixture.client,
Expand All @@ -375,9 +375,17 @@ describe("EvolutionMenuComponent", () => {
const output = stripAnsi(component.render(180).join("\n"));
expect(output).toContain("Toggle [off]");
expect(output).toContain("Next automatic evolution: Disabled");
for (const action of ["Refresh", "Evolve", "View", "Resume", "Browse", "Rollback", "Cancel"]) {
expect(output).toContain("Refresh");
expect(output).not.toContain("Refresh [unavailable]");
for (const action of ["Evolve", "View", "Resume", "Browse", "Rollback", "Cancel"]) {
expect(output).toContain(`${action} [unavailable]`);
}

const overviewCallsBeforeRefresh = fixture.overviewCall.mock.calls.length;
for (let index = 0; index < 7; index += 1) component.handleInput("\u001b[A");
component.handleInput("\n");
await vi.waitFor(() => expect(fixture.overviewCall).toHaveBeenCalledTimes(overviewCallsBeforeRefresh + 1));
component.dispose();
});

it("polls durable job state without rendering removed diagnostics", async () => {
Expand Down