feat(ui): improve scheduled task controls - #378
Merged
Conversation
Make agent selection searchable and label the edit prompt field so schedule configuration is easier to navigate. Co-authored-by: Cursor <cursoragent@cursor.com>
jromualdez-scale
marked this pull request as ready for review
July 27, 2026 13:11
Avoid an empty-result message before searching and restore trigger focus after keyboard dismissal or selection. Co-authored-by: Cursor <cursoragent@cursor.com>
danielmillerp
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
npm run typechecknpm run test:run -- hooks/use-agents.test.tsxMade with Cursor
Greptile Summary
This PR improves the scheduled-tasks UI in two ways: it replaces the Radix
Selectwith a custom searchable dropdown for the scope picker, and it adds an explicit "Prompt" label to the edit-schedule textarea.Selectdependency from this component.<label>element with a visible "Prompt" span, matching the existingScheduleNameInputpattern and improving accessibility.onClickhandler does not callsetQuery('')when closing, so a stale search term persists if the user toggles the dropdown closed via the button rather than via Escape, outside-click, or item selection.Confidence Score: 4/5
Safe to merge after fixing the stale-query issue on trigger-button close.
The custom dropdown correctly resets the search query on every close path (Escape, outside-click, item selection) except one: clicking the trigger button a second time only toggles isOpen without calling setQuery. A user who closes via the button and reopens sees a filtered list based on their previous search term with no explanation. The fix is a one-liner. Everything else is correct.
Files Needing Attention: agentex-ui/components/scheduled-tasks/scheduled-tasks-page.tsx — the trigger button onClick handler needs to clear the search query when closing.
Important Files Changed
<label>element, matching the existingScheduleNameInputpattern; straightforward and safe change.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A([User clicks trigger button]) --> B{isOpen?} B -- false --> C[setIsOpen true\nautoFocus search input] B -- true --> D[setIsOpen false\n query NOT cleared] C --> E[Dropdown renders] E --> F{User action} F -- Types in search --> G[filteredAgents updates] F -- Selects item --> H[selectAgent or selectScope\nsetIsOpen false\nsetQuery empty\ntriggerRef.focus] F -- Presses Escape --> I[closeOnEscape handler\nsetIsOpen false\nsetQuery empty\ntriggerRef.focus] F -- Clicks outside --> J[closeOnOutsideClick handler\nsetIsOpen false\nsetQuery empty] F -- Clicks trigger again --> D D --> K([Dropdown closes, stale query remains])Reviews (2): Last reviewed commit: "fix(ui): handle schedule picker loading ..." | Re-trigger Greptile