feat(webapp,database): show a Test column for agent sessions#4011
Conversation
Sessions started from the agent Test playground were tagged with a "playground" tag that rendered in the Sessions table. They are now flagged with a real Session.isTest boolean (mirroring TaskRun.isTest) and shown as a dedicated "Test" column with a check icon, to the left of Tags, on both the Sessions page and the Agent page, plus a matching property on the session detail page. isTest is a new Session column replicated to ClickHouse sessions_v1. The playground action sets isTest instead of writing the tag, and a migration backfills existing sessions (isTest where the legacy tag is present) and removes the now-redundant tag.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📜 Recent review details⏰ Context from checks skipped due to timeout. (25)
WalkthroughThe PR replaces the 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
The Test cell on the Sessions table and the Test property on the session detail page rendered an icon or dash with no text equivalent. Add an sr-only Yes/No value and mark the check icon and dash aria-hidden.
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
The Session.isTest backfill (and the array_remove of the "playground" tag) is removed from the migration, which now only adds the column. Existing sessions keep isTest=false; only sessions created from the Test playground going forward set it. The legacy "playground" tag is hidden from the Tags display in both the sessions list and detail presenters (via LEGACY_PLAYGROUND_TAG) so it does not surface on pre-isTest rows, without mutating historical data.
Summary
Sessions started from the agent Test playground were tagged with a
"playground"tag that rendered in the Sessions table's Tags column. They are now flagged with a realSession.isTestboolean (mirroringTaskRun.isTest) and surfaced as a dedicated Test column with a check icon, to the left of Tags, on both the Sessions page and the Agent landing page, plus a matching Test property on the session detail page. This mirrors how Standard and Scheduled task runs already indicate test runs.Design
isTestis a newSessioncolumn (Postgres) replicated into ClickHousesessions_v1alongside the existing fields. The Sessions list readsisTestfrom Postgres for display (ClickHouse only supplies the ordered session IDs), so the column renders correctly without a ClickHouse backfill.The playground action now sets
isTest: trueon session create instead of writing the"playground"tag. The triggered run still carriesplayground:truein its own tags (unchanged). A migration backfills existing sessions, settingisTest = trueand stripping the now-redundant"playground"tag where it is present, so the list and detail views render consistently without read-time tag filtering.