Skip to content

feat(studio): run the test at the cursor, a tag, or the failed tests - #517

Merged
pbertsch merged 2 commits into
mainfrom
feat/studio-run-scope
Nov 5, 2026
Merged

pbertsch merged 2 commits into
mainfrom
feat/studio-run-scope

Conversation

@pbertsch

Copy link
Copy Markdown
Member

Summary

  • Studio's Run control takes a scope: the whole file (the default), the test at the cursor, the tests with one tag, or the tests that failed the last time the file ran in this session.
  • Results group failures first when a run has more than one outcome.
  • Automation's run_file and the MCP tool studio_run_file take line, tag or failed_only; give at most one. A scope that matches no test is an error and nothing runs. Two tests with the same name refuse a scope that names one of them.
  • Scoped runs use the same check as Run File: the file must be a .probe file inside the open workspace or an automation folder, and the check runs before the file is read for its tests.
  • The failed tests are kept in memory, so a restart starts with none. The CLI has no per-test filter yet, so probe test is unchanged.
  • main is merged in. The conflicts were in the Studio run path, the MCP tool description and the changelog.

Test plan

  • go vet ./... and go test ./... in studio, including the scope tests and tests that the folder check runs before the scope
  • go vet ./... and go test ./internal/mcp/... ./internal/runner/... ./internal/cli/... at the repo root
  • Frontend: npm run build, typecheck:device-view, test:device-view, test:probescript, check:probescript, test:run-scope (10)
  • CI green on this PR
  • On a device: run a file, run the test at the cursor, run one tag, then re-run the failed tests

🤖 Generated with Claude Code

Next to Run, a scope control picks the whole file (the default), the test at the cursor, the tests with one tag, or the tests that failed the last time the file ran in this session. Automation's run_file takes line, tag or failedOnly, and studio_run_file takes line, tag or failed_only; give at most one.

The scope is resolved before the run starts, so a scope that matches no test is an error and nothing runs. Two tests that share a name refuse a scope that names one of them. The runner gains a name filter (TestNames) for this; the CLI is unchanged.

Results group failed, passed and skipped tests when a run has more than one outcome. The failed tests are kept in memory only.
# Conflicts:
#	CHANGELOG.md
#	internal/mcp/studio.go
#	studio/app.go
#	studio/frontend/src/main.ts
#	studio/runtrack.go
#	website/src/content/docs/tools/mcp.md
@pbertsch
pbertsch requested a review from a team as a code owner October 27, 2026 03:44
@pbertsch
pbertsch merged commit 8168afe into main Nov 5, 2026
21 of 22 checks passed
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.

1 participant