Repository navigation
feat(automations): Search and page the full accessible collection - #1978
Conversation
Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
10 screenshot changes — 10 changed · 0 added · 0 removed Review screenshots in Frameshift |
Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b38c04b. Configure here.
| }), | ||
| readAutomationExecutionSummaries("event", "junior", { | ||
| automationIds: ids, | ||
| }), |
There was a problem hiding this comment.
Empty page IDs break list query
High Severity
Task hydration already skips work when ids is empty, but execution summaries still pass that empty array into inArray. An empty array is truthy, so the filter is applied. inArray typically rejects an empty list, which makes any empty collection (new viewer, no matches, or a viewer with no Slack teamIds) fail the whole automations request instead of returning an empty page.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit b38c04b. Configure here.
| const [scope, setScope] = useSearchParamEnum( | ||
| "scope", | ||
| "mine", | ||
| AUTOMATION_SCOPES, |
There was a problem hiding this comment.
Overlong search is silently dropped
Low Severity
Per-field safeParse discards q when it fails max(200), while the search box and URL still keep the typed text. The list then loads the unfiltered page, so a pasted instruction looks like a failed search rather than a rejected query.
Reviewed by Cursor Bugbot for commit b38c04b. Configure here.


Closes #1972. Next slice of #1970, after the row changes in #1976.
Replace the 100-per-scope cutoff with SQL search, filters, sorting, pagination, and full access-scoped counts. Search titles, instructions, and event resources. Keep existing ownership and linked-workspace access rules, including private Destinations.
The dashboard adds All accessible, Mine, and Public scopes plus creator, Destination, type, and state filters. Filters, sort, and page stay in the URL. Details load directly by ID, without relying on the current page. Existing results stay visible during refresh, with separate loading, empty, and retry states.
Overview counts and execution charts use the accessible collection. Pause and Needs attention remain in #1975; editing remains in #1973 and #1974.
via David Cramer.
--
View Junior Session [Sentry]