Skip to content

Link an Experiment's Details pane to its Experiment page - #1445

Merged
JacobStephens2 merged 3 commits into
mainfrom
issue-1438
Oct 27, 2026
Merged

JacobStephens2 merged 3 commits into
mainfrom
issue-1438

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Details pane (Peek) now links an Experiment's Command record to its Experiment page, next to Full Command log. The link appears in every Inbox section and on the Experiments page's row peek.

 Peek::new(command, inspection, csrf)
   issue_url      = issue link in the heading
+  experiment_url = kind == "Experiment" && experiment.id
+                    ? "/experiments/{id}" : None
-<p><a href="/log?command=…">Full Command log</a></p>
+<p><a href="/log?command=…">Full Command log</a> · <a href="/experiments/{id}">Experiment</a></p>

Askama HTML-escapes the id, like the pane's other values. Experiment ids are hex SHA-256 digests (src/evals/experiment.rs:215).

The hand-written site pages (site/index.html, site/how-it-works/, site/architecture/) don't list the Details pane's links, so none of them needed an edit.

Evidence

New tests in console::peek::tests:

experiment_record_links_its_experiment_page
  {kind: Experiment, experiment: {id: "exp-1<b>"}}
  → contains <a href="/experiments/exp-1&#60;b&#62;">Experiment</a>, after Full Command log
other_records_carry_no_experiment_link
  {kind: Run, experiment: {id}} → no /experiments/ link
experiment_record_without_an_id_carries_no_experiment_link
  {kind: Experiment}            → no link, no error
  • Before: cargo test --bin thirdshift console::peek::tests: experiment_record_links_its_experiment_page failed. The rendered pane had only Full Command log.
    After: 4 passed, 0 failed.

Other local runs:

  • cargo fmt --check passed.
  • cargo clippy --all-targets -- -D warnings passed.
  • Binary unit tests (cargo test): 1511 passed and 22 failed. All 22 are sandbox::tests, which fail with socat is not on PATH on this machine.
  • Integration tests (cargo test --no-fail-fast --test '*'): 71 files, 1587 passed and 22 failed.
    • 21 of the failures are environmental: the Trial and sandboxed grader tests hit the same missing socat (void_cause: sandbox_unavailable), and settlement::historical_review_and_reclosed_origin_regressions needs tomllib, which the local Python 3.9 lacks.
    • dismiss::dismissed_live_command_returns_when_it_dies_fails_or_ends_ready failed under the parallel run and passed when rerun alone.
    • CI has these tools and covers the full suite.

Merge Danger

Door: two-way

Blast Radius: tiny

The change adds one optional link to the Details pane and nothing else.

Review coverage

Both reviewers read both changed files (src/console/peek.rs, src/console/peek.html). No changed file was left unread, and nothing was excluded as generated output. The Standards review raised 3 judgement-call smells and the Spec review raised none. S3 is fixed: the test helper is renamed render_peek.

Unaddressed findings

Standards

  • S1. Possible Duplicated Code: format!("/experiments/{id}") is now built in a fourth place (src/console/peek.rs, experiment_url). Declined. The other three copies are in the Experiments page renderer (src/console/experiments/render.rs:221, src/console/experiments.rs:85). Gathering them means editing that page, and the issue puts the Experiments page's own Details layout out of scope (Experiment page Details open below the page, leaving the right column blank #1435). This diff follows the existing pattern.
  • S2. Possible Primitive Obsession / Feature Envy: value["kind"] == "Experiment" reads untyped show JSON. Declined. The reviewer marked it largely suppressed by the module's documented design: src/console/peek.rs:1 says "Render every show field, including nested Runs, without a second schema."

Spec

None.

Closes #1438

Built with claude 2.1.311 · claude-opus-5-5 · high

Security review outcome

No unaddressed introduced findings.

@JacobStephens2
JacobStephens2 merged commit 90cccac into main Oct 27, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1438 branch October 27, 2026 15:42
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 27, 2026
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.

Link an Experiment's Details pane to its Experiment page

1 participant