Skip to content

feat(rod): display experiment title in queue jobs table - #1522

Merged
janzak-dev merged 5 commits into
mainfrom
feat/rod-queue-jobs-experiment-title
Nov 2, 2026
Merged

janzak-dev merged 5 commits into
mainfrom
feat/rod-queue-jobs-experiment-title

Conversation

@janzak-dev

@janzak-dev janzak-dev commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Displays the actual experiment title (e.Title) in the "Experiment name" column of the "Resources" tab queue jobs table (<xmc-queue-jobs-table>), falling back to 'Experiment #' + job.xid when experimentTitle is empty or undefined.

Motivation & Context

Previously, the queue jobs table hardcoded Experiment #{{ job.xid }} because the DashboardJob protobuf and storage layer did not expose the experiment title, even though the underlying Spanner and Postgres queries already joined the Experiments table. Exposing e.Title improves user clarity by identifying jobs by their human-readable experiment title instead of numeric IDs alone.

Screenshots - taken from the screenshot tests

image

Key Changes

  • Storage Layer (internal/storage/storage.go): Renamed WorkUnitWithAuthor to ActiveWorkUnit (it now carries parent-experiment metadata beyond the author, matching ActiveWorkUnitsResult / FetchActiveWorkUnitsByQueues) and added ExperimentTitle string.
  • Spanner Storage (internal/storage/spanner/workunit/fetch_active_work_units.go): Updated fetchActiveWorkUnitPKsSQL to include COALESCE(e.Title, '') AS ExperimentTitle, scanned it into workUnitPK, and copied it to ActiveWorkUnit. Extended TestFetchActiveWorkUnitsByQueues_EmulatorIntegration to assert ExperimentTitle.
  • Postgres Storage (internal/storage/postgres/workunit/queries.go): Updated fetchActiveWorkUnitsSQL to include COALESCE(e.Title, '') AS experiment_title, mapped it onto activeWorkUnitRow, and copied it into ActiveWorkUnit. Added unit test assertions in queries_test.go.
  • ROD Protobuf (api/protos/rod/api.proto) & TypeScript Types (cmd/ui/app/protos/rod.d.ts): Added additive, backward-compatible field string experiment_title = 11; to DashboardJob, and updated the corresponding TypeScript interface. Verified //api:protos_breaking_test passes.
  • ROD Data Provider (cmd/rod_data_provider/jobs.go): mapWorkUnitToDashboardJob now takes a storage.ActiveWorkUnit (instead of separate work unit / user arguments) and maps ExperimentTitle onto DashboardJob.ExperimentTitle. Extended the TestGetRunningAndPendingJobs expectation in jobs_test.go to assert ExperimentTitle is mapped.
  • Frontend Template & Tests (cmd/ui/app/side_panel/contents/queue_jobs_table/...): Updated <xmc-queue-jobs-table> template to render {{ job.experimentTitle || 'Experiment #' + job.xid }} and updated aria-label accordingly. The harness getLinks() / getRowLinks() now also return jobLinkAriaLabel; unit tests cover a populated title, an empty title, and an undefined title (fallback). Gave the first MOCK_JOBS entry in cmd/ui/screenshot_tests/test_utils.ts an experimentTitle and regenerated both resource_dashboard screenshot baselines so they cover the title and the Experiment #<xid> fallback.

Assumptions

None — requirements were fully specified.

Verification & Testing

  • Bazel Unit Tests:
    • bazel test //cmd/rod_data_provider/... (PASSED: 6 test targets)
    • bazel test //internal/storage/spanner/workunit:workunit_unit_test (PASSED)
    • bazel test //internal/storage/postgres/workunit:workunit_test (PASSED)
    • bazel test //api:protos_breaking_test (PASSED)
    • bazel test //cmd/ui:ui_unit_tests (PASSED)
  • Coverage:
    • bazel coverage --combined_report=lcov //cmd/rod_data_provider/... verified 100% test coverage of added/modified lines in jobs.go.
  • Screenshot Tests:
    • npx playwright test resource_dashboard --update-snapshots=all regenerated resource-dashboard-initial and resource-dashboard-queue-selected; full npx playwright test suite passes (10/10).
  • Pre-commit Linter Suite:
    • ./.githooks/pre-commit passed cleanly across all linters (Buildifier, gofmt, golangci-lint, ESLint, Prettier, test determinism, license headers) and 72 affected Bazel unit test targets.
  • Diff Sizing Check:
    • ./tools/analyze_diff_size.py --base-ref origin/main reported 65 prod lines, 21 test lines, 86 total lines (well within thresholds).

