Skip to content

[fix] Open automation runs in filtered sessions [#5971] - #6013

Open
huige66631 wants to merge 2 commits into
Agenta-AI:mainfrom
huige66631:fix/agent-automation-view-all
Open

[fix] Open automation runs in filtered sessions [#5971]#6013
huige66631 wants to merge 2 commits into
Agenta-AI:mainfrom
huige66631:fix/agent-automation-view-all

Conversation

@huige66631

@huige66631 huige66631 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Fixes #5971

The Automation runs "View all" link previously opened the default Sessions list.
This change adds ?mode=automation and restores the existing trigger-origin
session scope before the Sessions page renders.

The regular Sessions link remains unchanged. Missing, unknown, and repeated
mode values keep the existing behavior.

Testing

Verified locally

  • Ran the focused Vitest suite: 4 tests passed.
  • Ran git diff --check.
  • Ran the local OSS API health check: 200 {"status":"ok"}.
  • Verified the Overview Automation runs link resolves to /sessions?mode=automation.
  • Verified the Sessions page enables the Automation runs filter on load.

Added or updated tests

  • Added unit coverage for supported, missing, unknown, unrelated, and repeated route query values.

QA follow-up

  • The focused route was exercised in the local development environment.
  • Full web-suite verification remains outside this focused change.

Demo

Automation runs entry on agent overview

Automation runs filter in sessions

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

Contributor Resources

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 13, 2026
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

@huige66631 is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added enhancement New feature or request frontend labels Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

✅ Thanks @huige66631! This PR now meets the contribution requirements and has been reopened. A maintainer will review it soon.

@github-actions github-actions Bot added the incomplete-pr PR is missing required template sections or a demo recording label Aug 13, 2026
@github-actions github-actions Bot closed this Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 6524ec30-aaf0-4f50-a6a9-9deaeae12f60

📥 Commits

Reviewing files that changed from the base of the PR and between 728f39f and 66e7c2c.

⛔ Files ignored due to path filters (2)
  • docs/design/session-automation-view-all/automation-overview-demo.png is excluded by !**/*.png
  • docs/design/session-automation-view-all/automation-sessions-demo.png is excluded by !**/*.png
📒 Files selected for processing (9)
  • docs/design/session-automation-view-all/README.md
  • docs/design/session-automation-view-all/context.md
  • docs/design/session-automation-view-all/plan.md
  • docs/design/session-automation-view-all/research.md
  • docs/design/session-automation-view-all/status.md
  • web/oss/src/components/pages/overview/agent/AgentOverview.tsx
  • web/oss/src/components/pages/sessions/assets/sessionRouteScope.test.ts
  • web/oss/src/components/pages/sessions/assets/sessionRouteScope.ts
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/sessions/index.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added an Automation Runs “View all” link that opens sessions filtered to automation-triggered runs.
    • Preserved the existing Sessions “View all” behavior and available filters.
    • Unknown, missing, or repeated route parameters leave session results unchanged.
  • Documentation

    • Added design documentation covering navigation behavior, route handling, research, and validation status.
  • Tests

    • Added coverage for automation route mapping and invalid or missing parameters.

Walkthrough

The change adds automation-mode navigation from the Overview page. The Sessions route maps this mode to trigger-origin scope and initializes the scope before rendering scoped sessions. Tests and design documents describe the route behavior and validation status.

Changes

Automation session navigation

Layer / File(s) Summary
Route mode contract and parser validation
web/oss/src/components/pages/sessions/assets/sessionRouteScope.ts, web/oss/src/components/pages/sessions/assets/sessionRouteScope.test.ts, docs/design/session-automation-view-all/research.md
Defines the automation route mode, maps it to trigger-origin scope, and tests unsupported query values.
Overview automation link
web/oss/src/components/pages/overview/agent/AgentOverview.tsx, docs/design/session-automation-view-all/context.md, docs/design/session-automation-view-all/README.md
Routes the automation runs “View all” link with mode=automation while preserving the regular sessions link.
Scoped sessions route initialization
web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/sessions/index.tsx, docs/design/session-automation-view-all/plan.md, docs/design/session-automation-view-all/status.md
Parses the route mode, initializes shared session scope before rendering SessionsPage, and records the validation status.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: 🔵 Low · up to 66e7c

The change opens automation runs in a filtered Sessions view and restores the trigger-origin scope, but a route transition could leave stale filtering applied and show users the wrong session set; confirm scope synchronization/reset behavior and complete the required frontend lint check before merging.

Sequence Diagram(s)

sequenceDiagram
  participant AgentOverview
  participant SessionsRoute
  participant SessionScopeInitializer
  participant SessionsPage
  AgentOverview->>SessionsRoute: navigate with mode=automation
  SessionsRoute->>SessionScopeInitializer: initialize trigger scope
  SessionScopeInitializer->>SessionsPage: render after scope initialization
Loading

Possibly related PRs

  • Agenta-AI/agenta#5843: Both changes handle automation session listing with trigger-origin scope.
  • Agenta-AI/agenta#5927: This change extends automation session behavior to the Automation “View all” navigation path.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: opening automation runs in filtered sessions.
Description check ✅ Passed The description accurately explains the navigation change, filtering behavior, tests, and verification results.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot removed the incomplete-pr PR is missing required template sections or a demo recording label Aug 13, 2026
@github-actions github-actions Bot reopened this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(bug) "View all" on Automation runs opens the same unfiltered sessions list as Sessions

1 participant