You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of 09-implementation-plan/14-remediation-plan.md: dashboard contract/type cleanup.
Why This PR Exists
This moves the dashboard onto the sample-centered read APIs introduced in PR 08, so experiment pages and sample pages render experiment, environment, sampler, sample, event, and graph state rather than definition/run analytics.
What Actually Changes
Replaces /experiments/[definitionId] with /experiments/[experimentId].
Adds sample-centered dashboard components:
ExperimentDetail.tsx
SampleTable.tsx
SampleDetail.tsx
SampleEvents.tsx
Adds state builders in src/lib/sample-state/dashboard.ts.
Adds server loaders for experiments and samples under src/lib/server-data.
Uses backend routes such as /experiments/{id}, /samples/{id}, /samples/{id}/events, and /samples/{id}/graph.
Updates dashboard contract/unit/component tests.
Gotchas / Review Risks
This PR does not itself regenerate the REST/event files. It wraps existing/generated schemas in handwritten contract bridges such as ExperimentDetailSchema and SampleEventViewSchema.
Some legacy bridge names remain: RawExperimentRunRow, ExperimentRunMetrics, parseExperimentDetail, loadSampleSnapshot, and harness fields like runs/mutationsBySample.
Links currently route to /samples/{id}/detail with a redirect, even though the plan wants /samples/{id} as the canonical path.
SampleEvents.tsx renders generic event type/target fields rather than exhaustively using the discriminated event union.
Do not read this as complete dashboard vocabulary cleanup; it is the consumer migration layer.
Cleaned Later
Later remediation should delete /detail, regenerate contracts cleanly, rename harness/socket/activity leftovers, and collapse REST/live event compatibility types.
PR 11 removes definition launch surfaces that the dashboard no longer depends on.
Validation Notes
Agent review saw Python lint/type, frontend lint/type, unit/state, and integration passing for this PR; dashboard e2e/smokes were still failing. Review should focus on whether the remaining compatibility bridge names are temporary and tracked.
Closed after landing the cumulative episode/sample stack snapshot through PR132 directly onto dev in merge commit 1c22130. This PR's changes are included in dev.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review Guide
Stack position: PR 10, base
codex/episode-sample-pr09-cli-inspection, headcodex/episode-sample-pr10-dashboard.Implements RFC Docs
03-core-runtime-persistence-fe.md: dashboard reads experiment/environment/sample/sampler state.03b-implementation-churn.md: FE moves from definition/run pages to experiment/sample pages.09-implementation-plan/11-pr-10-dashboard.md, partially.09-implementation-plan/14-remediation-plan.md: dashboard contract/type cleanup.Why This PR Exists
This moves the dashboard onto the sample-centered read APIs introduced in PR 08, so experiment pages and sample pages render experiment, environment, sampler, sample, event, and graph state rather than definition/run analytics.
What Actually Changes
/experiments/[definitionId]with/experiments/[experimentId].ExperimentDetail.tsxSampleTable.tsxSampleDetail.tsxSampleEvents.tsxsrc/lib/sample-state/dashboard.ts.src/lib/server-data./experiments/{id},/samples/{id},/samples/{id}/events, and/samples/{id}/graph.Gotchas / Review Risks
ExperimentDetailSchemaandSampleEventViewSchema.RawExperimentRunRow,ExperimentRunMetrics,parseExperimentDetail,loadSampleSnapshot, and harness fields likeruns/mutationsBySample./samples/{id}/detailwith a redirect, even though the plan wants/samples/{id}as the canonical path.SampleEvents.tsxrenders generic event type/target fields rather than exhaustively using the discriminated event union.Cleaned Later
/detail, regenerate contracts cleanly, rename harness/socket/activity leftovers, and collapse REST/live event compatibility types.Validation Notes
Agent review saw Python lint/type, frontend lint/type, unit/state, and integration passing for this PR; dashboard e2e/smokes were still failing. Review should focus on whether the remaining compatibility bridge names are temporary and tracked.