[PR #894] [MERGED] Show agent failure details in the HUD #4828

Closed
opened 2026-10-22 04:10:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/894
Author: @cha1latte
Created: 5/15/2026
Status: ✅ Merged
Merged: 5/15/2026
Merged by: @cha1latte

Base: staging ← Head: feat/issue-859-agent-failure-ui


📝 Commits (1)

  • 2993778 Show agent failure details

📊 Changes

7 files changed (+202 additions, -24 deletions)

View changed files

📝 packages/client/src/components/chat/RoleplayHUD.tsx (+6 -0)
📝 packages/client/src/components/chat/RoleplayHUDActionsMenu.tsx (+37 -0)
📝 packages/client/src/hooks/use-generate.ts (+33 -20)
➕ packages/client/src/lib/agent-failures.ts (+85 -0)
📝 packages/client/src/stores/agent.store.ts (+22 -2)
📝 packages/server/src/routes/generate.routes.ts (+11 -1)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+8 -1)

📄 Description

Linked issue

Closes #859

Why this change

  • Agent failures currently surface as generic failure UI, which makes it hard to tell which agent failed or whether the likely cause was a context limit, timeout, rejection, or another common error category.

What changed

  • Preserve failed agent display names in server SSE failure payloads for retry summaries and agent-specific error events.
  • Store rich failed-agent details in the client while keeping the existing agent type list for retry behavior.
  • Add shared client formatting/classification helpers for common agent failure reasons.
  • Show failed agent names, inferred reason labels, and error details in the roleplay HUD actions menu and failure toast.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex ran pnpm exec esbuild scratch/verify-issue-859-agent-failures.ts --bundle --platform=node --format=esm --outfile=scratch/verify-issue-859-agent-failures.mjs and node scratch/verify-issue-859-agent-failures.mjs; the scratch proof classified context-limit, timeout, and rejection failures, preserved retry agent types, and verified legacy type-only fallback details.
  • Codex rendered the real RoleplayHUDActionsMenu component through a scratch browser proof page at http://127.0.0.1:5859/issue-859-ui-proof.html; Playwright snapshot showed Failed agents, World State (Context limit), Expression Engine (Timeout), and Retry Failed Agents (2).
  • Codex ran pnpm check; it passed locally.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No docs or release metadata changes needed; this changes existing agent failure UI behavior only.

UI evidence (if applicable)

Playwright browser snapshot from the scratch component proof showed the roleplay HUD actions menu rendering failed agent names and inferred reason labels:

  • World State (Context limit)
  • Expression Engine (Timeout)
  • Retry Failed Agents (2)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/894 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/15/2026 **Status:** ✅ Merged **Merged:** 5/15/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `feat/issue-859-agent-failure-ui` --- ### 📝 Commits (1) - [`2993778`](https://github.com/Pasta-Devs/Marinara-Engine/commit/29937784a76a8f9788e16d73c85cec76d9922ea1) Show agent failure details ### 📊 Changes **7 files changed** (+202 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/RoleplayHUD.tsx` (+6 -0) 📝 `packages/client/src/components/chat/RoleplayHUDActionsMenu.tsx` (+37 -0) 📝 `packages/client/src/hooks/use-generate.ts` (+33 -20) ➕ `packages/client/src/lib/agent-failures.ts` (+85 -0) 📝 `packages/client/src/stores/agent.store.ts` (+22 -2) 📝 `packages/server/src/routes/generate.routes.ts` (+11 -1) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+8 -1) </details> ### 📄 Description ## Linked issue Closes #859 ## Why this change - Agent failures currently surface as generic failure UI, which makes it hard to tell which agent failed or whether the likely cause was a context limit, timeout, rejection, or another common error category. ## What changed - Preserve failed agent display names in server SSE failure payloads for retry summaries and agent-specific error events. - Store rich failed-agent details in the client while keeping the existing agent type list for retry behavior. - Add shared client formatting/classification helpers for common agent failure reasons. - Show failed agent names, inferred reason labels, and error details in the roleplay HUD actions menu and failure toast. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Codex ran `pnpm exec esbuild scratch/verify-issue-859-agent-failures.ts --bundle --platform=node --format=esm --outfile=scratch/verify-issue-859-agent-failures.mjs` and `node scratch/verify-issue-859-agent-failures.mjs`; the scratch proof classified context-limit, timeout, and rejection failures, preserved retry agent types, and verified legacy type-only fallback details. - Codex rendered the real `RoleplayHUDActionsMenu` component through a scratch browser proof page at `http://127.0.0.1:5859/issue-859-ui-proof.html`; Playwright snapshot showed `Failed agents`, `World State (Context limit)`, `Expression Engine (Timeout)`, and `Retry Failed Agents (2)`. - Codex ran `pnpm check`; it passed locally. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No docs or release metadata changes needed; this changes existing agent failure UI behavior only. ## UI evidence (if applicable) Playwright browser snapshot from the scratch component proof showed the roleplay HUD actions menu rendering failed agent names and inferred reason labels: - `World State (Context limit)` - `Expression Engine (Timeout)` - `Retry Failed Agents (2)` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:59 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4828
No description provided.