feat(agent): add 'Continue in Chat' dropdown to scheduled task results#969
Open
CENK TEKİN (cenktekin) wants to merge 5 commits into
Open
feat(agent): add 'Continue in Chat' dropdown to scheduled task results#969CENK TEKİN (cenktekin) wants to merge 5 commits into
CENK TEKİN (cenktekin) wants to merge 5 commits into
Conversation
…expand - Add ScheduledTaskResultGroup component for accordion-style grouping - Group results by job name with expand/collapse behavior - Only one group expanded at a time (accordion pattern) - Update ScheduleResults (newtab) for consistency - Each group shows: task name, latest timestamp, result count Fixes browseros-ai#950
- Ensure running task groups are always visible in newtab preview - Add fallback job name when jobs not yet loaded (prevents empty state flash) - Extract groupRunsByJob helper to reduce code duplication - Remove unused imports Addresses review comments on PR browseros-ai#961
Add a dropdown button to the RunResultDialog that allows users to continue the conversation with the task output in either Chat or Assistant mode. - DropdownMenu with Chat (mode=chat) and Assistant (mode=agent) options - Navigates to /home/chat with encoded result as query parameter - Tracks usage via SCHEDULED_TASK_CONTINUE_IN_CHAT_EVENT analytics event - Fixes pre-existing import path bug in ScheduleResults.tsx Closes browseros-ai#949
Contributor
|
PR author is not in the allowed authors list. |
There was a problem hiding this comment.
Pull request overview
Adds a “Continue in Chat” action from scheduled task run results so users can jump directly into a Chat/Assistant conversation seeded with the task output, and refactors scheduled task result lists to be grouped by job.
Changes:
- Add “Continue in Chat” dropdown (Chat / Assistant) to the run result dialog and track usage via a new analytics event.
- Refactor scheduled task results UIs to display runs grouped by scheduled job (collapsible groups).
- Fix scheduled task types import path in
ScheduleResults.tsx(pre-existing build issue per PR description).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
packages/browseros-agent/apps/agent/lib/constants/analyticsEvents.ts |
Adds SCHEDULED_TASK_CONTINUE_IN_CHAT_EVENT constant for analytics tracking. |
packages/browseros-agent/apps/agent/components/ai-elements/run-result-dialog.tsx |
Adds “Continue in Chat” dropdown and navigation logic from run results. |
packages/browseros-agent/apps/agent/entrypoints/newtab/index/ScheduleResults.tsx |
Fixes import path and changes results UI to grouped/collapsible job sections. |
packages/browseros-agent/apps/agent/entrypoints/app/scheduled-tasks/types.ts |
Introduces shared JobGroup / JobRunWithDetails types and groupRunsByJob helper. |
packages/browseros-agent/apps/agent/entrypoints/app/scheduled-tasks/ScheduledTaskResults.tsx |
Updates scheduled task results page to render grouped runs via a new component. |
packages/browseros-agent/apps/agent/entrypoints/app/scheduled-tasks/ScheduledTaskResultGroup.tsx |
New collapsible group component for displaying runs per scheduled job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review: avoid passing full task output via URL query params which can exceed browser limits and expose sensitive data. - Store result in sessionStorage with run-specific key - Pass key reference via URL (not the full result) - NewTabChat reads from sessionStorage when source=scheduled-task - Clean up sessionStorage after reading Co-authored-by: Copilot <copilot@github.com>
- Add missing ScheduledJobRun import in ScheduledTaskResultGroup.tsx - Optimize groupRunsByJob: O(n²) → O(n) by precomputing jobs Map Co-authored-by: Copilot <copilot@github.com>
Author
|
All review comments addressed in
Ready to merge when you are ✅ |
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
Changes
RunResultDialog.tsx
/home/chat?q=<result>&mode=chat/home/chat?q=<result>&mode=agentrun.resultexists (same as Copy button)SCHEDULED_TASK_CONTINUE_IN_CHAT_EVENTanalytics eventScheduleResults.tsx
../app/scheduled-tasks/types→../../app/scheduled-tasks/typesanalyticsEvents.ts
SCHEDULED_TASK_CONTINUE_IN_CHAT_EVENTconstantMotivation
When a scheduled task completes, users currently have no way to immediately act on the output. They must manually copy, open a new chat, and paste. This feature closes the loop — run → review → act → repeat — without leaving the browser.
Mock UX
Closes #949