Skip to content

feat(webapp,database): show a Test column for agent sessions#4011

Merged
samejr merged 4 commits into
mainfrom
samejr/session-test-column
Jun 22, 2026
Merged

feat(webapp,database): show a Test column for agent sessions#4011
samejr merged 4 commits into
mainfrom
samejr/session-test-column

Conversation

@samejr

@samejr samejr commented Jun 22, 2026

Copy link
Copy Markdown
Member

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 real Session.isTest boolean (mirroring TaskRun.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

isTest is a new Session column (Postgres) replicated into ClickHouse sessions_v1 alongside the existing fields. The Sessions list reads isTest from 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: true on session create instead of writing the "playground" tag. The triggered run still carries playground:true in its own tags (unchanged). A migration backfills existing sessions, setting isTest = true and stripping the now-redundant "playground" tag where it is present, so the list and detail views render consistently without read-time tag filtering.

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.
@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 77623d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9f96bf38-7092-4f34-a7c4-3e0b5a869b8d

📥 Commits

Reviewing files that changed from the base of the PR and between f71507d and 77623d8.

📒 Files selected for processing (5)
  • .server-changes/sessions-test-column.md
  • apps/webapp/app/presenters/v3/SessionListPresenter.server.ts
  • apps/webapp/app/presenters/v3/SessionPresenter.server.ts
  • apps/webapp/app/services/sessionsRepository/sessionsRepository.server.ts
  • internal-packages/database/prisma/migrations/20260621000000_add_is_test_to_session/migration.sql
💤 Files with no reviewable changes (1)
  • internal-packages/database/prisma/migrations/20260621000000_add_is_test_to_session/migration.sql
✅ Files skipped from review due to trivial changes (1)
  • .server-changes/sessions-test-column.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/webapp/app/presenters/v3/SessionPresenter.server.ts
  • apps/webapp/app/presenters/v3/SessionListPresenter.server.ts
  • apps/webapp/app/services/sessionsRepository/sessionsRepository.server.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (25)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (10, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (11, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (12, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (1, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (9, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (2, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (6, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (3, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (8, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (4, 12)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (5, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (7, 12)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
  • GitHub Check: audit

Walkthrough

The PR replaces the "playground" tag on test sessions with a dedicated Session.isTest boolean field. A Prisma migration adds the column (defaulting to false), and a parallel ClickHouse migration adds is_test UInt8 DEFAULT 0 to sessions_v1. The ClickHouse type contracts (SessionV1, SESSION_COLUMNS, SessionFieldTypes, SessionInsertArray) are extended accordingly. A new LEGACY_PLAYGROUND_TAG constant is introduced and used to filter the legacy tag from tag displays. Repository selects, the replication serializer, both presenters, the playground session-creation upsert, the SessionsTable component, and the session detail route are all updated to propagate and render the new field.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the summary, design, and implementation details but is missing the required checklist completion, testing steps, changelog section, and explicit confirmation that code was tested. Complete the PR checklist, document testing steps, add a changelog entry, and confirm the code was tested following the template structure.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main feature: adding a Test column to display agent sessions from the Test playground, which is the core change across all modified files.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch samejr/session-test-column

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 and usage tips.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

coderabbitai[bot]

This comment was marked as resolved.

samejr added 2 commits June 22, 2026 13:10
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.
@pkg-pr-new

pkg-pr-new Bot commented Jun 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@f71507d

trigger.dev

npm i https://pkg.pr.new/trigger.dev@f71507d

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@f71507d

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@f71507d

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@f71507d

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@f71507d

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@f71507d

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@f71507d

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@f71507d

commit: f71507d

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.
@samejr samejr merged commit a90a495 into main Jun 22, 2026
41 checks passed
@samejr samejr deleted the samejr/session-test-column branch June 22, 2026 14:30
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.

2 participants