diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index c4f0c4eb7..7a4c66340 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -39,6 +39,9 @@ - Fixed `/model` in the TUI to open the model setup picker again, leaving `/switch` as the temporary session model switcher ([#2933](https://github.com/can1357/oh-my-pi/issues/2933)). - Fixed OpenCode Go sessions recording per-request cost history so `/usage` can show local cap utilization. ([#2942](https://github.com/can1357/oh-my-pi/issues/2942)) +### Fixed + +- Fixed `/omfg` saved-state copy to advertise `Esc dismiss` after saving and registering the rule live. ## [16.0.6] - 2026-06-18 diff --git a/packages/coding-agent/src/modes/components/omfg-panel.ts b/packages/coding-agent/src/modes/components/omfg-panel.ts index 09c398726..a29482df5 100644 --- a/packages/coding-agent/src/modes/components/omfg-panel.ts +++ b/packages/coding-agent/src/modes/components/omfg-panel.ts @@ -117,7 +117,7 @@ export class OmfgPanelComponent extends Container { case "saved": return theme.fg( "success", - `${theme.status.success} Registered live · ${replaceTabs(this.#savedPath ?? "saved")}`, + `${theme.status.success} Registered live · ${replaceTabs(this.#savedPath ?? "saved")} · Esc dismiss`, ); case "rejected": return theme.fg("warning", `${theme.status.warning} Not saved · Esc dismiss`); diff --git a/packages/coding-agent/test/modes/controllers/omfg-controller.test.ts b/packages/coding-agent/test/modes/controllers/omfg-controller.test.ts index a73bf8fee..d6442e7b1 100644 --- a/packages/coding-agent/test/modes/controllers/omfg-controller.test.ts +++ b/packages/coding-agent/test/modes/controllers/omfg-controller.test.ts @@ -193,6 +193,14 @@ describe("OmfgController", () => { [PROJECT_OPTION, GLOBAL_OPTION, AMEND_OPTION], ]); expect(harness.ttsrAddRule.mock.calls[0]?.[0].path).toBe(savedPath); + const rendered = Bun.stripANSI(harness.container.render(120).join("\n")); + expect(rendered).toContain("Registered live"); + expect(rendered).toContain(path.join(".omp", "rules", "ts-no-any.md")); + expect(rendered).toContain("Esc dismiss"); + expect(controller.hasActiveRequest()).toBe(true); + expect(controller.handleEscape()).toBe(true); + expect(harness.container.children).toHaveLength(0); + expect(controller.hasActiveRequest()).toBe(false); }); it("reiterates when the first valid rule does not match history", async () => {