[PR #7337] [MERGED] feat(agents): show running and failed agents on the Agent activity icon #7688

Closed
opened 2026-10-24 04:06:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7337
Author: @SpicyMarinara
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/7322-agent-activity-status


📝 Commits (2)

  • c7264fb feat(agents): show running and failed agents on the Agent activity icon
  • 7704d18 Merge origin/staging into feat/7322-agent-activity-status

📊 Changes

12 files changed (+247 additions, -6 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/roleplay/getting-started.md (+2 -0)
📝 e2e/chat-settings-tools.e2e.ts (+81 -0)
➕ packages/client/src/components/agents/AgentActivityIcon.tsx (+50 -0)
📝 packages/client/src/components/agents/AgentActivitySection.tsx (+16 -3)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+2 -1)
📝 packages/client/src/components/chat/RoleplayTrackerWindow.tsx (+2 -1)
📝 packages/client/src/features/tracker-panel/components/TrackerAgentActivitySection.tsx (+2 -1)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/client/src/stores/agent.store.ts (+17 -0)
📝 packages/client/src/styles/globals.css (+6 -0)
➕ scripts/regressions/agent-activity-status.regression.ts (+66 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7322

Why this change

  • In the redesigned Roleplay UI the Agent activity icon never changes. You cannot tell from it whether agents are still working or whether one failed; you have to open Agent activity to find out. The reporter's screenshot shows the Trackers window's Agent activity popped out to a bubble, which looks exactly the same in every state.
  • Marinara's direction in the issue: "the icon changes to loading icon when agents are working and a dot shows up when something goes wrong."

What changed

  • New AgentActivityIcon (packages/client/src/components/agents/AgentActivityIcon.tsx) wraps each surface's own Agent activity icon:
    • While the chat's agents run (the existing processingChatIds state, no new polling), a spinner takes the icon's place and size. It stops spinning under reduced motion and stays a spinner shape.
    • When an agent fails, a small dot appears in the theme's accent held steady (--marinara-app-accent-static, the same pattern as the Advanced Memory attention dot), so Accent Pulse never makes it flash.
    • Screen readers hear "Agents are running" or "N agents failed" with the drawer's name.
  • It is used on all three Agent activity icons: the Chat Settings drawer (Activity), the Trackers window drawer (ListChecks) and the Tracker Panel section (Sparkles). Because the status is part of the icon, it also shows on a popped-out Agent activity window's title, its bubble and the phone Chat tools menu, on desktop and phone.
  • When the dot clears:
    • With the same semantics as the old Agents & Actions failure badge (pre-#7049 RoleplayHUD): it follows failedAgentTypes, so a new reply, a retry, Clear Trackers or a chat change clears it.
    • Also once Agent activity has been on screen. AgentActivitySection watches itself with an IntersectionObserver while there are unseen failures, and marks them seen through a new failedAgentsSeen flag in agent.store. Every later failure resets the flag. Seeing the failures never drops them, so Retry Failed Agents still works.
  • One CSS rule lets the wrapped icon grow with a custom chat widget button size, like every other bubble icon.
  • The icon is passed through a function, withAgentActivityStatus(chatId, <Icon />), so chat-window-icons.regression.ts still sees and checks each surface's own icon.
  • English docs (docs/roleplay/getting-started.md, Agent activity) and the CHANGELOG mention the indicator. A [docs-i18n] follow-up issue tracks the translations.

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

  • Manually verify in a Roleplay chat with agents on: send a message and check that the Agent activity icon in Chat Settings turns into a spinner while the agents run and goes back to its icon afterwards.
  • Manually verify that an agent failure (for example a tracker on a connection that errors) shows a dot on the Agent activity icon, and that opening Agent activity clears the dot while the failed list and Retry Failed Agents stay.
  • Manually verify the same on the Trackers window's Agent activity drawer, after popping it out and closing it to a bubble, and on the Tracker Panel's Agent activity section.
  • Manually verify on a phone layout: the spinner and dot show on the Agent activity bubble or Chat tools entry, and opening it clears the dot.
  • Manually verify with Accent Pulse on that the dot stays one steady colour, and with a custom theme that it uses the theme's accent.
  • Manually verify with a custom chat widget button size that the popped-out Agent activity bubble's icon and spinner grow with it.

Agent-run checks: node ./scripts/run-regressions.mjs --filter agent-activity-status (new; a mutation that drops the reset on a later failure makes it fail), --filter chat-window-icons, --filter agent-progress, pnpm localization:check, pnpm check:e2e-types and pnpm check passed. Playwright, desktop-chromium and mobile-chromium: e2e/chat-settings-tools.e2e.ts (including the new "the Agent activity icon shows running and failed agents until it is opened"), e2e/tracker-window.e2e.ts and the phone-bubbles.e2e.ts tracker / "agents run" tests passed (16 passed, 8 skipped by their own project guards). mobile-webkit was not run locally. A throwaway Playwright script (not committed) also checked that on desktop the Trackers window's Agent activity, popped out and closed to a bubble, shows the spinner and the dot, and that opening the bubble clears the dot; the screenshots looked right. Local CodeRabbit (--committed against the staging merge base) finished with 0 findings.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Not attached yet. The Playwright test above covers the drawer states.

Summary by CodeRabbit

  • New Features
    • Agent activity icons now spin while agents are working and show a failure indicator for unseen failures. Opening Agent activity clears the indicator; failed agents remain available to retry.
    • Status indicators are available in Chat Settings, the Tracker window, the Tracker Panel, and the popped-out Agent activity button on computers and phones.
  • Documentation
    • Updated the Roleplay getting-started guide to explain the activity indicators.

🔄 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/7337 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/7322-agent-activity-status` --- ### 📝 Commits (2) - [`c7264fb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c7264fb7636e7daf8bfb2220c4dfdddc700711bd) feat(agents): show running and failed agents on the Agent activity icon - [`7704d18`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7704d18aafc42f6624da4cadccc318b8f2a0811d) Merge origin/staging into feat/7322-agent-activity-status ### 📊 Changes **12 files changed** (+247 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/roleplay/getting-started.md` (+2 -0) 📝 `e2e/chat-settings-tools.e2e.ts` (+81 -0) ➕ `packages/client/src/components/agents/AgentActivityIcon.tsx` (+50 -0) 📝 `packages/client/src/components/agents/AgentActivitySection.tsx` (+16 -3) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+2 -1) 📝 `packages/client/src/components/chat/RoleplayTrackerWindow.tsx` (+2 -1) 📝 `packages/client/src/features/tracker-panel/components/TrackerAgentActivitySection.tsx` (+2 -1) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/client/src/stores/agent.store.ts` (+17 -0) 📝 `packages/client/src/styles/globals.css` (+6 -0) ➕ `scripts/regressions/agent-activity-status.regression.ts` (+66 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #7322 ## Why this change - In the redesigned Roleplay UI the **Agent activity** icon never changes. You cannot tell from it whether agents are still working or whether one failed; you have to open Agent activity to find out. The reporter's screenshot shows the Trackers window's Agent activity popped out to a bubble, which looks exactly the same in every state. - Marinara's direction in the issue: "the icon changes to loading icon when agents are working and a dot shows up when something goes wrong." ## What changed - New `AgentActivityIcon` (`packages/client/src/components/agents/AgentActivityIcon.tsx`) wraps each surface's own Agent activity icon: - While the chat's agents run (the existing `processingChatIds` state, no new polling), a spinner takes the icon's place and size. It stops spinning under reduced motion and stays a spinner shape. - When an agent fails, a small dot appears in the theme's accent held steady (`--marinara-app-accent-static`, the same pattern as the Advanced Memory attention dot), so Accent Pulse never makes it flash. - Screen readers hear "Agents are running" or "N agents failed" with the drawer's name. - It is used on all three Agent activity icons: the **Chat Settings** drawer (`Activity`), the **Trackers** window drawer (`ListChecks`) and the **Tracker Panel** section (`Sparkles`). Because the status is part of the icon, it also shows on a popped-out Agent activity window's title, its bubble and the phone **Chat tools** menu, on desktop and phone. - When the dot clears: - With the same semantics as the old Agents & Actions failure badge (pre-#7049 `RoleplayHUD`): it follows `failedAgentTypes`, so a new reply, a retry, Clear Trackers or a chat change clears it. - Also once Agent activity has been on screen. `AgentActivitySection` watches itself with an `IntersectionObserver` while there are unseen failures, and marks them seen through a new `failedAgentsSeen` flag in `agent.store`. Every later failure resets the flag. Seeing the failures never drops them, so **Retry Failed Agents** still works. - One CSS rule lets the wrapped icon grow with a custom chat widget button size, like every other bubble icon. - The icon is passed through a function, `withAgentActivityStatus(chatId, <Icon />)`, so `chat-window-icons.regression.ts` still sees and checks each surface's own icon. - English docs (`docs/roleplay/getting-started.md`, Agent activity) and the CHANGELOG mention the indicator. A `[docs-i18n]` follow-up issue tracks the translations. ## 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 - Manually verify in a Roleplay chat with agents on: send a message and check that the Agent activity icon in Chat Settings turns into a spinner while the agents run and goes back to its icon afterwards. - Manually verify that an agent failure (for example a tracker on a connection that errors) shows a dot on the Agent activity icon, and that opening Agent activity clears the dot while the failed list and **Retry Failed Agents** stay. - Manually verify the same on the Trackers window's Agent activity drawer, after popping it out and closing it to a bubble, and on the Tracker Panel's Agent activity section. - Manually verify on a phone layout: the spinner and dot show on the Agent activity bubble or Chat tools entry, and opening it clears the dot. - Manually verify with Accent Pulse on that the dot stays one steady colour, and with a custom theme that it uses the theme's accent. - Manually verify with a custom chat widget button size that the popped-out Agent activity bubble's icon and spinner grow with it. Agent-run checks: `node ./scripts/run-regressions.mjs --filter agent-activity-status` (new; a mutation that drops the reset on a later failure makes it fail), `--filter chat-window-icons`, `--filter agent-progress`, `pnpm localization:check`, `pnpm check:e2e-types` and `pnpm check` passed. Playwright, desktop-chromium and mobile-chromium: `e2e/chat-settings-tools.e2e.ts` (including the new "the Agent activity icon shows running and failed agents until it is opened"), `e2e/tracker-window.e2e.ts` and the `phone-bubbles.e2e.ts` tracker / "agents run" tests passed (16 passed, 8 skipped by their own project guards). mobile-webkit was not run locally. A throwaway Playwright script (not committed) also checked that on desktop the Trackers window's Agent activity, popped out and closed to a bubble, shows the spinner and the dot, and that opening the bubble clears the dot; the screenshots looked right. Local CodeRabbit (`--committed` against the staging merge base) finished with 0 findings. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Not attached yet. The Playwright test above covers the drawer states. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Agent activity icons now spin while agents are working and show a failure indicator for unseen failures. Opening Agent activity clears the indicator; failed agents remain available to retry. * Status indicators are available in Chat Settings, the Tracker window, the Tracker Panel, and the popped-out Agent activity button on computers and phones. * **Documentation** * Updated the Roleplay getting-started guide to explain the activity indicators. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:06:32 +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#7688
No description provided.