Related Issues / Bugs

N/A

TAG=agy
CONV=3618dd8c-9513-4319-8085-208b535d0f56

Add ExperimentTitle to storage WorkUnitWithAuthor, Spanner and Postgres
active work units queries, ROD proto DashboardJob, and the frontend
Resources tab queue jobs table with fallback to 'Experiment #<xid>'
when the title is empty.

TAG=agy
CONV=3618dd8c-9513-4319-8085-208b535d0f56
Drop a mapper test duplicated by TestGetRunningAndPendingJobs and
compare Spanner experiment titles with a single cmp.Diff.

TAG=agy
CONV=3618dd8c-9513-4319-8085-208b535d0f56

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the experiment_title field to the DashboardJob message and propagates it from the database layer (both Postgres and Spanner) up to the UI. The UI now displays the experiment title if available, falling back to the experiment ID, and includes updated accessibility labels. Comprehensive tests have been added and updated across the backend, storage, and frontend components to support this new field. There are no review comments to address.

Give the first mock queue job an experiment title so the ROD screenshot
baselines cover both the title and the "Experiment #<xid>" fallback.

TAG=agy
CONV=3618dd8c-9513-4319-8085-208b535d0f56
The struct now carries the parent experiment title alongside the
author, so name it after what it represents: a pending or running work
unit returned by FetchActiveWorkUnitsByQueues.

TAG=agy
CONV=3618dd8c-9513-4319-8085-208b535d0f56
Pass storage.ActiveWorkUnit to mapWorkUnitToDashboardJob instead of
adjacent string arguments, read the job link aria-label through the
existing getLinks harness method, drop a Spanner emulator test that
duplicated EmulatorIntegration, and refresh the activeWorkUnitRow doc.

TAG=agy
CONV=3618dd8c-9513-4319-8085-208b535d0f56
@janzak-dev
janzak-dev marked this pull request as ready for review November 2, 2026 11:58
@github-actions
github-actions Bot requested a review from AntonTyb November 2, 2026 11:58
@janzak-dev
janzak-dev added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 7b98e53 Nov 2, 2026
15 checks passed
@janzak-dev
janzak-dev deleted the feat/rod-queue-jobs-experiment-title branch November 2, 2026 12:34
VLukiantsev added a commit that referenced this pull request Nov 10, 2026
Nightly UI verifiers reference Angular DOM through hand-copied
selector strings with no build-graph edge to cmd/ui/app, so template
changes (e.g. #1522) pass presubmit and break nightly.

check_ui_selector_contract.py collects selectors from the nightly
verifier sources via ast and requires every custom tag, class and
attribute to exist in the Angular templates/components (Material/CDK
prefixes exempt). Literal :has-text / has_text copy matches require a
`# ui-contract: <reason>` annotation; existing matches are annotated.
Wired into .githooks/pre-commit and lint.yml.

TAG=agy
CONV=14b9d4de-eba0-4b96-9ca0-760d4a2cc024
VLukiantsev added a commit that referenced this pull request Nov 12, 2026
Nightly UI verifiers reference Angular DOM through hand-copied
selector strings with no build-graph edge to cmd/ui/app, so template
changes (e.g. #1522) pass presubmit and break nightly.

check_ui_selector_contract.py collects selectors from the nightly
verifier sources via ast and requires every custom tag, class and
attribute to exist in the Angular templates/components (Material/CDK
prefixes exempt). Literal :has-text / has_text copy matches require a
`# ui-contract: <reason>` annotation; existing matches are annotated.
Wired into .githooks/pre-commit and lint.yml.

TAG=agy
CONV=14b9d4de-eba0-4b96-9ca0-760d4a2cc024
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