Skip to content

Studio/Designer/dashboard default to the private lab data repo; ?repo= tab override; Rig id (LAB-227 Phase 4) - #291

Open
mbreiser wants to merge 1 commit into
mainfrom
claude/affectionate-mendel-a3f8af
Open

mbreiser wants to merge 1 commit into
mainfrom
claude/affectionate-mendel-a3f8af

Conversation

@mbreiser

@mbreiser mbreiser commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Summary

LAB-227 Phase 4: the Studio, the Pattern Designer and the data-browser dashboard now default to the lab's private data repo reiserlab/arena-experiments. The CSHL course repo reiserlab/cshl-2026-course stays usable by typing it into the Repo field (course benches and rig03-sr still write there).

  • Default repo flip — Studio.DEFAULT_COURSE_REPO, the Designer's new DEFAULT_DATA_REPO (a fresh browser lists the lab repo in Open from Repo… / Save to Repo… without a Studio visit), the dashboard's DEFAULT_REPO + its repo field, link and local-path default. tests/test-studio-shell.js pins the three strings equal.
  • "Bench id" → "Rig id" in the Studio and Designer UI (label, placeholder, titles, banners, roster log lines). The localStorage key studio_bench_id and the code identifiers keep their names.
  • ?repo= signed-out bug (ww18, 2026-10-29) — root cause: the Studio had no ?repo= override at all; ?repo= was honored only together with p or replay, so the page-start shared-pattern listing always used the stored/default repo (the log said "course repo: 52 shared pattern preview(s)" for the DEFAULT repo). Now Studio.sessionRepo is parsed in the classic shell and courseSettings() returns it ahead of the stored repo and the default — a tab-scoped override, like the Pattern Designer's, never written to localStorage, in force before the page-start listings, for reads and writes, signed in or out. encodeApp({sessionRepo}) keeps a bare ?repo= across the canonical URL rewrite so a refresh stays on the requested repo; the ⚙ Settings Repo field shows the override (hover explains it) and typing a repo ends it. The listing log line now names the repo, and a signed-out 404 says "sign in if this repository is private".
  • Patterns ↗ passes ?repo= from courseSettings() — default, stored or ?repo= override — instead of only a stored value.
  • Replay — a signed-out 404 on a run log or run id says "sign in if this repository is private" instead of "not found" (mirrors the Studio's course-repo open message).
  • Per-rig vocabularies (the optional item) — fetchCourseGenotypes / fetchCourseVocab read protocols/<rig-id>/<file>.yaml before the repo-root file (readCourseVocabFile); a missing rig-level file is silent, the source link and log name the file actually used. protocols/ was already a readable prefix.
  • Docs — docs/development/data-repo-token-runbook.md (default repo, Rig id, course benches overwrite the field), dashboard/data-browser/README.md, one CLAUDE.md paragraph on the ?repo= override rule.

Deferred (not in this PR): the remaining "course repo" vocabulary in Studio copy and function names (Save → course repo, Course-repo open failed, fetchCourse*) — a wording pass, no behavior.

Linear: LAB-227 (Phase 4).

Tier

next candidate

Release notes

Studio

  • The data repo defaults to the lab's private reiserlab/arena-experiments. Course benches keep typing reiserlab/cshl-2026-course into ⚙ Settings → Repo; a ?repo=owner/name link now switches that tab to the named repo for everything (pattern previews, Open from Repo, saves, replay), signed in or out, without changing the stored setting.
  • "Bench id" is now "Rig id" in ⚙ Settings and every message that mentions it.
  • Pattern previews name their source repo in the log, and a signed-out private repo says so instead of staying silent.
  • A rig can keep its own genotype, age, sex and fly-number lists at protocols/<rig-id>/<file>.yaml; the repo-root lists remain the lab-wide fallback.
  • Replay says "sign in if this repository is private" when a signed-out read of a run log fails, instead of "not found".

Pattern Designer

  • Open from Repo… and Save to Repo… default to reiserlab/arena-experiments in a browser that has not set a repo; the Studio's Patterns ↗ link always hands over the repo the Studio is on.

Dashboard

  • The repository field, the header link and the local-path default point at reiserlab/arena-experiments; type reiserlab/cshl-2026-course to browse the 2026 course logs.

Test plan

  • pixi run test — 73/73 files green (new checks in tests/test-studio-shell.js and tests/test-studio-url-state.js)
  • Local server, storage wiped: ⚙ Settings → Repo shows reiserlab/arena-experiments; the log says the shared library is not readable signed out (HTTP 404) — sign in if private; Patterns ↗ → pattern_editor.html?arena=…&repo=reiserlab%2Farena-experiments
  • Signed out, ?repo=reiserlab/cshl-2026-course: log "shared pattern library: 52 preview(s) wired from reiserlab/cshl-2026-course/patterns/"; courseSettings().repo = course repo; the canonical URL keeps ?repo=; Patterns ↗ carries the course repo
  • Pattern Designer with no stored repo: Open from Repo… lists reiserlab/arena-experiments
  • Dashboard: repo field, "Data repo" link and local path default to the lab repo
  • On a rig PC with a stored token: per-rig protocols/<rig-id>/genotypes.yaml is picked up (not bench-tested; the root-file path is unchanged)

🤖 Generated with Claude Code

…o= is a tab-scoped override; "Rig id" (LAB-227 Phase 4)

- Default repo → reiserlab/arena-experiments in the Studio (DEFAULT_COURSE_REPO),
  the Pattern Designer (new DEFAULT_DATA_REPO) and the dashboard (DEFAULT_REPO,
  repo field, link, local path); the course repo stays usable by typing it.
- Studio.sessionRepo: a bare ?repo= link overrides the stored repo for that tab
  (courseSettings), in force before the page-start listings, signed in or out —
  fixes the ww18 2026-10-29 case where ?repo= signed out wired the DEFAULT repo's
  shared pattern previews. encodeApp({sessionRepo}) keeps it across the canonical
  URL rewrite; typing a repo in ⚙ Settings ends it. The listing log names the repo.
- Patterns ↗ passes the effective repo (default / stored / override).
- Replay: a signed-out 404 says "sign in if this repository is private".
- UI copy "Bench id" → "Rig id" (storage key studio_bench_id unchanged).
- Per-rig vocabularies: protocols/<rig-id>/<file>.yaml before the repo root.
- Docs: token runbook, dashboard README, CLAUDE.md rule; tests pin the defaults.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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