Skip to content

[cuegui] Fix blank Stuck Frame page when default show is missing#2445

Open
ramonfigueiredo wants to merge 1 commit into
AcademySoftwareFoundation:masterfrom
ramonfigueiredo:fix/cuegui-stuck-frame-blank-page
Open

[cuegui] Fix blank Stuck Frame page when default show is missing#2445
ramonfigueiredo wants to merge 1 commit into
AcademySoftwareFoundation:masterfrom
ramonfigueiredo:fix/cuegui-stuck-frame-blank-page

Conversation

@ramonfigueiredo

@ramonfigueiredo ramonfigueiredo commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Related Issues

Summarize your change.

  • StuckFrameControls hardcoded findShow(os.getenv("SHOW", "pipe")) during construction, which raised EntityNotFoundException on any deployment without a show named "pipe" (e.g. a fresh setup with no SHOW env var)
  • AbstractDockWidget attaches the dock to the main window before its content is built, so the failure left the CueCommander Stuck Frame panel completely blank
  • Add __resolveInitialShow() helper: use SHOW only when it points to an existing show, otherwise fall back to the first active show, and return None (logging a warning) when no show exists so the panel always renders
  • Harden showChanged() to ignore empty input and catch lookup failures\
  • Add import opencue.exception

- StuckFrameControls hardcoded `findShow(os.getenv("SHOW", "pipe"))` during construction, which raised EntityNotFoundException on any deployment without a show named "pipe" (e.g. a fresh setup with no SHOW env var)
- AbstractDockWidget attaches the dock to the main window before its content is built, so the failure left the CueCommander Stuck Frame panel completely blank
- Add `__resolveInitialShow()` helper: use SHOW only when it points to an existing show, otherwise fall back to the first active show, and return None (logging a warning) when no show exists so the panel always renders
- Harden `showChanged()` to ignore empty input and catch lookup failures\
- Add `import opencue.exception`
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

StuckFramePlugin.py adds an opencue.exception import and replaces the direct findShow call in StuckFrameControls.__init__ with a new __resolveInitialShow static method. This helper checks the SHOW env variable, falls back to the first active show on failure, and returns None with warnings when no show is available. showChanged now strips input, skips empty values, and catches CueException.

Changes

Show Resolution Hardening in StuckFramePlugin

Layer / File(s) Summary
Import and init wiring
cuegui/cuegui/plugins/StuckFramePlugin.py
Adds opencue.exception import and updates __init__ to call __resolveInitialShow, passing the resolved show name (or "") into ShowCombo instead of calling findShow directly.
__resolveInitialShow helper and showChanged hardening
cuegui/cuegui/plugins/StuckFramePlugin.py
Introduces the __resolveInitialShow static method with SHOW env-var lookup, getActiveShows fallback, and warning emission on failures; updates showChanged to strip and validate input and wrap findShow in CueException handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop, hop, the show must go on,
No more crashing when a show is gone!
I check the env, I check the list,
With warnings and fallbacks — nothing's missed.
Exceptions caught, the frames stay unstuck,
This bunny's code needs no extra luck! 🎬

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main fix: resolving a blank Stuck Frame page when the default show is missing, which is the core issue addressed in this changeset.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cuegui/cuegui/plugins/StuckFramePlugin.py`:
- Around line 319-325: The `self.__current_show` variable is not being cleared
when the show input is empty or when the show lookup fails, which allows the
code to continue querying a previously selected show. Add a statement to set
`self.__current_show` to None before the return statement when the show string
is empty (after the `if not show:` check), and also add a statement to set
`self.__current_show` to None in the except block when the
opencue.exception.CueException is caught during the opencue.api.findShow call.
This ensures stale state is cleared whenever an invalid selection path is
encountered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b184f0fd-2dd2-4a08-9803-b1939602c731

📥 Commits

Reviewing files that changed from the base of the PR and between ca5f70f and e2d205b.

📒 Files selected for processing (1)
  • cuegui/cuegui/plugins/StuckFramePlugin.py

Comment on lines +319 to +325
show = str(show).strip()
if not show:
return
try:
self.__current_show = opencue.api.findShow(show)
except opencue.exception.CueException:
logger.warning("Unable to find show '%s'.", show)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Clear stale show state on invalid selection paths.

On Line 320 (empty input) and Line 324 (lookup failure), self.__current_show is left unchanged. That can keep querying a previously selected show even when the current selection is invalid/empty.

💡 Suggested fix
 def showChanged(self, show):
     """Sets current show the one provided."""
     show = str(show).strip()
     if not show:
+        self.__current_show = None
         return
     try:
         self.__current_show = opencue.api.findShow(show)
     except opencue.exception.CueException:
         logger.warning("Unable to find show '%s'.", show)
+        self.__current_show = None
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
show = str(show).strip()
if not show:
return
try:
self.__current_show = opencue.api.findShow(show)
except opencue.exception.CueException:
logger.warning("Unable to find show '%s'.", show)
show = str(show).strip()
if not show:
self.__current_show = None
return
try:
self.__current_show = opencue.api.findShow(show)
except opencue.exception.CueException:
logger.warning("Unable to find show '%s'.", show)
self.__current_show = None
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuegui/cuegui/plugins/StuckFramePlugin.py` around lines 319 - 325, The
`self.__current_show` variable is not being cleared when the show input is empty
or when the show lookup fails, which allows the code to continue querying a
previously selected show. Add a statement to set `self.__current_show` to None
before the return statement when the show string is empty (after the `if not
show:` check), and also add a statement to set `self.__current_show` to None in
the except block when the opencue.exception.CueException is caught during the
opencue.api.findShow call. This ensures stale state is cleared whenever an
invalid selection path is encountered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant