Skip to content

Add scoped Codex study sharing and native viewer tools; fix logo navigation - #85

Merged
TerminallyLazy merged 11 commits into
mainfrom
codex/study-exploration-native
Sep 23, 2026
Merged

TerminallyLazy merged 11 commits into
mainfrom
codex/study-exploration-native

Conversation

@TerminallyLazy

@TerminallyLazy TerminallyLazy commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

The sidebar previously shared only one viewport image. Users can now explicitly share the reading workspace or full active series with their selected ChatGPT/Codex model, and separately allow native viewer navigation and reversible edits without connecting Realtime. The logo now returns local reading to the local loader and governed/FHIR reading to the worklist, preventing navigation into OHIF's disabled study-list route.

The backend owns scoped, cancellable renderer tasks and App Server tools, with complete frame inventories, acknowledged delivery coverage, immutable action receipts, Stop/Take over and review before durable changes. Raw images remain transient. Native handlers reuse OHIF/Cornerstone services; specialized modality parity is documented as unverified.

Validation: production viewer build/type checks; focused Codex protocol tests (16 passed); isolated actual Electron/sidebar run delivered 34/34 synthetic CT frames, performed slice navigation and window/level, captured the reading grid/pane, and returned home by clicking the logo. It allocated no Realtime connection and persisted no pixels. Earlier focused contract/broker/native annotation checks are recorded in the implementation runbook. A fresh branch review found two recovery defects, both fixed. The user requested focused validation instead of further exhaustive fixture expansion.

Real subscription whole-series inference and specialized volume/fusion/ultrasound/segmentation acceptance remain open. Synthetic transport success does not establish diagnostic accuracy.

High-level PR Summary

This PR introduces comprehensive scoped Codex study exploration capabilities, enabling users to share entire reading views or complete series with their ChatGPT/Codex subscription model and operate native viewer tools independently of Realtime connections. The implementation adds a transport-independent action broker, HTTP-based task channel with renderer claims, bounded offscreen series rendering, native tool parity (navigation, measurements, annotations, segmentation), and compact sidebar UI for scope selection, activity tracking, and takeover. Images remain transient with receipt-only persistence, coverage distinguishes distinct acknowledged frame delivery from model prose, and mutations require review before durable changes. The system enforces strict boundaries: one active task per owner, 128 image deliveries/64 tool calls/10 minutes per run, 2048px/1MiB per image, with explicit continuation for partial coverage. Desktop capture handles mixed-study rejection, native calibration never invents units, and logo navigation now correctly returns to local loader or worklist. All paths preserve synthetic/deidentified pilot scope, clinical mode disablement, and existing voice/single-image behavior.

⏱️ Estimated Review Time: 1-3 hours

💡 Review Order Suggestion
Order File Path
1 backend/clinical/ai_exploration_contracts.py
2 backend/clinical/ai_exploration_coverage.py
3 packages/clinical-web/src/exploration.ts
4 backend/clinical/ai_actions.py
5 backend/clinical/ai_tools.py
6 backend/tests/test_ai_actions.py
7 backend/clinical/ai_exploration.py
8 backend/clinical/ai_exploration_repository.py
9 backend/clinical/ai_exploration_routes.py
10 backend/clinical/models.py
11 backend/tests/test_ai_exploration_routes.py
12 backend/tests/test_ai_exploration_lifecycle.py
13 backend/tests/exploration_helpers.py
14 viewer/assets/live/series.ts
15 viewer/assets/live/observations.ts
16 desktop/src/study-capture.mjs
17 desktop/tests/study-capture.test.mjs
18 desktop/src/main.mjs
19 desktop/src/preload.cjs
20 viewer/assets/live/capabilities.ts
21 viewer/assets/live/measurements.ts
22 viewer/assets/live/reading-tools.ts
23 backend/tests/test_ai_exploration_tools.py
24 viewer/scripts/test-exploration.mjs
25 backend/clinical/ai_codex_tools.py
26 backend/clinical/ai_codex.py
27 backend/tests/test_ai_codex_exploration.py
28 backend/clinical/ai_text.py
29 backend/clinical/ai_text_routes.py
30 viewer/assets/live/exploration.ts
31 viewer/assets/live/exploration-panel.ts
32 viewer/assets/live/controller.ts
33 viewer/assets/live/panel.ts
34 viewer/assets/live/ohif.ts
35 viewer/assets/radsysx-viewer.css
36 backend/clinical/ai_live.py
37 backend/clinical/ai_repository.py
38 backend/clinical/ai_routes.py
39 backend/tests/test_ai_codex.py
40 backend/clinical/ai_fixture_server.py
41 desktop/scripts/study-exploration-fixtures.py
42 desktop/scripts/ui-import-smoke.mjs
43 viewer/ohif-build/study-tools.patch
44 viewer/scripts/build-ohif-source.mjs
45 viewer/scripts/build-ohif-dist.mjs
46 .github/workflows/security-regressions.yml
47 AGENTS.md
48 README.md
49 backend/clinical/AGENTS.md
50 backend/requirements-ai.txt
51 backend/tests/AGENTS.md
52 desktop/AGENTS.md
53 desktop/package.json
54 docs/AGENTS.md
55 docs/superpowers/plans/2026-09-23-codex-study-exploration.md
56 docs/superpowers/specs/2026-09-23-codex-study-exploration-design.md
57 packages/clinical-web/AGENTS.md
58 packages/clinical-web/src/contracts.ts
59 packages/clinical-web/src/index.ts
60 roadmap/AGENTS.md
61 roadmap/ai-backend/CODEX_STUDY_EXPLORATION.md
62 roadmap/ai-backend/CODEX_SUBSCRIPTION.md
63 roadmap/ai-backend/CODEX_VIEWER_TOOL_MATRIX.md
64 viewer/assets/live/AGENTS.md
65 viewer/assets/live/protocol.ts
66 viewer/package.json
67 viewer/scripts/AGENTS.md
68 viewer/scripts/live-contracts.ts
69 desktop/tests/live-capture.test.mjs
70 viewer/scripts/test-live.mjs
⚠️ Inconsistent Changes Detected
File Path Warning
viewer/scripts/build-ohif-dist.mjs The logo navigation change (returning to /viewer/local or /worklist instead of /) modifies fundamental app navigation behavior in a PR focused on Codex study sharing. While mentioned in PR body, this is a separate UX concern unrelated to the study exploration feature.

Need help? Join our Discord

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4736cc3f-2373-40ac-8b9e-58f77336b1e7


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TerminallyLazy
TerminallyLazy merged commit ca16a76 into main Sep 23, 2026
6 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