improvement(secrets): parallelize save mutations and add admin visibility for workspace secrets#4032
Conversation
PR SummaryMedium Risk Overview Optimizes saving environment variables by skipping the personal save when unchanged, running personal/workspace mutations in parallel with Simplifies Reviewed by Cursor Bugbot for commit 1cb5810. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
apps/sim/app/workspace/[workspaceId]/settings/components/credentials/credentials-manager.tsx
Outdated
Show resolved
Hide resolved
Greptile SummaryThis PR makes two improvements to the credentials/environment settings feature: (1) parallelizes personal and workspace environment save mutations using Confidence Score: 5/5Safe to merge — changes are well-scoped improvements with no correctness issues. Both features (parallelized save and admin secret visibility) are correctly implemented. The personalChanged diff logic is sound. Using Promise.allSettled + re-throw is the right pattern. Cache invalidation is narrowed correctly. No P0/P1 findings identified. No files require special attention.
|
| Filename | Overview |
|---|---|
| apps/sim/hooks/queries/environment.ts | Removes redundant double-transformation in useSavePersonalEnvironment and narrows cache invalidation scope in all three mutation hooks; changes are correct and improve clarity. |
| apps/sim/app/workspace/[workspaceId]/settings/components/credentials/credentials-manager.tsx | Adds parallelized save logic with personalChanged short-circuit, moves credential-list invalidation to finally block, and adds admin visibility for workspace secrets; no bugs found. |
Reviews (4): Last reviewed commit: "fix(secrets): use Promise.allSettled to ..." | Re-trigger Greptile
apps/sim/app/workspace/[workspaceId]/settings/components/credentials/credentials-manager.tsx
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/settings/components/credentials/credentials-manager.tsx
Outdated
Show resolved
Hide resolved
…lity for workspace secrets
352c2a5 to
74e0509
Compare
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/settings/components/credentials/credentials-manager.tsx
Show resolved
Hide resolved
…n after all mutations settle
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1cb5810. Configure here.
Summary
Promise.allinstead of sequential awaitsuseSavePersonalEnvironmentfinally)Type of Change
Testing
Tested manually
Checklist