Skip to content

[OPIK-5161] [FE] Scope v2 Playground to active project#5927

Open
miguelgrc wants to merge 1 commit intomainfrom
miguelg/OPIK-5161-v2-playground-project-scope
Open

[OPIK-5161] [FE] Scope v2 Playground to active project#5927
miguelgrc wants to merge 1 commit intomainfrom
miguelg/OPIK-5161-v2-playground-project-scope

Conversation

@miguelgrc
Copy link
Copy Markdown
Contributor

Details

Migrates the v2 Playground page from the hardcoded "playground" project to the active project context from the URL. This is part of the IA revamp (OPIK-4617) to make all pages project-scoped in v2.

Key changes:

  • Trace and span creation now uses the active project name instead of the hardcoded PLAYGROUND_PROJECT_NAME constant
  • Added source: "playground" on traces for proper source-based filtering (R3)
  • Rules and metrics queries in RunOnDatasetDialog scoped to the active project via useActiveProjectId()
  • Trace links in output cells use activeProjectId instead of looking up the "playground" project by name
  • Removed project creation logic from RunOnDatasetDialog (no longer needed — active project always exists in v2)
  • All changes to createLogPlaygroundProcessor are backward compatible (new projectName param defaults to PLAYGROUND_PROJECT_NAME)

Not included (deferred):

  • TraceLogsSidebar integration (depends on T6) — playground traces are accessible by clicking individual output cells but not listed on the Logs page (by design, Logs filters source = sdk)

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-5161

Testing

  • Verified traces are created in the active project when running prompts
  • Verified trace links in experiment mode output cells open the correct trace detail
  • Verified rules/metrics in RunOnDatasetDialog are scoped to the active project
  • Verified v1 Playground still works unchanged (no v1 files modified)
  • TypeScript and ESLint pass clean

Documentation

N/A

Migrate the v2 Playground page from the hardcoded "playground" project
to the active project context. Traces, rules, and metrics now use the
project from the URL instead of a global "playground" project.

- Pass active project name to trace/span creation (backward compatible)
- Set source: "playground" on traces for proper source filtering
- Scope rules and metrics queries to active project in RunOnDatasetDialog
- Use activeProjectId for trace links and score containers
- Remove project creation logic from RunOnDatasetDialog
@miguelgrc miguelgrc requested a review from a team as a code owner March 27, 2026 17:05
@miguelgrc miguelgrc added the test-environment Deploy Opik adhoc environment label Mar 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔄 Test environment deployment process has started

Phase 1: Deploying base version 1.10.55-4706 (from main branch) if environment doesn't exist
Phase 2: Building new images from PR branch miguelg/OPIK-5161-v2-playground-project-scope
Phase 3: Will deploy newly built version after build completes

You can monitor the progress here.

@CometActions
Copy link
Copy Markdown
Collaborator

Test environment is now available!

To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml)

Access Information

The deployment has completed successfully and the version has been verified.

@CometActions
Copy link
Copy Markdown
Collaborator

🌙 Nightly cleanup: The test environment for this PR (pr-5927) has been cleaned up to free cluster resources. PVCs are preserved — re-deploy to restore the environment.

@CometActions CometActions removed the test-environment Deploy Opik adhoc environment label Mar 28, 2026
@CometActions
Copy link
Copy Markdown
Collaborator

🌙 Nightly cleanup: The test environment for this PR (pr-5927) has been cleaned up to free cluster resources. PVCs are preserved — re-deploy to restore the environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants