From 31037bbe186dc1299a4e5121b5c735e520b155b4 Mon Sep 17 00:00:00 2001 From: murashit Date: Fri, 22 May 2026 13:20:08 +0900 Subject: [PATCH] Show unsupported goal notices --- README.md | 1 + src/panel/controller.ts | 6 ++++-- tests/panel/panel-controller.test.ts | 29 ++++++++++++++++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6375fef7..59da327a 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Codex Panel supports the app-server-backed Codex workflows that fit a persistent - Send steering messages during a running turn, or interrupt when the composer is empty. - Respond to command, file, and permission approval requests. - Stream assistant messages, reasoning, commands, tool calls, hooks, file changes, and agent activity. +- Codex goal management is not supported. Incoming goal notifications are shown only as brief system notices. - Inspect file changes and roll back the latest turn without reverting local files. - Inspect context usage, usage limits, connection diagnostics, MCP server inventory, and effective config (`/status`, `/doctor`, `/mcp`). - Inspect and manage discovered Codex hooks from Codex Panel settings. diff --git a/src/panel/controller.ts b/src/panel/controller.ts index 560d3c27..961f7654 100644 --- a/src/panel/controller.ts +++ b/src/panel/controller.ts @@ -259,8 +259,10 @@ export class PanelController { this.actions.refreshThreads(); } else if (method === "thread/settings/updated") { this.applyThreadSettings(params.threadSettings); - } else if (method === "thread/goal/updated" || method === "thread/goal/cleared") { - return; + } else if (method === "thread/goal/updated") { + this.addSystemMessage(`Thread goal updated: status ${params.goal.status}. Codex Panel does not support goals.`); + } else if (method === "thread/goal/cleared") { + this.addSystemMessage("Thread goal cleared. Codex Panel does not support goals."); } } diff --git a/tests/panel/panel-controller.test.ts b/tests/panel/panel-controller.test.ts index 43ff19b1..0882c0a0 100644 --- a/tests/panel/panel-controller.test.ts +++ b/tests/panel/panel-controller.test.ts @@ -1064,7 +1064,7 @@ describe("PanelController", () => { expect(state.activeServiceTierOverride).toBe(true); }); - it("keeps goal notifications out of the message stream", () => { + it("shows unsupported goal update notifications as system messages", () => { const state = createPanelState(); state.activeThreadId = "thread-active"; const controller = controllerForState(state); @@ -1087,7 +1087,32 @@ describe("PanelController", () => { }, } satisfies Extract); - expect(state.displayItems).toEqual([]); + expect(state.displayItems).toMatchObject([ + { + kind: "system", + text: "Thread goal updated: status active. Codex Panel does not support goals.", + }, + ]); + }); + + it("shows unsupported goal clear notifications as system messages", () => { + const state = createPanelState(); + state.activeThreadId = "thread-active"; + const controller = controllerForState(state); + + controller.handleNotification({ + method: "thread/goal/cleared", + params: { + threadId: "thread-active", + }, + } satisfies Extract); + + expect(state.displayItems).toMatchObject([ + { + kind: "system", + text: "Thread goal cleared. Codex Panel does not support goals.", + }, + ]); }); });