[PR #1112] [CLOSED] web: make MCP tool activity readable and collapsible #3035

Closed
opened 2026-11-04 02:05:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1112
Author: @medking82
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: codex/tool-activity-upstream-20261006


📝 Commits (1)

  • 95b7454 web: group tool activity with readable subjects and preserved disclosure

📊 Changes

6 files changed (+425 additions, -38 deletions)

View changed files

📝 serve/web/app.css (+21 -6)
📝 serve/web/app.js (+40 -32)
📝 serve/web/index.html (+1 -0)
➕ serve/web/tool-activity.js (+88 -0)
➕ tools/test_tool_activity.cjs (+80 -0)
➕ tools/test_tool_activity_integration.cjs (+195 -0)

📄 Description

MCP-heavy answers currently stack one row per call with raw JSON result previews, making the answer hard to scan. This groups adjacent calls at the same answer position into a collapsed activity summary, shows a readable query/page subject, and keeps failed or skipped calls visible in the summary. Expanding a call still exposes the original arguments and the result sent to the model.

  • Preserve answer/tool ordering and original call indexes. Group disclosure stays outside serialized chat history; open groups retain their internal scroll position and keyboard focus during repaint.
  • Render result bodies only on expansion. Generic MCP tools remain supported; search/page tools get concise subjects and optional HTTP(S) source links without URL credentials.
  • Use the existing CSS tokens and native details controls, including keyboard focus and reduced-motion behavior.

Validation on the rewritten main at 82f46a8c8f475f001ad76d92f58f4a4f8ffb0253:

  • node --test tools/test_tool_activity.cjs tools/test_tool_activity_integration.cjs: 13/13 passed. Includes actual app rendering/click/stream-event/history functions, ordering, disclosure persistence, focus restoration, escaped payloads and canonical source URLs.
  • node --check serve/web/app.js, node --check serve/web/tool-activity.js, and git diff --check: passed.
  • Four browser interaction checks passed in an isolated synthetic fixture using this branch's actual message renderer, handlers and CSS: nested raw details/source links, keyboard disclosure/focus, collapsed partial-failure summary, and separate failed/skipped rows. This did not exercise a live model or MCP transport.

This is a display-only contribution extracted from my fork. It changes no server endpoints, tool execution policy, loop limits, search defaults or resource allocation. Companion #1106 addresses Thinking scroll behavior independently; both touch the disclosure handler in app.js, so the explicit no-follow argument should be retained when integrating them.

UI example

Illustrative screenshot of the current fork UI, rendered with entirely fictional projects, chats, messages and synthetic Monitor values. The grouped “Web research” card demonstrates the tool-activity presentation in this PR. The surrounding Project sidebar, Monitor panel, skills controls and resource controls are separate fork features, and the displayed numbers are demo data rather than benchmark results.

Strata fork UI example with synthetic data


🔄 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/Niko1221/Strata/pull/1112 **Author:** [@medking82](https://github.com/medking82) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/tool-activity-upstream-20261006` --- ### 📝 Commits (1) - [`95b7454`](https://github.com/Niko1221/Strata/commit/95b74547591fb9dbe070b383d8f32faa05446a75) web: group tool activity with readable subjects and preserved disclosure ### 📊 Changes **6 files changed** (+425 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `serve/web/app.css` (+21 -6) 📝 `serve/web/app.js` (+40 -32) 📝 `serve/web/index.html` (+1 -0) ➕ `serve/web/tool-activity.js` (+88 -0) ➕ `tools/test_tool_activity.cjs` (+80 -0) ➕ `tools/test_tool_activity_integration.cjs` (+195 -0) </details> ### 📄 Description MCP-heavy answers currently stack one row per call with raw JSON result previews, making the answer hard to scan. This groups adjacent calls at the same answer position into a collapsed activity summary, shows a readable query/page subject, and keeps failed or skipped calls visible in the summary. Expanding a call still exposes the original arguments and the result sent to the model. - Preserve answer/tool ordering and original call indexes. Group disclosure stays outside serialized chat history; open groups retain their internal scroll position and keyboard focus during repaint. - Render result bodies only on expansion. Generic MCP tools remain supported; search/page tools get concise subjects and optional HTTP(S) source links without URL credentials. - Use the existing CSS tokens and native details controls, including keyboard focus and reduced-motion behavior. Validation on the rewritten main at `82f46a8c8f475f001ad76d92f58f4a4f8ffb0253`: - `node --test tools/test_tool_activity.cjs tools/test_tool_activity_integration.cjs`: 13/13 passed. Includes actual app rendering/click/stream-event/history functions, ordering, disclosure persistence, focus restoration, escaped payloads and canonical source URLs. - `node --check serve/web/app.js`, `node --check serve/web/tool-activity.js`, and `git diff --check`: passed. - Four browser interaction checks passed in an isolated synthetic fixture using this branch's actual message renderer, handlers and CSS: nested raw details/source links, keyboard disclosure/focus, collapsed partial-failure summary, and separate failed/skipped rows. This did not exercise a live model or MCP transport. This is a display-only contribution extracted from my fork. It changes no server endpoints, tool execution policy, loop limits, search defaults or resource allocation. Companion #1106 addresses Thinking scroll behavior independently; both touch the disclosure handler in app.js, so the explicit no-follow argument should be retained when integrating them. ## UI example Illustrative screenshot of the current fork UI, rendered with entirely fictional projects, chats, messages and synthetic Monitor values. The grouped “Web research” card demonstrates the tool-activity presentation in this PR. The surrounding Project sidebar, Monitor panel, skills controls and resource controls are separate fork features, and the displayed numbers are demo data rather than benchmark results. ![Strata fork UI example with synthetic data](https://github.com/user-attachments/assets/c2229a63-5671-4235-89a5-72f309459027) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:05:06 +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
Niko1221/Strata#3035
No description provided.