Skip to content

fix(frontend): resolve pinned automation session names outside automation mode - #5939

Merged
mmabrouk merged 1 commit into
release/v0.112.0from
fix/pinned-automation-trigger-name
Aug 11, 2026
Merged

fix(frontend): resolve pinned automation session names outside automation mode#5939
mmabrouk merged 1 commit into
release/v0.112.0from
fix/pinned-automation-trigger-name

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Aug 11, 2026

Copy link
Copy Markdown
Member

Symptom

Pinning an automation session made it visible in human/default mode (the P2-8
fix from #5927 works), but its title read "Missing schedule" instead of
the real schedule or subscription name — on the Sessions page's default view,
the Agent Overview / Home card's human "Sessions" section, and (by the same
code path) the sidebar's pinned list.

Before (Sessions page, default mode):

missing schedule regression

Before (Home card, human sessions section):

home card missing schedule

(From the post-merge smoke QA on #5927; full walkthrough video at
https://github.com/Agenta-AI/agenta/releases/tag/qa-session-ux-5927.)

Root cause

Confirmed via network inspection: the same pinned session, queried from
automation mode, sent "expand":["last_message","trigger"] and resolved the
name correctly. Queried from human/default mode, the pinned sub-query sent
"expand":["last_message"] — no "trigger" — so the name never resolved.

pinnedSessionListArgs() in useSessionsList.ts and useSessionCardList.ts
overrides the pin's originPolicy to "all" (so the row shows up outside
automation mode, per P2-8) but left expansions as whatever the surrounding
surface's own policy requested. Every human-mode surface's policy omits
trigger by design (it's only needed for automation-origin rows), so a
pinned automation row landing in a human-mode list never asked for the one
field it needs to display its name. The sidebar's sidebarPinned policy in
sessionListPolicies.ts has the identical shape (expansions: []) and the
same gap.

Fix

Add "trigger" to the pinned query's expansions in both hooks (deduped
against whatever the surface already requests), and to the sidebarPinned
policy — alongside the existing origin override, not instead of it. A pinned
automation row now resolves its name regardless of which surface's default
policy it's rendered under.

Tests

Updated the existing pinnedSessionListArgs() unit tests in both hooks to
assert the added "trigger" expansion (and added a case confirming it isn't
duplicated when the surface already requests it), plus the
sessionListPolicies and sidebar sessionOptions tests for the
sidebarPinned policy change.

Verification

  • pnpm --filter @agenta/sessions test:unit — 38/38 pass
  • pnpm --filter @agenta/oss test:unit — 480/480 pass (1 pre-existing skip)
  • pnpm --filter @agenta/oss exec tsc --noEmit — clean
  • pnpm --filter @agenta/sessions run types:check — clean
  • pnpm lint-fix — clean (only pre-existing, unrelated warnings elsewhere)
  • Live verification on the dev deployment pending the current web container
    restart; will confirm the pinned name resolves on the Sessions default
    view, the Home card, and the sidebar once it's back up.

Found during post-merge smoke QA of #5927 (session UX interface). That stack
is already merged, so this regression fix lands as its own PR rather than an
amendment.

Do not merge — Mahmoud reviews and merges.

…tion mode

Pinning an automation session made it visible in human mode (P2-8), but its
title still fell back to "Missing schedule": the pinned sub-query's origin
override dropped the trigger expansion needed to resolve the schedule or
subscription name whenever the surrounding surface didn't already request it
(every human-mode surface, plus the sidebar). Add "trigger" to the pinned
query's expansions in useSessionsList/useSessionCardList and to the sidebar's
sidebarPinned policy, alongside the origin override, so a pinned automation
row resolves its name on every surface.
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 11, 2026
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Blocked Blocked Aug 11, 2026 12:30pm

Request Review

@dosubot dosubot Bot added bug report Something isn't working frontend tests labels Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ece7ddd-b6ae-4999-befa-6779bb400440

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-08-11T13:33:03.848Z

@mmabrouk
mmabrouk merged commit a9c18ac into release/v0.112.0 Aug 11, 2026
69 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug report Something isn't working frontend size:S This PR changes 10-29 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant