fix(frontend): keep the test set synced across playground commits#4653
Conversation
Committing a draft replaces the anchor revision id, which renames the derived loadable id (testset:workflow:<revisionId>). The session relink (AGE-3785) already moved chat history and execution results to the new key but left the test set connection behind, so every commit silently unsynced the test set: the dropdown showed unsynced, the unused-columns footer (connection-gated) vanished, and the URL snapshot downgraded the rows to a local test set, which also disabled the server-snapshot protection added for #4647. Migrate connectedSourceId/Name/Type, hiddenTestcaseIds and activeRowId to the new loadable id in the same pass that moves executionResults.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
Railway Preview Environment
Updated at 2026-06-12T12:35:52.251Z |
aaf18df
into
wip/playground-testcase-server-columns
Context
Committing a prompt in the playground silently disconnected the synced test set. The header dropdown flipped back to "Test set", the "N unused testcase columns hidden" footer disappeared from every row, and the URL snapshot then saved the rows as a local test set instead of a connection. Creating an app from a draft prompt hits the same path (it is the first commit), which is how this was reported: sync a test set, create the app, the hidden columns vanish.
Root cause: the connection lives in loadable state keyed by
testset:workflow:<revisionId>. A commit produces a new revision id, so the key changes. The relink step that already carries chat history and execution results across that rename (#4457) never carried the connection, so it stayed stranded on the old key.This also undermined #4647/#4649: once the snapshot downgrades the rows to a local test set, they lose their server snapshot, and the next Run deletes the unused columns again.
Changes
relinkLoadableSessionsnow migratesconnectedSourceId,connectedSourceName,connectedSourceType,hiddenTestcaseIds, andactiveRowIdto the new loadable id in the same pass that already movesexecutionResults, and clears them on the old key.Before: commit v1 to v2, the dropdown shows "Test set" and the unused-column footers are gone.
After: commit v1 to v2, the dropdown still shows "completion_testset (v2)", footers and values stay, and a reload keeps the connection (the snapshot encodes it again).
Tests
anchorSwapConnectionMigration.test.ts) drive the real controller through a commit-style anchor swap with a real Jotai store. Package suite passes 89/89;tsc --noEmitandpnpm lint-fixclean.What to QA
Stacked on #4649 (
wip/playground-testcase-server-columns).Closes #4655.