Repository navigation
Conversation
Every row in the MCP Server window's Recent Activity panel previously rendered its full structured result (or embedded screenshot) at all times. On a busy session with dozens of tool calls this made the panel noticeably slower to lay out/repaint, and buried the one entry a user actually cared about under a wall of unrelated detail. - Collapse each row to a one-line summary by default; clicking the header row or the summary line expands/collapses it in place. - The most recently added row still auto-expands so the latest result stays visible without an extra click, but any row a user has manually expanded or collapsed keeps that state as newer entries arrive (only the automatic "latest" expansion is ever superseded, and only if the user hasn't touched that row). - The summary line now stretches to the panel's actual width on every relayout (grows back on widen, shrinks on narrow) instead of a fixed character cap that either truncated it short of the available space or couldn't grow into a wider window. - Hovering a row (header or summary line) shows the same formatted, multi-line detail text the expanded view renders. This intercepts the TooltipEvent during the trickle-down phase before Unity's default per-Label ellipsis tooltip -- which shows raw, unformatted text and could disagree with what the header showed -- gets a chance to supply it.
Create detail controls and screenshot textures on expansion; release them on collapse, clear, eviction, and disposal. Preserve manual expansion choices and invalidate queued callbacks after clear or rebuild. Use formatted display text for summaries, retain the bounded longer plain-text display, and add 12 interactive Editor UI regression cases. Verified in Unity 2022.3.62f3c1: 34 focused tests passed; full EditMode suite 410 passed, 0 failed, 10 skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The MCP Server window's Recent Activity panel rendered every row's full
structured result (or embedded screenshot) at all times. On a busy session
with dozens of tool calls this had two costs:
of colored key/value Labels (or a decoded screenshot Image), so a long
session accumulates dozens of these live UI subtrees at once. Layout and
repaint of the panel became noticeably sluggish as the list grew.
user actually wanted to check was buried under a wall of detail from
unrelated calls, making the panel hard to scan.
What changed
summary by default. Clicking the header row or the summary line expands
it in place (both are wired up since they are sibling elements, not nested).
recently added row still expands automatically so the newest result is
visible without an extra click. A small per-row
RowExpandStatetrackswhether a user has manually toggled a row; when a new entry becomes the
latest, the previously auto-expanded row collapses back unless the user
touched it themselves in the meantime -- manual choices are never
overridden by the "latest" auto-expand behavior, and any row a user
expanded (auto-latest or not) stays expanded across future entries.
summary previously used a fixed character cap before appending an ellipsis,
which either truncated it well short of the available width or couldn't
grow when the window was widened. It now relies on the default
stretch-to-parent cross-axis sizing (matching how the header row already
behaves) with
minWidth = 0so theNoWraptext's intrinsic width can'tfight a relayout in either direction, and lets CSS
TextOverflow.Ellipsisclip it at whatever the row's real width is on every relayout.
line) shows the same formatted, multi-line detail text the expanded view
renders. A plain
card.tooltipassignment isn't enough: an ellipsis-truncated
Labelsupplies its own default tooltip (its raw, unformattedtext) the moment it's hovered, which pre-empts an ancestor's tooltip and
made the header and the summary line show different content. This
intercepts the
TooltipEventduring the trickle-down (capture) phase onthe card, before it reaches any child, so the same formatted value always
wins regardless of which part of the row is hovered.
Validation
request_recompile/get_compilation_errors: no errors.execute_codereflection against the liveVisualElementtree of an open MCP Server window (not just visual screenshots):
resolvedStyle.displayfor each row's details container confirmscollapsed-by-default and toggles correctly on a simulated
ClickEventsent to both the header row and the summary line.
resolvedStyle.widthon the summaryLabelconfirms it shrinks andgrows back to match the card's actual width.
previous auto-expanded ("latest") row collapses while the manually
expanded row and the new latest row both stay/become expanded.
TooltipEventto the header, an inner header Label,and the summary
Labelof several rows confirms all three now resolveto the exact same formatted tooltip text.
CHANGELOG.mdupdated under[Unreleased].