lobehub/src
Arvin Xu 8109bbbbc3
🐛 fix(gateway): route approve/reject via lab flag (#13863)
🐛 fix(gateway): route approve/reject via lab flag, not transient server op state

After the coordinator fix for `waiting_for_human` (#13860) the paused
`execServerAgentRuntime` op is marked `completed` client-side as soon
as the server emits `agent_runtime_end`. `startOperation` then runs
`cleanupCompletedOperations(30_000)`, which deletes any op completed
more than 30 seconds ago — so by the time the user sees the
InterventionBar and clicks approve/reject, the running (or recently
completed) server op is gone.

The previous `#hasRunningServerOp` check therefore kept returning
false against a live Gateway backend, flipping approve/reject into
the client-mode `internal_execAgentRuntime` branch and stranding the
server-side paused conversation.

Switch the helper to `#shouldUseGatewayResume`, which checks the same
`isGatewayModeEnabled()` lab flag used to route the initial send. The
signal now mirrors how the conversation was dispatched and survives
the op-cleanup window.

New regression test exercises the post-coordinator-fix state: the
paused `execServerAgentRuntime` op is explicitly `completed` before
the approve call runs, and we still expect the Gateway branch to
fire with `decision='approved'`.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 09:26:22 +08:00
..
app feat(agent-runtime): server-side human approval flow (#13829) 2026-04-15 11:07:06 +08:00
business feat(subscription): add cross-platform subscription support for mobile IAP (#13413) 2026-04-11 00:27:51 +08:00
components 🐛 fix(desktop): remote re-auth for batched tRPC and clean OIDC on disconnect (#13614) 2026-04-07 22:57:49 +08:00
config 🌐 chore: translate non-English comments to English in src/app/(backend) (#12836) 2026-03-09 20:03:13 +08:00
const feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) 2026-03-30 20:28:54 +08:00
envs 🐛 fix: message gateway queue error (#13816) 2026-04-14 22:10:17 +08:00
features 🐛 fix(gateway): clean up paused server op after human approve/reject (#13860) 2026-04-16 01:43:00 +08:00
helpers 🐛 fix: drop manifests missing api before feeding ToolsEngine (#13856) 2026-04-16 01:04:55 +08:00
hooks feat: support layout custom sort and fix copy (#13812) 2026-04-14 23:49:47 +08:00
layout 🐛 fix: layout recent locale and support dismiss banner (#13739) 2026-04-11 23:27:21 +08:00
libs feat: support run client tools in agent gateway mode (#13792) 2026-04-14 21:30:13 +08:00
locales 💄 style(chat): tighten execServerAgentRuntime loading copy (#13855) 2026-04-15 23:42:37 +08:00
routes 💄 style: agent documents (#13857) 2026-04-16 01:05:27 +08:00
server 🐛 fix(gateway): clean up paused server op after human approve/reject (#13860) 2026-04-16 01:43:00 +08:00
services 🔨 chore: wire server-mode human approval through conversationControl (#13830) 2026-04-15 21:17:22 +08:00
spa feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) 2026-03-30 20:28:54 +08:00
store 🐛 fix(gateway): route approve/reject via lab flag (#13863) 2026-04-16 09:26:22 +08:00
styles 🌐 chore: translate non-English comments to English in packages (#13427) 2026-03-31 18:11:39 +08:00
types feat(desktop): add Electron version display in system tools settings (#13630) 2026-04-07 21:53:27 +08:00
utils ♻️ refactor(navigation): stable navigate hook and imperative routing (#13795) 2026-04-14 13:28:12 +08:00
auth.ts 🔨 chore: project structure businessify (#10930) 2025-12-24 17:52:22 +08:00
initialize.ts feat(resource): add select all hint and improve resource explorer selection (#13134) 2026-03-28 11:51:23 +08:00
instrumentation.node.ts feat:support LobeHub MarketPlace (#8841) 2025-11-11 23:16:19 +08:00
instrumentation.ts 🐛 fix: message gateway ensure running (#13780) 2026-04-13 17:43:18 +08:00
proxy.ts feat(onboarding): agent web onboarding, feature toggle, and lifecycle sync (#13139) 2026-03-30 20:28:54 +08:00
vite.d.ts 🔨 chore(vite): support direct markdown imports (#13216) 2026-03-24 14:33:57 +08:00