Skip to content

improvement(settings): react health pass across settings surface#5324

Merged
waleedlatif1 merged 1 commit into
stagingfrom
worktree-settings-react-health
Jul 1, 2026
Merged

improvement(settings): react health pass across settings surface#5324
waleedlatif1 merged 1 commit into
stagingfrom
worktree-settings-react-health

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Move workflow-mcp tool-edit state seeding out of a derive useEffect into the Edit event handler (fixes a one-frame stale-textarea flash)
  • Drop 2 inert useMemo (page arithmetic) and 1 unused useCallback in admin
  • Migrate inbox + teammates filter/search view-state from useState to nuqs URL params — shareable/bookmarkable, with debounced URL writes (input stays instant)
  • Memoize the O(workspaces × members) org-roster grouping so member-search keystrokes stay cheap on large orgs
  • Remove dead code (unused props/locals: currentUserEmail, setOrgName, isLoadingWorkflows, isTeam)

All changes are behavior-preserving (the nuqs migrations additively enable deep-linking). No blanket/cargo-cult memoization.

Type of Change

  • Improvement

Testing

Tested manually. tsc --noEmit clean, biome clean, no unused locals in the settings surface.

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)

- workflow-mcp: move tool-edit state seeding from a derive effect into the Edit event handler
- admin: drop 2 inert useMemo (page math) and 1 unused useCallback
- inbox + teammates: migrate filter/search view-state from useState to nuqs URL params (shareable, debounced writes)
- team roster: memoize O(workspaces x members) grouping so keystroke search stays cheap at scale
- remove dead code (unused props/locals: currentUserEmail, setOrgName, isLoadingWorkflows, isTeam)
@vercel

vercel Bot commented Jul 1, 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 1, 2026 5:55pm

Request Review

@cursor

cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Mostly UI state, memoization, and dead-code cleanup; nuqs adds bookmarkable filters without changing server or permission logic.

Overview
This PR tightens React patterns across workspace settings and adds shareable URL state for inbox and teammates filters.

Inbox and Teammates move status/search from local useState to nuqs via new search-params modules (history: 'replace', clearOnDefault). Search still feels instant in the UI; only URL updates are debounced (~300ms).

Organization member lists memoize per-workspace roster grouping so search keystrokes don’t redo O(workspaces × members) work on every render.

Workflow MCP servers seed tool-edit textarea state in the Edit handler instead of a useEffect on toolToView, avoiding a one-frame stale flash. Unused props/locals are removed (isLoadingWorkflows, setOrgName, currentUserEmail, unused isTeam in billing permissions).

Admin drops unnecessary useMemo/useCallback for simple pagination and mothership env handling.

Reviewed by Cursor Bugbot for commit 51ee43d. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates several settings pages to reduce stale UI state and make filters shareable. The main changes are:

  • Inbox task status and search state now live in nuqs URL params.
  • Teammates search state now lives in a debounced URL param.
  • Organization roster workspace grouping is memoized.
  • Workflow MCP tool edit fields are seeded when the edit action opens.
  • Unused props, locals, and memoized wrappers were removed.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The nuqs patterns match existing settings and app usage.
  • The workflow MCP edit path still seeds state on the only non-null tool selection path.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-task-list/inbox-task-list.tsx Migrates inbox task filters from local state to nuqs query state with debounced search URL writes.
apps/sim/app/workspace/[workspaceId]/settings/components/inbox/search-params.ts Adds typed nuqs parser and URL option configuration for inbox task filters.
apps/sim/app/workspace/[workspaceId]/settings/components/teammates/teammates.tsx Migrates teammate search from local state to a debounced nuqs query param.
apps/sim/app/workspace/[workspaceId]/settings/components/teammates/search-params.ts Adds typed nuqs parser and URL option configuration for teammate search.
apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-member-lists/organization-member-lists.tsx Memoizes workspace member and invite grouping so search renders avoid repeated roster traversal.
apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/workflow-mcp-servers.tsx Moves workflow MCP tool edit state seeding from an effect into the edit action handler and removes an unused loading prop.

Reviews (1): Last reviewed commit: "improvement(settings): react health pass..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit b8e88b1 into staging Jul 1, 2026
17 checks passed
@waleedlatif1 waleedlatif1 deleted the worktree-settings-react-health branch July 1, 2026 18:02
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