Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: 修复网页 Codex 提问入口与超时提示 (#23213)

Mocha700394fdff40
diff --git a/.agents/ux/lobe-design-rules.md b/.agents/ux/lobe-design-rules.md
index 7f70150885a..170ae1bcdd4 100644
--- a/.agents/ux/lobe-design-rules.md
+++ b/.agents/ux/lobe-design-rules.md
@@ -110,10 +110,14 @@ Source: user clarification during acceptance round 6 (2026-10-27).
An unreleased feature's settings, search results and settings summary counts use the same per-user feature flag as the feature itself. Channel decision settings are visible only when `serverConfigSelectors.enableChannels` is true; a default-on preference does not bypass the `channel` rollout gate.
+Platform visibility follows where the user can use the setting, not where its implementation process runs. A runtime available to Web conversations through a connected device belongs in General Labs; reserve `desktopOnly` for capabilities that require the Electron shell. Codex App Server dispatch reads the same user preference on Web and Desktop. Verify the Web toggle, persistence after refresh, and the selected runtime on the receiving device; a merged adapter or a successful native probe alone does not prove that conversations use it.
+
Enforcement: `src/features/SettingsSearch/items.test.ts` covers the channel decision search entry with the flag off and on. The service-model form filters the channel row before deriving its groups and counts.
Source: user correction about the unreleased Channel feature (2026-10-28).
+Additional source: Codex question-flow reproduction (2026-11-17): the CLI contained the native question bridge and advertised support, but the user's unset Lab flag selected `codex exec`; `desktopOnly` hid the enabling control on Web.
+
## LOBE-UX-016 — A stage path is `Steps`, and its current step is the blue live dot
Show where a flow stands (draft → dry run → publish, select → fill) with `Steps` from `@lobehub/ui`, not a hand-rolled row of labels and chevrons: `Steps` owns the connectors and spacing that make the path readable. Mark the current step with `Badge status="processing"` (the blue `colorInfo` dot with its pulse), not `colorPrimary`, which renders near-black in LobeHub's theme and reads as plain text. Done steps keep a check; upcoming steps are a quiet dot. Leave room above the path when it sits right under a tab bar or divider. Copy under the stage title uses `colorTextDescription`.
@@ -147,3 +151,9 @@ A Channel day divider is the full date alone ("2026 年 6 月 22 日"), not a da
Enforcement: `src/features/Channels/messagePresentation.test.ts` (`channelMessageTime`) covers today, the yesterday boundary, and earlier dates in this and previous years in zh-CN and en-US.
Source: user correction (2026-11-12): headers showed only "16:29", so a scrolled message had no visible date — "应该得是像 discord 这样改". This replaces the WeChat-style divider from PR #22556 (2026-11-08), which kept today as the time alone ("今天应该显示时间").
+
+## LOBE-UX-021 — Timeout copy follows the form's actual answer policy
+
+Use the shared form's `autoSubmitOnTimeout` result for countdown wording. Provider-owned option IDs suppress inferred answers, so those cards must say they close unanswered instead of promising option 1. Keep the legacy fallback wording only where the form actually submits fallback answers. Do not infer the policy from a renderer's provider name.
+
+Enforcement: `packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.test.ts` checks the exposed policy together with actual timeout submission and non-submission. Verify both countdown messages on the rendered cards. Source: real Codex question-card acceptance (2026-11-17), where the footer promised option 1 despite the hook correctly refusing to select it.
diff --git a/locales/en-US/labs.json b/locales/en-US/labs.json
index 64791e71163..2bb93b43c20 100644
--- a/locales/en-US/labs.json
+++ b/locales/en-US/labs.json
@@ -14,7 +14,7 @@
"features.betterCodingExperience.title": "Better Coding Experience",
"features.claudeCodeSdk.desc": "Run Claude Code sessions through the Claude Agent SDK instead of spawning the CLI. Enables richer streaming and session control.",
"features.claudeCodeSdk.title": "Claude Code SDK Runtime",
- "features.codexAppServer.desc": "Run Codex sessions through the local app-server instead of one-shot CLI processes. Enables token streaming and native turn control.",
+ "features.codexAppServer.desc": "Run Codex through App Server on desktop or a connected device for interactive questions and native turn control. Applies to subsequent runs.",
"features.codexAppServer.title": "Codex App Server Runtime",
"features.desktopSplitView.desc": "Show two desktop tabs side by side, with independent navigation and a resizable divider.",
"features.desktopSplitView.title": "Split Tab View",
diff --git a/locales/en-US/tool.json b/locales/en-US/tool.json
index 5805d16c5eb..7540111f491 100644
--- a/locales/en-US/tool.json
+++ b/locales/en-US/tool.json
@@ -67,6 +67,7 @@
"claudeCode.askUserQuestion.timeExpired": "Time expired — using option 1 of each question.",
"claudeCode.askUserQuestion.timeExpiredNoAnswer": "Time expired — this question can no longer be answered.",
"claudeCode.askUserQuestion.timeRemaining": "Time remaining: {{time}} · unanswered questions default to option 1 on timeout.",
+ "claudeCode.askUserQuestion.timeRemainingNoAnswer": "Time remaining: {{time}} · this question closes without an answer on timeout.",
"codeInterpreter-legacy.error": "Execution Error",
"codeInterpreter-legacy.executing": "Executing...",
"codeInterpreter-legacy.files": "Files:",
diff --git a/locales/zh-CN/labs.json b/locales/zh-CN/labs.json
index b586c5fe9da..8c6a2108009 100644
--- a/locales/zh-CN/labs.json
+++ b/locales/zh-CN/labs.json
@@ -14,7 +14,7 @@
"features.betterCodingExperience.title": "更好的编码体验",
"features.claudeCodeSdk.desc": "通过 Claude Agent SDK 运行 Claude Code 会话,替代 CLI 进程方式,提供更丰富的流式输出与会话控制。",
"features.claudeCodeSdk.title": "Claude Code SDK 运行时",
- "features.codexAppServer.desc": "通过本地 App Server 运行 Codex 会话,替代一次性的 CLI 进程,提供 Token 流式输出与原生 Turn 控制。",
+ "features.codexAppServer.desc": "通过桌面端或已连接设备的 App Server 运行 Codex,支持交互提问与原生回合控制。对后续运行生效。",
"features.codexAppServer.title": "Codex App Server 运行时",
"features.desktopSplitView.desc": "在桌面端并排显示两个标签页,支持独立导航和拖拽调整分栏宽度。",
"features.desktopSplitView.title": "标签页分栏",
diff --git a/locales/zh-CN/tool.json b/locales/zh-CN/tool.json
index 00a8d56a15e..e6de2eb10d9 100644
--- a/locales/zh-CN/tool.json
+++ b/locales/zh-CN/tool.json
@@ -67,6 +67,7 @@
"claudeCode.askUserQuestion.timeExpired": "已超时——将使用每题的选项 1。",
"claudeCode.askUserQuestion.timeExpiredNoAnswer": "已超时——这个提问已经无法再作答。",
"claudeCode.askUserQuestion.timeRemaining": "剩余时间:{{time}} · 超时后未作答题目默认选项 1。",
+ "claudeCode.askUserQuestion.timeRemainingNoAnswer": "剩余时间:{{time}} · 超时后结束提问,不会代为作答。",
"codeInterpreter-legacy.error": "执行出错",
"codeInterpreter-legacy.executing": "正在执行...",
"codeInterpreter-legacy.files": "文件:",
diff --git a/packages/builtin-tool-claude-code/src/client/Intervention/AskUserQuestion/index.tsx b/packages/builtin-tool-claude-code/src/client/Intervention/AskUserQuestion/index.tsx
index a4e97251ea4..e5d478c2096 100644
--- a/packages/builtin-tool-claude-code/src/client/Intervention/AskUserQuestion/index.tsx
+++ b/packages/builtin-tool-claude-code/src/client/Intervention/AskUserQuestion/index.tsx
@@ -102,7 +102,13 @@ const AskUserQuestionIntervention = memo<BuiltinInterventionProps<AskUserQuestio
supplementPlaceholder: t('claudeCode.askUserQuestion.supplement.placeholder'),
timeExpired: t('claudeCode.askUserQuestion.timeExpired'),
timeExpiredNoAnswer: t('claudeCode.askUserQuestion.timeExpiredNoAnswer'),
- timeRemaining: (time: string) => t('claudeCode.askUserQuestion.timeRemaining', { time }),
+ timeRemaining: (time: string) =>
+ t(
+ form.autoSubmitOnTimeout
+ ? 'claudeCode.askUserQuestion.timeRemaining'
+ : 'claudeCode.askUserQuestion.timeRemainingNoAnswer',
+ { time },
+ ),
};
return (
diff --git a/packages/locales/src/default/labs.ts b/packages/locales/src/default/labs.ts
index b10c0d0073c..f49622a8c40 100644
--- a/packages/locales/src/default/labs.ts
+++ b/packages/locales/src/default/labs.ts
@@ -23,7 +23,7 @@ export default {
'Run Claude Code sessions through the Claude Agent SDK instead of spawning the CLI. Enables richer streaming and session control.',
'features.claudeCodeSdk.title': 'Claude Code SDK Runtime',
'features.codexAppServer.desc':
- 'Run Codex sessions through the local app-server instead of one-shot CLI processes. Enables token streaming and native turn control.',
+ 'Run Codex through App Server on desktop or a connected device for interactive questions and native turn control. Applies to subsequent runs.',
'features.codexAppServer.title': 'Codex App Server Runtime',
'features.desktopSplitView.desc':
'Show two desktop tabs side by side, with independent navigation and a resizable divider.',
diff --git a/packages/locales/src/default/tool.ts b/packages/locales/src/default/tool.ts
index 01e248ce415..8946fa49825 100644
--- a/packages/locales/src/default/tool.ts
+++ b/packages/locales/src/default/tool.ts
@@ -73,6 +73,8 @@ export default {
'Time expired — this question can no longer be answered.',
'claudeCode.askUserQuestion.timeRemaining':
'Time remaining: {{time}} · unanswered questions default to option 1 on timeout.',
+ 'claudeCode.askUserQuestion.timeRemainingNoAnswer':
+ 'Time remaining: {{time}} · this question closes without an answer on timeout.',
'codeInterpreter-legacy.error': 'Execution Error',
'codeInterpreter-legacy.executing': 'Executing...',
'codeInterpreter-legacy.files': 'Files:',
diff --git a/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.test.ts b/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.test.ts
index 50f8a6ebb9b..c9c280d8472 100644
--- a/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.test.ts
+++ b/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.test.ts
@@ -351,6 +351,7 @@ describe('useAskUserForm additional notes', () => {
}),
);
+ expect(hook.result.current.autoSubmitOnTimeout).toBe(true);
act(() => hook.result.current.handleToggle(twoQuestionArgs.questions[0], 'Full'));
act(() => hook.result.current.setSupplementMode(true));
act(() => hook.result.current.handleSupplementTextChange('Keep this timeout note.'));
@@ -395,6 +396,7 @@ describe('useAskUserForm additional notes', () => {
}),
);
+ expect(hook.result.current.autoSubmitOnTimeout).toBe(false);
act(() => vi.advanceTimersByTime(1000));
expect(onInteractionAction).not.toHaveBeenCalled();
diff --git a/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.ts b/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.ts
index d211b79e2c3..59bd287d17a 100644
--- a/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.ts
+++ b/packages/shared-tool-ui/src/AskUserQuestion/useAskUserForm.ts
@@ -49,6 +49,8 @@ export interface UseAskUserFormParams {
export interface AskUserFormApi {
activeQuestion?: AskUserQuestionItem;
activeTab: string;
+ /** Whether this form can supply fallback answers when the countdown ends. */
+ autoSubmitOnTimeout: boolean;
/**
* The timeout fallback has fired for this card. Distinguishes "we answered
* on your behalf" from "the clock ran out and nothing was sent", which the
@@ -166,6 +168,7 @@ export const useAskUserForm = ({
const hasProviderOwnedOptionIds = questions.some((question) =>
question.options.some((option) => !!option.id),
);
+ const autoSubmitOnTimeout = countdownEnabled && !hasProviderOwnedOptionIds;
// A resolved `onInteractionAction` means the answer was published, not that
// the producer consumed it — the card stays disabled until the host settles
@@ -467,7 +470,7 @@ export const useAskUserForm = ({
// A stable id means this is a provider-owned choice (permission/plan or a
// newer exact-id question). Never infer consent by selecting option one:
// let the producer timeout/cancel fail closed.
- if (hasProviderOwnedOptionIds) return;
+ if (!autoSubmitOnTimeout) return;
setAutoSubmitted(true);
if (escapeActive && escapeAvailable && escapeText.trim().length > 0) {
void submitWith({ [FREEFORM_PAYLOAD_KEY]: escapeText.trim() });
@@ -501,7 +504,7 @@ export const useAskUserForm = ({
custom,
supplementText,
submitWith,
- hasProviderOwnedOptionIds,
+ autoSubmitOnTimeout,
]);
const activeQuestion = questions[Number(activeTab)] ?? questions[0];
@@ -517,6 +520,7 @@ export const useAskUserForm = ({
return {
activeQuestion,
activeTab,
+ autoSubmitOnTimeout,
autoSubmitted,
custom,
escapeActive: inEscape,
diff --git a/src/features/Settings/labs/features.ts b/src/features/Settings/labs/features.ts
index 2e155295b4c..2a04db8326a 100644
--- a/src/features/Settings/labs/features.ts
+++ b/src/features/Settings/labs/features.ts
@@ -173,7 +173,6 @@ const ALL_LAB_FEATURES: LabFeatureItem[] = [
stage: 'alpha',
},
{
- desktopOnly: true,
flag: 'enableCodexAppServer',
i18nKey: 'codexAppServer',
searchKeywords: ['codex', 'app server'],
diff --git a/src/features/SettingsSearch/items.test.ts b/src/features/SettingsSearch/items.test.ts
index f89b9e65730..7c5a9ba5b98 100644
--- a/src/features/SettingsSearch/items.test.ts
+++ b/src/features/SettingsSearch/items.test.ts
@@ -51,6 +51,15 @@ describe('settings search index', () => {
}
});
+ it('offers Codex App Server in web settings search for connected-device runs', () => {
+ const item = SETTINGS_SEARCH_ITEMS.find(
+ (entry) => entry.anchor === 'labs-enableCodexAppServer',
+ );
+
+ expect(item).toBeDefined();
+ expect(item!.visible?.(webContext) ?? true).toBe(true);
+ });
+
it('shows workspace lab features exactly where business features are enabled', () => {
const labsItems = SETTINGS_SEARCH_ITEMS.filter((item) => item.tab === SettingsTabs.Labs);
const workspaceItems = LAB_FEATURES.filter((feature) => feature.workspaceOnly).map(({ flag }) =>