Skip to content

Fix study cancellations on native window presets and pane navigation - #88

Merged
TerminallyLazy merged 1 commit into
mainfrom
codex/viewer-action-target-fix
Sep 23, 2026
Merged

TerminallyLazy merged 1 commit into
mainfrom
codex/viewer-action-target-fix

Conversation

@TerminallyLazy

@TerminallyLazy TerminallyLazy commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Study requests repeatedly stopped on the brain window preset. The adapter indexed OHIF's preset array by a semantic name, producing an unknown action and revoking the task. Slice jumps also relied on the active pane after a potentially deferred pane switch.

Resolve configured presets by native ID/description before effects, apply their numeric values to the requested pane, and pass the explicit grid viewport to slice navigation. Wait for active-pane selection before active-dependent reading commands. Known preflight failures now return a failed tool result without cancelling the request; uncertain effects still pause, with an accurate reason.

Validation: viewer build; 64 focused viewer/controller tests; 14 backend lifecycle tests. The isolated synthetic Electron run completed series continuation/scope checks and a real two-pane test: second pane index 15, native brain preset 80/40, first pane unchanged. No patient images or new hosted-model calls. The previous single-pane/numeric-window acceptance did not exercise this defect.

Updated the owning DOX and study-exploration runbook. Unrelated .DS_Store changes excluded.

High-level PR Summary

This PR fixes two critical bugs in the OHIF viewer adapter that caused study requests to fail repeatedly: window presets were incorrectly indexed by semantic name instead of OHIF's array structure, and slice navigation relied on potentially outdated active pane state. The fix resolves presets by native ID/description before applying numeric values, passes explicit viewport references to navigation commands, and waits for active-pane selection to complete. Additionally, known preflight failures now return failed tool results without cancelling the entire request, while uncertain effects still pause with clearer messaging.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 viewer/assets/live/reading-tools.ts
2 viewer/assets/live/ohif.ts
3 viewer/assets/live/exploration.ts
4 viewer/scripts/test-exploration.mjs
5 viewer/scripts/test-live.mjs
6 backend/clinical/ai_exploration.py
7 desktop/scripts/ui-import-smoke.mjs
8 viewer/scripts/AGENTS.md
9 viewer/assets/live/AGENTS.md
10 desktop/AGENTS.md
11 backend/clinical/AGENTS.md
12 roadmap/ai-backend/CODEX_STUDY_EXPLORATION.md

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: de42d9e4-5b77-403b-bede-f5a906af39e5


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 725cee8 into main Sep 23, 2026
6 of 7 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