Skip to content

chore(mship): revert the credential-continue questions flow - #6405

Closed
waleedlatif1 wants to merge 1 commit into
stagingfrom
revert/mship-credential-continue
Closed

chore(mship): revert the credential-continue questions flow#6405
waleedlatif1 wants to merge 1 commit into
stagingfrom
revert/mship-credential-continue

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Notes

Type of Change

  • Chore

Testing

  • turbo run type-check — 23/23 workspaces pass
  • check:api-validation, check:desktop-bridge, check:desktop-ipc pass
  • 204 test files / 2589 tests pass across lib/copilot, lib/credentials, executor/handlers/{mothership,pi}, api/mothership, home/; desktop handoff + ipc 82 pass

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)

Reverts #6385. Companion revert in mothership (#414).
@vercel

vercel Bot commented Aug 8, 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 Aug 8, 2026 4:37am

Request Review

@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large revert across OAuth handoff, chat credential UX, and Trello redirects; behavior returns to the older model but regression risk is high where users relied on the unified credential card and correlated OAuth completion.

Overview
This reverts the credential-continue / questions-style OAuth connect work (#6385): chat credential tags go back to a single object per <credential> tag (not batched arrays), with standalone controls instead of one InteractionCard with Submit/Continue and transcript pairing.

Desktop & OAuth handoff no longer track chatAttemptId or consumeConnect scope; connect completion only signals { ok } / { error } to the renderer. The useOAuthChipConnection hook and oauth-chat-attempt wiring are removed; OAuth links in chat again use direct URLs (desktop still uses beginOAuthConnect without attempt IDs).

Trello authorize/callback drops custom returnUrl cookies and always redirects to /workspace with query params. useOAuthReturn no longer verifies chip attempts via retries; desktop connect listener no longer resolves chat attempts.

Questions revert to immediate single-select advance and inline card markup (shared interaction-card deleted). Message actions visibility is question-only again (not credential cards). Service-account modals mostly drop onCreated callbacks except where token modal still uses it for creates.

Reviewed by Cursor Bugbot for commit 044937b. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR reverts the credential-continuation question and OAuth correlation flow while restoring the previous singleton credential-tag UI and synchronized Mothership tool contract.

  • Removes chat-attempt correlation across the desktop handoff, OAuth return handling, and credential transcript state.
  • Restores the earlier question and credential rendering behavior.
  • Reverts generated Copilot tool contracts and handler registration in lockstep.
  • Simplifies Trello OAuth redirects back to the workspace route.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking need to restore context-safe escaping for Trello callback URLs.

The reverted credential and desktop OAuth paths retain downstream authorization and contract coordination; the remaining issue is that unusual but accepted base-URL configuration can break the Trello callback script.

Files Needing Attention: apps/sim/app/api/auth/trello/callback/route.ts

Important Files Changed

Filename Overview
apps/sim/app/api/auth/trello/callback/route.ts Restores fixed workspace redirects but no longer escapes the configured base URL before embedding it in callback JavaScript.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx Reverts batched credential continuation UI to singleton credential tags while retaining server-enforced authorization on desktop OAuth scope.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/question/question.tsx Restores immediate single-select progression and the prior multi-select submission behavior.
apps/desktop/src/main/handoff.ts Removes chat-attempt correlation while preserving state, kind, expiry, and constant-time handoff validation.
apps/sim/lib/copilot/generated/tool-schemas-v1.ts Reverts the generated Mothership schema in coordination with the companion service contract.

Reviews (1): Last reviewed commit: "chore(mship): revert the credential-cont..." | Re-trigger Greptile

statusEl.textContent = 'Success! Redirecting...';
setTimeout(function() {
window.location.href = '${successReturnUrl}';
window.location.href = '${baseUrl}/workspace?trello_connected=true';

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.

P2 Unescaped Trello callback URL

If NEXT_PUBLIC_APP_URL contains JavaScript-significant characters, the callback embeds the unescaped value directly in its script, producing malformed JavaScript that prevents the Trello connection from being stored or redirected; markup in the configured value is also inserted into the callback document.

Knowledge Base Used: Authentication and Authorization

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Keeping the change after all — closing this revert.

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