improvement(mothership): show the worker's display copy for a turn error everywhere it is recorded by waleedlatif1 · Pull Request #9254 · simstudioai/sim · GitHub
Skip to content

improvement(mothership): show the worker's display copy for a turn error everywhere it is recorded - #9254

Merged
waleedlatif1 merged 1 commit into
stagingfrom
improvement/mothership-refusal-message
Oct 20, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
improvement/mothership-refusal-message

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A mothership worker error frame carries a diagnostic message and an optional user-facing displayMessage. Only the live inline error line honored displayMessage
  • The server-side stream handler recorded message, so the persisted transcript (what a reload shows), the republished terminal error that followers and reconnects read, the execute API result and inbox replies all fell back to the diagnostic text, as did the client's chat error state
  • One selector, mothershipErrorText, now picks the user-facing text for the inline tag, the server handler and the client handler, so every surface shows the same line the live turn showed
  • This lets the worker attach actionable copy to failures such as a provider safety-filter refusal or an output-limit stop, without Sim matching on message text. With no displayMessage, the fallback order is unchanged (message, then error)

Type of Change

  • Bug fix

Testing

  • New handler regression test: a worker error frame with both message and displayMessage records displayMessage as the turn's error (fails on the previous code)
  • Vitest over lib/mothership/request, lib/mothership/chat, the home stream hooks, message rendering and the copilot chat routes (1628 passed); bun run type-check for apps/sim; biome and the relevant check:* audits

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…ror everywhere it is recorded

A worker error frame carries a diagnostic `message` and an optional
user-facing `displayMessage`. Only the live inline error tag honored
`displayMessage`; the server-side error handler recorded `message`, so the
persisted transcript, the republished terminal error, the execute API
result and the inbox reply all fell back to the diagnostic text, and the
client's chat error state did the same.

One selector, `mothershipErrorText`, now picks the user-facing text for the
tag, the server handler and the client handler, so a reload shows the same
line the live turn showed.
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

@waleedlatif1
waleedlatif1 merged commit 4a8d7d3 into staging Oct 20, 2026
99 of 101 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/mothership-refusal-message branch October 21, 2026 01:17

This branch was previously deployed

1 inactive deployment
Preview — 59a23363 Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant