Skip to content

fix(mothership): bug fixes#5735

Merged
Sg312 merged 10 commits into
stagingfrom
fix/mothership-bugs
Jul 17, 2026
Merged

fix(mothership): bug fixes#5735
Sg312 merged 10 commits into
stagingfrom
fix/mothership-bugs

Conversation

@Sg312

@Sg312 Sg312 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Lots of mship bug fixes

Type of Change

  • Bug fix

Testing

Manual

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)

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 17, 2026 5:34pm

Request Review

@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates Mothership chat recovery and several Copilot-facing contracts. The main changes are:

  • Rebuilds live turns from the Redis replay buffer during reconnects.
  • Expands tool titles and hosted-key authentication metadata.
  • Exposes derived webhook URLs while rejecting writes to display-only fields.
  • Removes workflow descriptions from Copilot-facing data.
  • Restores message actions after question dismissal.

Confidence Score: 4/5

The initial chat recovery path can reconnect completed streams and temporarily lose file preview state.

  • Completed streams can enter an unnecessary resume flow while their Redis lock remains visible.
  • Freshly rendered live turns no longer receive preview sessions until reconnect succeeds.
  • The hosted-key and webhook-write boundaries otherwise remain consistent with their runtime contracts.

apps/sim/app/api/mothership/chats/[chatId]/route.ts and apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts

Important Files Changed

Filename Overview
apps/sim/app/api/mothership/chats/[chatId]/route.ts Synthesizes the live turn but stops returning stream status and preview-session metadata needed during initial hydration.
apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts Reworks cursor reconciliation, fresh replay, missing-stream handling, and reconnect finalization.
apps/sim/lib/copilot/vfs/serializers.ts Adds hosted, conditional-hosted, and BYOK authentication metadata to VFS schemas.
apps/sim/lib/workflows/sanitization/json-sanitizer.ts Adds derived webhook URLs for blocks currently configured as webhook triggers.
apps/sim/lib/copilot/tools/server/workflow/edit-workflow/validation.ts Rejects synthesized webhook URLs and read-only display fields during workflow edits.
apps/sim/lib/core/rate-limiter/hosted-key/hosted-key-rate-limiter.ts Supports a singular hosted-key environment variable when no numbered pool is configured.

Reviews (1): Last reviewed commit: "fix(mothership): description and increme..." | Re-trigger Greptile

Comment thread apps/sim/app/api/mothership/chats/[chatId]/route.ts
Comment thread apps/sim/app/api/mothership/chats/[chatId]/route.ts
@Sg312
Sg312 merged commit caa454a into staging Jul 17, 2026
19 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/mothership-bugs branch July 18, 2026 05:36
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