Skip to content

fix(connectors): save service account changes with source settings - #7978

Merged
waleedlatif1 merged 1 commit into
stagingfrom
codex/service-account-settings
Sep 18, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
codex/service-account-settings

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Save replacement service accounts and source settings together through the main Save action, with one validated transaction.
  • Remove the separate account-change action and redundant fixed sync-method row. Browse with the selected account and explain when an active sync blocks saving.
  • Preserve drafts after failed saves and report committed settings as saved if follow-up sync dispatch fails; the existing scheduler retains the retry.

Type of Change

  • Bug fix

Testing

332 focused tests passed, including combined edits, provider rejection, sync races, credential replacement, and live status updates. App/auth type checks, lint, all 46 audits, block registry, and docs manifest checks passed. Tested the real desktop form components locally with mocked accounts for save, discard, error, and syncing states. No database migration.

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 Sep 18, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
Image docs Skipped Skipped Sep 18, 2026 7:53pm UTC

Request Review

@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.

1 issue found across 17 files

Confidence score: 3/5

  • In use-connector-settings-form.ts, replacing an admin connector account while GitLab permission settings are dirty can silently discard permissionConfig and apiKey, causing an incomplete access update; include both edits atomically or block this combination with clear feedback.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/use-connector-settings-form.ts">

<violation number="1" location="apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/use-connector-settings-form.ts:377">
P2: When an admin connector replaces its account while GitLab permission settings are also dirty, this branch silently drops `permissionConfig` and `apiKey`. Include those edits in the atomic access update, or block this combination until the API supports it.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

No new actionable issue was introduced after the previous review, and the current pull request appears safe to merge.

Summary

This pull request unifies service-account replacement and connector source-setting edits under the primary Save action.

  • Extends the connector-access contract and application boundary to validate and persist credential, source configuration, and sync interval changes together.
  • Reuses the connector update orchestration to apply optimistic concurrency and sync-lifecycle guards.
  • Preserves committed saves when follow-up sync dispatch fails, leaving scheduled retry state intact.
  • Updates source settings forms to retain drafts, browse with replacement credentials, block saves during active synchronization, and explain the blocked state.
  • Adds focused coverage for combined saves, provider rejection, sync races, dispatch failures, draft preservation, and live status updates.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Edit source settings or service account] --> B[Primary Save action]
  B --> C[Validate replacement credential and source configuration]
  C -->|Validation fails| D[Return error and preserve draft]
  C -->|Validation succeeds| E[Atomically update connector]
  E --> F[Reset listing checkpoints and mark sync due]
  F --> G[Dispatch connector sync]
  G -->|Dispatch succeeds| H[Saved and sync queued]
  G -->|Dispatch fails| I[Saved; scheduler retains retry]
Loading

Reviews (2) · Last reviewed commit: "fix(connectors): save service account ch..."

@waleedlatif1
waleedlatif1 merged commit ba95235 into staging Sep 18, 2026
34 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/service-account-settings branch September 18, 2026 20:00
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@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 17 files

Confidence score: 5/5

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

Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview 84034cbd Deployed Sep 18, 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