Skip to content

feat(agent): group scheduled task results by task name with collapse/expand#961

Closed
CENK TEKİN (cenktekin) wants to merge 2 commits into
browseros-ai:devfrom
cenktekin:feat/950-group-scheduled-task-results
Closed

feat(agent): group scheduled task results by task name with collapse/expand#961
CENK TEKİN (cenktekin) wants to merge 2 commits into
browseros-ai:devfrom
cenktekin:feat/950-group-scheduled-task-results

Conversation

@cenktekin
Copy link
Copy Markdown

@cenktekin CENK TEKİN (cenktekin) commented May 7, 2026

Summary

  • Group scheduled task results by task name with accordion-style collapse/expand
  • Only one group expanded at a time for clean navigation
  • Each group shows: task name, latest execution timestamp, and result count

Changes

New Component: ScheduledTaskResultGroup.tsx

  • Standalone component for each task group
  • Accordion behavior (single group expansion)
  • Shows status icon, task name, latest time, and run count

Updated: ScheduledTaskResults.tsx

  • Groups runs by job ID instead of flat chronological list
  • Groups sorted by most recent execution
  • Uses ScheduledTaskResultGroup for each group

Updated: ScheduleResults.tsx (newtab)

  • Same grouped structure for consistency
  • Maintains newtab-specific behavior (max 3 groups, "View more" link)

Motivation

Scheduled task results were displayed in a flat chronological list, making it hard to find results for a specific task when multiple tasks exist. This change groups results by task name with collapse/expand, solving the "train layout" problem described in #950.

Fixes #950

Ekran Görüntüsü_20260507_211347

…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
Copilot AI review requested due to automatic review settings May 7, 2026 18:03
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

PR author is not in the allowed authors list.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

All contributors have signed the CLA. Thank you!
Posted by the CLA Assistant Lite bot.

@cenktekin
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves scheduled task result browsing by grouping task runs by task name and adding accordion-style collapse/expand behavior, addressing the “flat chronological list” usability problem described in #950.

Changes:

  • Added an accordion group component to display a task header (name/status/latest time/count) with an expandable run history.
  • Updated the scheduled task results page to group runs by job ID and render via the new group component (single-group expansion).
  • Updated the newtab “ScheduleResults” preview to use the same grouped UI and cap the display to the top 3 groups.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
packages/browseros-agent/apps/agent/entrypoints/newtab/index/ScheduleResults.tsx Switches newtab results from a flat list to grouped, accordion-style task result groups.
packages/browseros-agent/apps/agent/entrypoints/app/scheduled-tasks/ScheduledTaskResults.tsx Switches the main app results list to grouped rendering and wires in single-group expansion state.
packages/browseros-agent/apps/agent/entrypoints/app/scheduled-tasks/ScheduledTaskResultGroup.tsx New reusable group component implementing the grouped header + expandable run list UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/browseros-agent/apps/agent/entrypoints/newtab/index/ScheduleResults.tsx Outdated
Comment thread packages/browseros-agent/apps/agent/entrypoints/newtab/index/ScheduleResults.tsx Outdated
Comment thread packages/browseros-agent/apps/agent/entrypoints/newtab/index/ScheduleResults.tsx Outdated
- 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
@cenktekin
Copy link
Copy Markdown
Author

All review comments addressed. Here's a summary of the fixes:

Review Comment Fix
Running groups hidden by MAX_DISPLAY_COUNT Running task groups are now always included first, then remaining slots filled by recency
Empty state flash before jobs load Added fallback job name ("Unknown task") when job metadata isn't available yet
Nested <button> HTML issue Kept existing codebase pattern (Button + stopPropagation) for consistency with ScheduledTaskCard.tsx
Duplicated grouping logic Extracted groupRunsByJob() helper in types.ts, shared across both entrypoints
Unused imports Cleaned up

Tested: Screenshot shows grouped results with accordion behavior working correctly.
Ready for another review when you get a chance! 🙏

@cenktekin
Copy link
Copy Markdown
Author

Consolidated into #1038 which includes updated security hardening and unified context features.

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.

[Feat] Group scheduled task results by task name with collapse/expand

2 participants