Skip to content

improvement(credential-groups): align settings surface with the shared page patterns - #6727

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/credential-groups-settings-parity
Aug 15, 2026
Merged

improvement(credential-groups): align settings surface with the shared page patterns#6727
waleedlatif1 merged 3 commits into
stagingfrom
fix/credential-groups-settings-parity

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • drop the row ... menu — a row that opens a detail page gets the chevron only; Delete moves to the detail header behind the confirm modal
  • replace the hand-rolled Save chip with saveDiscardActions, and wire useSettingsUnsavedGuard so detail edits survive tab switches and warn on leave
  • fix swapped staleTime constants: the list carried Infinity, which combined with the app-wide retryOnMount: false to cache one transient failure until a full page reload
  • evict the detail query on delete; keep the bots prop referentially stable so a refetch can't drop a queued Slack authorization message
  • reset the detail tab param on open/close so a stale link can't open the next group on the previous group's tab
  • match peer rows (iconFilled + --text-icon), drop a bespoke max-w-[560px] and a duplicated gap-7, align no-results copy and the Slack modal's field gutter

Header actions are now tab-scoped (Details → Save/Discard, People → Invite users, Delete on both) so two primary chips never collide.

Type of Change

  • Bug fix

Testing

type-check, lint:check, all 26 audits, and 822 tests pass. Not verified in a browser.

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)

…d page patterns

- drop the row "..." menu; a row opening a detail page carries the chevron
  only, and Delete moves to the detail header behind a confirm modal
- replace the hand-rolled Save chip with saveDiscardActions, and wire
  useSettingsUnsavedGuard so detail edits survive tab switches
- fix swapped staleTime constants: the list carried Infinity, which combined
  with the app-wide retryOnMount:false to cache one transient failure until
  a full page reload
- evict the detail query on delete, and keep the bots prop referentially
  stable so a refetch cannot drop a queued Slack authorization message
- reset the detail tab param on open and close so a stale link cannot open
  the next group on the previous group's tab
- match peer rows (iconFilled + --text-icon), drop a bespoke max-w and a
  duplicated gap-7, align no-results copy and the Slack modal field gutter
@vercel

vercel Bot commented Aug 15, 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 15, 2026 3:22am

Request Review

@cursor

cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches credential group CRUD UI and React Query caching for list/detail; incorrect cache behavior could affect settings reliability, but changes are scoped to settings surfaces and align with existing patterns elsewhere.

Overview
Aligns credential group settings with shared settings patterns: list rows are navigable only (no row delete menu); Delete lives on the detail header with a confirm modal.

Detail editing moves name/description drafts to the detail panel. The header uses saveDiscardActions and useSettingsUnsavedGuard (unsaved modal on back/leave). Tab-specific actions: Details → Save/Discard, People → Invite users.

Query/cache fixes: swaps list vs detail staleTime (list was effectively infinite and could stick on transient failures), enables retryOnMount on detail, awaits invalidate on update before clearing drafts, and removes detail queries on delete.

Navigation/UX: resets the detail tab URL param when opening or closing a group; avoids list flash on deep links; stabilizes Slack modal bots prop and routes BroadcastChannel messages through a ref so refetches don’t drop authorization callbacks; minor row/icon and empty-state copy alignment.

Reviewed by Cursor Bugbot for commit 12fb50a. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns credential-group settings with shared settings-page patterns and improves editing, deletion, navigation, Slack setup, and query-cache behavior.

  • Moves detail Save/Discard and Delete actions into the shared settings header.
  • Preserves draft edits across detail tabs and integrates the settings unsaved-change guard.
  • Stabilizes Slack authorization message handling across credential-query refetches.
  • Corrects list/detail cache timing and evicts deleted detail queries.
  • Updates credential-group rows, empty states, and modal spacing to match peer surfaces.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/ee/credential-groups/components/credential-group-detail.tsx Centralizes editable detail drafts and header actions, adds guarded back navigation, and moves deletion behind a confirmation modal.
apps/sim/ee/credential-groups/components/credential-group-details.tsx Converts name and description fields to controlled inputs and stabilizes the empty Slack-bot collection passed to the setup modal.
apps/sim/ee/credential-groups/components/credential-group-invite-modal.tsx Preserves mutation-provided invite errors while adding a consistent fallback message.
apps/sim/ee/credential-groups/components/credential-groups-settings.tsx Removes row-level deletion, resets group-scoped tab state during transitions, and aligns list rows with shared settings patterns.
apps/sim/ee/credential-groups/components/slack-managed-users-modal.tsx Refactors authorization cleanup and message handling so query-data identity changes do not recreate the BroadcastChannel listener.
apps/sim/hooks/queries/credential-groups.ts Corrects list/detail freshness configuration and removes deleted credential-group detail cache entries.

Reviews (3): Last reviewed commit: "fix(credential-groups): await the refetc..." | Re-trigger Greptile

Matches the data-drains list: a deep link whose id is still resolving no
longer flashes the list chrome before jumping to the detail. Keys the detail
by group id so lifted draft state can never carry across groups.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

…ffer

The update mutation fired its invalidations without returning them, so
mutateAsync resolved before the refetch landed. Callers that clear their
draft on success then fell back onto the pre-save cache and flashed the old
name and description until the refetch completed — or kept showing them if
it failed.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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 522b3f5. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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 12fb50a. Configure here.

@waleedlatif1
waleedlatif1 merged commit 0ce8ded into staging Aug 15, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/credential-groups-settings-parity branch August 15, 2026 03:26
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