feat(mastracode): add quiet mode#16771
Conversation
Render quiet mode tool calls with per-tool compact summaries so repeated non-shell tools stack without gaps while shell tools keep a bounded output block. Reapply quiet rendering to existing tool components when toggled and normalize spacing around assistant, user, plan, and shell transitions. Add focused coverage for quiet tool rendering, history replay, and live tool handler behavior, plus a changeset for the mastracode patch. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Move chat boundary spacing into a shared spacer layer so quiet-mode tools and messages use consistent gaps without double spacing. This keeps adjacent compact tool calls touching while preserving one-line transitions to shell tools, messages, and plan UI. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Centralize live chat boundary spacing so quiet tool calls render consistent gaps while streaming. Group adjacent compact tools by tool name and render repeated paths with aligned connector continuations.\n\nCo-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Improve quiet mode rendering by tightening compact tool spacing during live streaming, grouping repeated compact tool output with subtle continuation lines, and hiding noisy observation/title markers. Add edited line ranges to workspace edit-file results so compact edit summaries can show where replacements happened without reading files during render. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Add persistent quiet-mode preview lines for tool calls so streaming write, edit, grep, list, and view operations show useful progress without expanding full tool boxes. Tighten compact tool spacing and grouping, keep tool labels orange except failures, show list result counts and previews, reserve input spacing when no task list is present, and make pending user-message spacing match confirmed messages. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Quiet mode previews are now persistent detail lines, so remove the old retained-marquee clearing lifecycle and keep spacing driven by boundary reconciliation. Also clean up two indentation oddities found during self-review. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Render task progress as a single quiet-mode line to reduce vertical noise while keeping the existing expanded list in normal mode. Keep task order stable, show progress as a compact dim count, and preserve completed task styling inline. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Render completed and cleared task history through the centralized chat boundary spacer path so they get the expected one-line gap as soon as they enter history. This prevents the gap from appearing only after a later message triggers spacing reconciliation. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Keep quiet mode task summaries from wrapping individual items and make compact tool continuation paths render only stable connector chunks while streaming. This avoids flicker when repeated file tools share path prefixes. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Add a quiet mode setting for selecting how many compact tool preview lines to show, including a None option that hides previews entirely. Apply the setting to live tool calls, message-streamed tools, and history replay so quiet mode rendering stays consistent. Also keep continuation connectors accurate when previews are hidden and preserve useful path context for repeated compact view/edit calls. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Default new installs to quiet mode with two compact tool preview lines, while preserving existing users' classic rendering unless they already opted in. Add a one-time lightweight prompt for existing classic users to choose quiet mode and preview line count without rerunning onboarding. Mark manual quiet mode toggles as an explicit preference so users are not prompted again. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Add a shared CLI highlight theme for tool preview code so unmatched syntax uses the warm argument color instead of bright terminal text. Render grep and list quiet preview detail lines with the same warm color while keeping compact tool arguments in primary text for readability. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Render line ranges in quiet compact tool summaries with dim styling so path targets match the visual hierarchy of the full tool view. This keeps filenames prominent while making line numbers less visually loud in view, edit, and continuation summaries. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: d35b53a The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR implements quiet mode as the default for new MastraCode installs with a one-time preference prompt for existing users. It adds configurable tool preview line limits (0–8 lines), introduces chat boundary spacing reconciliation to normalize vertical spacing between chat components, and enables the edit-file workspace tool to report edited line ranges. ChangesQuiet Mode Rollout & Chat Boundary Spacing
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
mastracode/src/onboarding/settings.ts (1)
509-511:⚠️ Potential issue | 🟠 Major | ⚡ Quick winLegacy auth migration path suppresses the one-time quiet-mode prompt.
When
settings.jsonis absent duringmigrateFromAuth, this branch clonesDEFAULTS(wherequietModePreferenceSelectedistrue) and never applies rollout derivation. Existing users on this path can be marked “already selected” without ever seeing the opt-in prompt.💡 Proposed fix
} else { settings = structuredClone(DEFAULTS); + applyQuietModePreferenceRollout(settings, undefined); }Optionally apply the same fallback in the parse-failure catch branch for consistency.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@mastracode/src/onboarding/settings.ts` around lines 509 - 511, The branch in migrateFromAuth that does `settings = structuredClone(DEFAULTS)` silently preserves DEFAULTS.quietModePreferenceSelected=true and skips the rollout-derived opt-in prompt; change this to clone DEFAULTS and then apply the same quiet-mode rollout derivation used elsewhere (i.e., invoke the helper that computes/sets quietModePreferenceSelected from rollout data or replicate that logic) so users on the legacy path get the one-time prompt, and make the same change in the parse-failure catch branch so both fallbacks derive the rollout rather than leaving quietModePreferenceSelected pre-set.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mastracode/src/onboarding/settings.ts`:
- Around line 288-289: The current assignment to maxPreviewLines (using
raw.quietModeMaxToolPreviewLines) can preserve NaN/Infinity and allow huge
values; change the normalization to: parse the incoming value to a finite
integer (e.g., via Number(raw.quietModeMaxToolPreviewLines) and Math.trunc),
check Number.isFinite, and then clamp it into a supported range (e.g., between 0
and a MAX_ALLOWED_PREVIEW_LINES constant you add or an appropriate default like
DEFAULTS.preferences.quietModeMaxToolPreviewLines) falling back to the safe
default when invalid; apply the same finite-integer + clamp logic to the
analogous value handled at the other site referenced (lines 294-295) so both
preview line/char limits are guarded.
In `@mastracode/src/tui/handlers/om.ts`:
- Around line 168-172: Before clearing state.activeBufferingMarker in the
quiet-mode branch, explicitly remove/unmount the existing buffering marker
component to avoid leaving a stale row visible: if state.activeBufferingMarker
exists, call its removal method (e.g., unmount/destroy/remove) on the marker
instance, then set state.activeBufferingMarker = undefined and call
state.ui.requestRender(); update the block around state.quietMode to perform
this removal first (use the actual removal method implemented on the marker
type).
---
Outside diff comments:
In `@mastracode/src/onboarding/settings.ts`:
- Around line 509-511: The branch in migrateFromAuth that does `settings =
structuredClone(DEFAULTS)` silently preserves
DEFAULTS.quietModePreferenceSelected=true and skips the rollout-derived opt-in
prompt; change this to clone DEFAULTS and then apply the same quiet-mode rollout
derivation used elsewhere (i.e., invoke the helper that computes/sets
quietModePreferenceSelected from rollout data or replicate that logic) so users
on the legacy path get the one-time prompt, and make the same change in the
parse-failure catch branch so both fallbacks derive the rollout rather than
leaving quietModePreferenceSelected pre-set.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9ae03c42-f9d1-44d6-865f-0b4f0c127227
📒 Files selected for processing (40)
.changeset/fluffy-cities-change.md.changeset/funny-pets-obey.md.changeset/goofy-hoops-win.md.changeset/kind-laws-vanish.md.changeset/quiet-previews-shine.md.changeset/salty-phones-dream.md.changeset/smooth-tools-flow.md.changeset/wacky-geckos-drop.mdmastracode/src/onboarding/__tests__/settings.test.tsmastracode/src/onboarding/settings.tsmastracode/src/tui/__tests__/mastra-tui-quiet-mode.test.tsmastracode/src/tui/__tests__/render-messages.test.tsmastracode/src/tui/chat-boundary-reconciliation.tsmastracode/src/tui/commands/settings.tsmastracode/src/tui/components/__tests__/chat-boundary-spacer.test.tsmastracode/src/tui/components/__tests__/task-progress.test.tsmastracode/src/tui/components/__tests__/tool-execution-enhanced.test.tsmastracode/src/tui/components/ask-question-dialog.tsmastracode/src/tui/components/assistant-message.tsmastracode/src/tui/components/chat-boundary-spacer.tsmastracode/src/tui/components/chat-spacing.tsmastracode/src/tui/components/plan-approval-inline.tsmastracode/src/tui/components/settings.tsmastracode/src/tui/components/task-progress.tsmastracode/src/tui/components/tool-execution-enhanced.tsmastracode/src/tui/components/tool-execution-interface.tsmastracode/src/tui/components/user-message.tsmastracode/src/tui/handlers/__tests__/message.test.tsmastracode/src/tui/handlers/message.tsmastracode/src/tui/handlers/om.tsmastracode/src/tui/handlers/tool.test.tsmastracode/src/tui/handlers/tool.tsmastracode/src/tui/mastra-tui.tsmastracode/src/tui/modal-question.tsmastracode/src/tui/render-messages.test.tsmastracode/src/tui/render-messages.tsmastracode/src/tui/setup.tsmastracode/src/tui/state.tspackages/core/src/workspace/tools/__tests__/edit-file.test.tspackages/core/src/workspace/tools/edit-file.ts
Group related PR changes into fewer, clearer changesets so the release notes stay focused and easier to review. Remove the accidental prerelease changeset file and stale recorder changeset that do not match this branch's source changes. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Apply repository formatting and lint auto-fixes so the quiet mode branch passes quality checks. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
# Conflicts: # .changeset/pre.json
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mastracode/src/tui/components/tool-execution-enhanced.ts`:
- Around line 378-390: The preview string is being ANSI-formatted via
formatQuietActivePreview() before wrapping, which can split escape sequences;
instead pass the raw/unformatted preview into wrapPreviewLines() (use the
unhighlighted preview returned by getQuietActivePreview() /
getQuietPreviewLines()), slice the wrapped result, then call
formatQuietActivePreview(line) on each wrapped line before calling truncateAnsi.
Apply the same change to the duplicate logic around the 525–535 region so
wrapping always happens on plain text and highlighting is applied only after
wrapping.
- Around line 320-323: The early return in the method hides non-shell tool
errors by always calling renderCompactTool() when this.quietDisplayMode ===
'quiet' and this.toolName !== MC_TOOLS.EXECUTE_COMMAND; change the guard so
compact rendering only happens when quiet mode AND there is nothing requiring
the detailed UI: check this.validationErrors, this.toolErrorOutput, and
this.expanded, and only call this.renderCompactTool() and return if all three
are falsy (no validation errors, no tool error output, and not expanded). Keep
the original path (allow existing detailed renderers to run) when any of these
are present so errors and expanded state are still shown.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8f04281a-46aa-4078-a96f-78926165820f
📒 Files selected for processing (20)
mastracode/src/onboarding/__tests__/settings.test.tsmastracode/src/onboarding/settings.tsmastracode/src/tui/__tests__/mastra-tui-quiet-mode.test.tsmastracode/src/tui/__tests__/render-messages.test.tsmastracode/src/tui/chat-boundary-reconciliation.tsmastracode/src/tui/components/__tests__/chat-boundary-spacer.test.tsmastracode/src/tui/components/__tests__/task-progress.test.tsmastracode/src/tui/components/__tests__/tool-execution-enhanced.test.tsmastracode/src/tui/components/assistant-message.tsmastracode/src/tui/components/plan-approval-inline.tsmastracode/src/tui/components/settings.tsmastracode/src/tui/components/tool-execution-enhanced.tsmastracode/src/tui/components/user-message.tsmastracode/src/tui/handlers/__tests__/message.test.tsmastracode/src/tui/handlers/message.tsmastracode/src/tui/handlers/tool.test.tsmastracode/src/tui/handlers/tool.tsmastracode/src/tui/mastra-tui.tsmastracode/src/tui/render-messages.test.tsmastracode/src/tui/render-messages.ts
🚧 Files skipped from review as they are similar to previous changes (16)
- mastracode/src/onboarding/tests/settings.test.ts
- mastracode/src/tui/components/user-message.ts
- mastracode/src/tui/tests/render-messages.test.ts
- mastracode/src/tui/components/tests/chat-boundary-spacer.test.ts
- mastracode/src/tui/tests/mastra-tui-quiet-mode.test.ts
- mastracode/src/tui/handlers/message.ts
- mastracode/src/tui/chat-boundary-reconciliation.ts
- mastracode/src/tui/handlers/tool.test.ts
- mastracode/src/tui/handlers/tests/message.test.ts
- mastracode/src/tui/components/plan-approval-inline.ts
- mastracode/src/onboarding/settings.ts
- mastracode/src/tui/render-messages.ts
- mastracode/src/tui/components/settings.ts
- mastracode/src/tui/handlers/tool.ts
- mastracode/src/tui/render-messages.test.ts
- mastracode/src/tui/components/tests/tool-execution-enhanced.test.ts
# Conflicts: # mastracode/src/tui/handlers/__tests__/om.test.ts
CalebBarnes
left a comment
There was a problem hiding this comment.
Probably shouldn't be deleting other changesets
Restore the unrelated llm-recorder changeset that was accidentally dropped during changeset consolidation. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
thanks, my MC got a little excited 😅 it had added like 10 changesets and I said "combine them into one" lol |
Restore unrelated changesets from main and replace the PR-specific changeset churn with one consolidated changeset for the quiet mode work. Co-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
Oh yeah I actually just looked at what was removed and it looks like it was just combining multiple changesets together. All good. |
Had local changes and commits when #16771 was merged! just styling tweaks and bug fixes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 This PR polishes the TUI "quiet mode": compact tool outputs render more consistently and follow the active UI color, shell footers and tokenization behave better (ampersands preserved), spacing/layout jumps are reduced, and tests were updated to match the rebased behavior. ## Summary Follow-up refinements to quiet-mode rendering and adjacent TUI behavior after rebasing onto main. Key focuses are propagating the current mode color to compact tool displays, expanding and standardizing quiet-mode previews across many tool types (notably shell, code-like, browser/process outputs), simplifying spacing logic to avoid layout jumps, improving subagent insertion/expansion behavior, and addressing tokenizer/footer issues for shell output. Tests and formatting/lint fixes were applied. ### Key Changes - Mode-color propagation - Added optional IToolExecutionComponent.setCompactToolModeColor(color?: string) and ToolExecutionOptions.compactToolModeColor. - New helpers (getCurrentModeColor / applyCurrentModeColorToRenderedTools / applyQuietModePreference) call setCompactToolModeColor across commands, handlers, mastra-tui, and render paths so compact tool displays follow the active mode color. - Quiet-mode rendering & previews - Expanded quiet preview formatters and compact-summary routing for many tools (web search, browser_*, skill*, process/file_stat, code-like tools, condensed validation/error previews). - Shell: increased quiet preview tail limit to 15 lines, refactored footer wrapping and tokenization (preserves standalone ampersands so background commands and stderr redirects render correctly), and improved wrapping/highlighting across wrapped lines. - Compact rendering: tighter integration of quiet preview detail lines, refined continuation/badge/range rendering, shared-prefix grouping, and improved path/label detection. - Subagent insertion & expansion - SubagentExecutionOptions gained expandOnComplete?: boolean; finish() respects expandOnComplete (auto-expands when enabled). - Subagents are inserted using insertChatComponentWithBoundarySpacing to preserve spacing; collapseOnComplete is kept false and expansion is driven by quietMode where appropriate. - Spacing and component stability - chat-spacing.getSpacingBetweenComponents signature adjusted (prevPrev/nextNext params now unused) and logic simplified: quiet-compact-tool groups return 0 spacing only when group keys match, otherwise 1. - reconcileToolBoundaries called after creating new tool components; tool insertion now reconciles boundary spacers to avoid layout jumps. - IdleCounterComponent.render() simplified to always return at least [''] to avoid empty-array-driven layout instability. - Handlers/commands updates - Applied getCurrentModeColor and mode-color application in commands/mode, commands/settings, handlers (message, tool, subagent), render-messages, and mastra-tui so existing rendered tool components receive updated compact mode colors on mode switches and when quiet preferences change. - Tests & formatting - Large test updates across src/tui to match rebased quiet-mode semantics (render-messages, chat-boundary-spacer, idle-counter, subagent-execution, tool-execution-enhanced, and handler tests). - Commit also includes lint/format fixes applied after quiet shell footer updates. ### Files of note - Core rendering & behavior: src/tui/components/tool-execution-enhanced.ts, src/tui/components/tool-execution-interface.ts, src/tui/components/chat-spacing.ts, src/tui/components/subagent-execution.ts, src/tui/components/idle-counter.ts. - Integrations & handlers: src/tui/handlers/{message,tool,subagent}.ts, src/tui/commands/{mode,settings}.ts, src/tui/mastra-tui.ts, src/tui/render-messages.ts. - Tests: many updated under src/tui/components/__tests__ and handlers to reflect new quiet-mode semantics. - Commits: included a fix to preserve ampersands in quiet shell footers and a chore commit to fix lint/formatting. ### Risk & Review Notes - The new interface method is optional (non-breaking) but is now invoked broadly—verify that tool components that should accept the compact mode color implement or safely ignore setCompactToolModeColor. - tool-execution-enhanced contains substantial behavior changes (ANSI/color handling, shell footer wrapping/tokenization, compact continuation rules); prioritize reviewing ANSI/color correctness, shell footer wrapping/highlighting across wrapped lines (including ampersand handling), spacing invariants around streaming vs completed components, and boundary insertion/reconciliation logic. - Tests are extensive; confirm changes reflect intended rendering semantics rather than accidental formatting-only differences. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/16807?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
…nder components TemporalGapComponent and SystemReminderComponent were missing the getChatSpacingKind() method introduced by the quiet mode boundary spacing reconciliation system (PR #16771). Without it, these components did not participate in the spacing system and could visually blend into surrounding content in quiet mode. Add getChatSpacingKind() returning 'system' to both components so they receive proper boundary spacers from the reconciliation system. Co-Authored-By: tyler <tylerdbarnes@gmail.com>
Adds a new improved quiet mode as the default MastraCode experience for new installs, with a one-time opt-in prompt for existing users who haven’t picked a preference yet.
It tightens up the quiet-mode tool rendering: compact tool summaries, persistent preview lines, grouped continuation rows, stable path deduping while args stream in, compact task progress, and cleaner spacing around chat/task blocks.
Quiet previews are configurable from settings now too, including turning preview lines off entirely.

Verified with focused MastraCode tests and typecheck while building this branch.
ELI5
MastraCode now has a "quiet mode" that shows cleaner, more compact tool output by default for new users. Existing users get a one-time prompt to try it out. The mode lets you see less clutter in the terminal by showing tool results in a condensed format, and you can customize how many lines of previews you want to see (or hide them entirely).
Overview
This PR introduces a new improved quiet mode as the default MastraCode experience for new installs, with a one-time opt-in prompt for existing users. The implementation includes:
quietModePreferenceSelected(tracks if user has made a choice) andquietModeMaxToolPreviewLines(configurable preview depth, range 0-8)Key Component Changes
Settings & Onboarding (
onboarding/settings.ts):GlobalSettingswithonboarding.quietModePreferenceSelectedandpreferences.quietModeMaxToolPreviewLinesparsePreferenceslogic to clamp preview-line values to [0, 8]quietModePreferenceSelectedbased onpreferences.quietModefor existing usersChat Spacing Architecture (
components/chat-spacing.ts,components/chat-boundary-spacer.ts,chat-boundary-reconciliation.ts):ChatSpacingKindtype andChatSpacingParticipantinterface for components to declare their spacing requirementsChatBoundarySpacercomponent that dynamically computes vertical spacing based on neighboring component typesreconcileChatBoundarySpacersto normalize spacing across chat container, handling compact tool grouping and label coloringinsertChatComponentWithBoundarySpacinghelper inserts components with proper spacing contextTool Execution Rendering (
components/tool-execution-enhanced.ts):ToolExecutionOptionsgetCompactToolGroupKey(),getCompactToolGroupSummary(),setCompactToolContinuation(),setCompactToolHasFollowingContinuation()getCompactToolLabelColor(),setCompactToolGroupLabelColor()to color consecutive tool runssetQuietModeDisplay(),setQuietPreviewLineLimit(),getChatSpacingKind(),hasQuietStreamingPreview(),isComplete()updateArgs()to accept optionalrebuildflagSettings UI (
components/settings.ts):quietModeMaxToolPreviewLinestoSettingsConfigand corresponding callbackTask Progress (
components/task-progress.ts):setQuietMode(enabled)method for switching between expanded/compact renderingformatQuietTaskLinesandformatQuietTaskItemhelpers produce compressed single-line-or-wrapping task summariesMessage Component Updates (
components/user-message.ts,components/assistant-message.ts,components/plan-approval-inline.ts):getChatSpacingKind()to declare their chat contextChatBoundarySpacerreconciliationUserMessageComponentsupports optionalborderColorparameterDialog Enhancements (
components/ask-question-dialog.ts,modal-question.ts):allowCustomResponseandselectedOptionLabeloptions to support the quiet-mode preference promptUI Handlers (
handlers/message.ts,handlers/tool.ts,handlers/om.ts,render-messages.ts):reconcileChatBoundarySpacers()calls after key message/tool updates to maintain consistent spacingToolExecutionComponentEnhancedinstances, quiet mode is configured viasetQuietModeDisplay()andsetQuietPreviewLineLimit()render-messages.tsapplies quiet-mode configuration to replayed tool history and skips OM title markers in quiet modeTUI Setup & State (
mastra-tui.ts,setup.ts,state.ts):TUIStatenow includesquietModeMaxToolPreviewLinesfieldMastraTUIcallsshowQuietModePreferencePromptIfNeeded()after onboarding, which handles the one-time prompt flowsettings.jsonwith quiet mode enabled/disabled and preview-line limit applied to both settings and in-memory stateinsertChatComponentWithBoundarySpacing()for consistent boundary handlingTaskProgressComponentis configured with quiet mode during layout constructionTest Coverage
Settings Tests (
onboarding/__tests__/settings.test.ts): Validates quiet mode onboarding defaults, preference selection tracking, preview-line clamping, and rollout behavior for new installs vs. existing usersQuiet Mode Preference Prompt (
tui/__tests__/mastra-tui-quiet-mode.test.ts): Verifies the one-time modal flow, settings persistence, and TUI/tool state updates based on user choiceChat Boundary Spacing (
tui/components/__tests__/chat-boundary-spacer.test.ts): Comprehensive tests for spacing computation between different component types, compact tool grouping, label coloring, and boundary reconciliationTool Execution Rendering (
tui/components/__tests__/tool-execution-enhanced.test.ts): 603-line suite validating quiet rendering for all tool types, compact continuation path streaming, preview-line truncation/wrapping, status-based coloring, and error renderingTask Progress (
tui/components/__tests__/task-progress.test.ts): Tests expanded vs. quiet mode rendering, wrapping behavior, and mode togglingMessage & Handler Tests (
tui/handlers/__tests__/message.test.ts,tui/handlers/__tests__/tool.test.ts,tui/handlers/__tests__/om.test.ts,render-messages.test.ts): Updated to filter out chat boundary spacer nodes in assertions; added coverage for quiet-mode tool grouping, spacing insertion on message/tool updates, and OM suppression in quiet modeWorkspace Tool Tests (
packages/core/src/workspace/tools/__tests__/edit-file.test.ts): Validates edited line-range reporting in tool resultsImplementation Details
Quiet Mode Defaults: New installs default to quiet mode enabled; existing users without a saved preference receive a one-time modal offering to enable quiet mode, defaulting to 2 preview lines
Preview Line Range: Values are clamped to [0, 8]; 0 disables previews entirely
Compact Tool Grouping: Consecutive tool results with the same group key are rendered together with shared labels and optional connector/branch rendering to show continuation flow
Label Coloring: Tool run labels use
'toolTitle'(orange) by default, switching to'error'(red) if any participant reports an errorSpacing Reconciliation: Chat boundary spacers are recomputed after message streaming, tool updates, and history replay to ensure clean spacing without redundant empty lines
Streaming Support: Partial args stream in without rebuilding tool output;
updateArgs()withrebuild=falseallows layout to settle before reconciliationRelated Changes
Workspace Tool Updates (
packages/core/src/workspace/tools/edit-file.ts): Tool output now includes edited line ranges (e.g.,(lines 1-3)) for better clarityChangesets: PR includes updated release notes for quiet-mode rollout, skill command additions, and signal-content handling improvements