[cueweb/docs] Allow delaying a layer start - #2507
Conversation
Bring CueWeb to parity with the CueGUI half of the layer start-after gate: the time before which no frame of a layer may be booked, written either by an operator or automatically by Cuebot's exit-status backoff (dispatcher.layer_delay.rules). - Layers table gains a sortable "Start After" column. The proto field is an int64, so the gateway marshals it as a JSON string the way it already does for minMemory/maxRss; layerStartAfterSeconds() normalizes string | number | undefined in one place and the column's accessor sorts on that number rather than on the formatted date. - Delayed rows are tinted via SimpleDataTable's getRowClassName hook - the same mechanism the Hosts table uses - on both the job detail page and the inline job panel. The tint compares against the current time, so it clears itself on the first render after the deadline passes. - "Set Start After..." in the layer context menu and on layer nodes in the Job Dependency Graph opens a dialog with the same +15m / +1h / +4h / Tonight 18:00 presets as CueGUI. The picker reads and writes local time and the RPC carries UTC epoch seconds; Clear sends 0. - New /api/layer/action/setstartafter proxies to /job.LayerInterface/SetStartAfter and rejects a non-integer, negative, or more-than-five-years-out value before it reaches the gateway, mirroring the INVALID_ARGUMENT Cuebot raises for a milliseconds-for-seconds mistake. The signed-in username travels with the request and is stored as the layer's start-after reason, which is rendered as plain text in both the column tooltip and the dialog. rest_gateway needs no registration change - it generates a route per RPC from job.proto, so SetStartAfter appears once the image is rebuilt. The news post is corrected accordingly; it had listed both that and CueWeb parity as open follow-up work.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughCueWeb adds deferred layer booking through a validated API route, client actions, start-after display fields, delayed-row styling, dialogs, context-menu actions, tests, and documentation. It also fixes jobs-table worker URL resolution. ChangesLayer Start After Scheduling
Worker URL Resolution
Estimated code review effort: 4 (Complex) | ~45 minutes Mergeability Score: ⚪ Minimal · up to The PR adds user-controlled layer start delays and related UI and documentation updates. Remaining concerns are limited to minor documentation wording and maintenance-comment clarity, so no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant LayerMenu
participant LayerStartAfterDialog
participant setLayerStartAfter
participant SetStartAfterRoute
participant Cuebot
LayerMenu->>LayerStartAfterDialog: open for selected layer
LayerStartAfterDialog->>setLayerStartAfter: submit UTC start_after
setLayerStartAfter->>SetStartAfterRoute: POST action request
SetStartAfterRoute->>Cuebot: call SetStartAfter with session username
Cuebot-->>SetStartAfterRoute: return result
SetStartAfterRoute-->>setLayerStartAfter: return response
setLayerStartAfter-->>LayerStartAfterDialog: show success or rejection
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@cueweb/app/api/layer/action/setstartafter/route.ts`:
- Around line 43-60: Update the route’s request handling before calling
handleRoute so the authenticated user identity is obtained server-side and used
as the username forwarded to Cuebot; ignore or overwrite jsonBody.username
rather than trusting the client-provided value, while preserving the existing
layer and start_after validation.
In `@cueweb/components/ui/job-dependency-graph.tsx`:
- Line 671: Update the “Set Start After...” Item in the graph menu to use
useDisableJobInteraction(), matching LayerContextMenu, so it is disabled when
job interaction is unavailable and cannot open LayerStartAfterDialog or invoke
setstartafter.
🪄 Autofix
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 Plus
Run ID: 6e9c73c1-1b2b-407e-a65e-cf42ceecc3b6
📒 Files selected for processing (17)
cueweb/app/__tests__/api/utils/layer_start_after.test.tscueweb/app/api/layer/action/setstartafter/route.tscueweb/app/jobs/[job-name]/page.tsxcueweb/app/layers/layer-columns.tsxcueweb/app/utils/action_utils.tscueweb/app/utils/layer_start_after_utils.tscueweb/components/ui/context_menus/action-context-menu.tsxcueweb/components/ui/job-dependency-graph.tsxcueweb/components/ui/job-details-inline.tsxcueweb/components/ui/layer-extra-dialogs.tsxcueweb/lib/metrics-service.tsdocs/_docs/developer-guide/cueweb-development.mddocs/_docs/other-guides/cueweb.mddocs/_docs/reference/cueweb.mddocs/_docs/tutorials/cueweb-tutorial.mddocs/_docs/user-guides/cueweb-user-guide.mddocs/news/2026-08-07-layer-start-after-deferred-booking.md
Resolve two review findings on the Start After work: - Derive the start-after username from the session in the route (getServerSession, as lib/audit.ts does) and ignore any username in the request body, so a caller cannot attribute a delay to someone else. The browser no longer sends one at all. - Honour the "Disable Job Interaction" safety flag in the Job Dependency Graph's layer menu. It gated none of its entries, so the flag stopped applying whenever an operator right-clicked a node instead of a table row; gating follows LayerContextMenu's choices.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cueweb/app/__tests__/api/utils/layer_start_after.test.ts (1)
85-93: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAdd a route provenance regression test.
This test verifies the browser payload only. It does not verify that the route replaces a hostile
usernamewith the authenticated session identity.Mock
getServerSessionandhandleRoute. Submit a request with a different bodyusername. Assert that the forwarded Cuebot payload contains only the session-derived username.🤖 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 `@cueweb/app/__tests__/api/utils/layer_start_after.test.ts` around lines 85 - 93, Extend the setLayerStartAfter route tests around the existing success case to mock getServerSession and handleRoute, then submit a request whose body contains a different username. Assert the forwarded Cuebot payload uses only the authenticated session identity and excludes the hostile body username.
🤖 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.
Nitpick comments:
In `@cueweb/app/__tests__/api/utils/layer_start_after.test.ts`:
- Around line 85-93: Extend the setLayerStartAfter route tests around the
existing success case to mock getServerSession and handleRoute, then submit a
request whose body contains a different username. Assert the forwarded Cuebot
payload uses only the authenticated session identity and excludes the hostile
body username.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 53be78cf-1ad4-4e4e-9e61-cdf12730bd39
📒 Files selected for processing (7)
cueweb/app/__tests__/api/utils/layer_start_after.test.tscueweb/app/api/layer/action/setstartafter/route.tscueweb/app/utils/action_utils.tscueweb/components/ui/job-dependency-graph.tsxcueweb/components/ui/layer-extra-dialogs.tsxdocs/_docs/developer-guide/cueweb-development.mddocs/_docs/reference/cueweb.md
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/_docs/reference/cueweb.md
- docs/_docs/developer-guide/cueweb-development.md
Add the Set Start After walkthrough to the CueWeb docs, and fix the row tint the screenshots exposed. TableRow carries `hover:bg-muted/50`, which beat the plain `bg-amber-100` on the delayed-layer row - so the tint vanished exactly when an operator hovered the row to read the Start After reason. layerRowClassName now restates the tint under `hover:` (and its dark-mode pair), so a delayed row darkens instead of going blank. Screenshots cover the flow end to end: a layer with no delay and a blank Start After column, the right-click entry, the dialog with its presets, the confirmation, and the delayed layer tinted with the time in the column. Both light and dark captures are committed; the pages reference the light ones. Docs updated: - user guide, tutorial: step-by-step walkthroughs - other guides: Figures 74-78 - reference: a Set Start After dialog section alongside the other dialogs - quick start: had no coverage of the feature at all; also missing from its job-graph layer-menu list and its Layers column list
…gueiredo/OpenCue into cueweb-layer-start-after
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@docs/_docs/other-guides/cueweb.md`:
- Line 98: Correct the figure caption text in the documentation by changing
“ftart After” to “Start After.”
In `@docs/_docs/quick-starts/quick-start-cueweb.md`:
- Line 266: Update the “Set Start After” description to clarify that Clear
removes the current delay, while OpenCue may automatically apply a new delay
again if the underlying condition persists.
In `@docs/_docs/tutorials/cueweb-tutorial.md`:
- Line 345: Update the “Pick a time” instruction to use the American English
spelling “afterward” instead of “afterwards,” without changing the surrounding
guidance.
🪄 Autofix
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 Plus
Run ID: 07e5550c-bf2b-4f56-b690-c06fe31db6cb
⛔ Files ignored due to path filters (10)
docs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_1_layer_before.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_1_layer_before_dark.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_2_layer_right_click.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_2_layer_right_click_dark.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_3_layer_set_start_after.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_3_layer_set_start_after_dark.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_4_set_start_after_confirmation.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_4_set_start_after_confirmation_dark.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_5_layer_after.pngis excluded by!**/*.pngdocs/assets/images/cueweb/cueweb_cuetopia_monitor_jobs_layers_set_start_after_5_layer_after_dark.pngis excluded by!**/*.png
📒 Files selected for processing (6)
cueweb/app/utils/layer_start_after_utils.tsdocs/_docs/other-guides/cueweb.mddocs/_docs/quick-starts/quick-start-cueweb.mddocs/_docs/reference/cueweb.mddocs/_docs/tutorials/cueweb-tutorial.mddocs/_docs/user-guides/cueweb-user-guide.md
🚧 Files skipped from review as they are similar to previous changes (3)
- cueweb/app/utils/layer_start_after_utils.ts
- docs/_docs/user-guides/cueweb-user-guide.md
- docs/_docs/reference/cueweb.md
Next 16 rejects the server-relative new URL('/public/workers/...', import.meta.url) the jobs table used for its two workers. Make both paths relative to data-table.tsx, as the build error asks.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cueweb/app/jobs/data-table.tsx (1)
705-706: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winClarify the version-specific explanation.
Next.js exposes files from
publicat the site root, so/public/workers/...is not the runtime asset path.new URL("../../public/workers/...", import.meta.url)is a bundler-resolved worker module reference. Replace the claim that Next.js 16 dropped server-relative worker URL support with this precise explanation. Next.js documents root-relativepublicassets, and webpack documents this worker-constructor pattern. (nextjs.org)Please also verify the emitted worker in both development and production builds.
🤖 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 `@cueweb/app/jobs/data-table.tsx` around lines 705 - 706, Update the comment near the worker URL construction to explain that public files are served from the site root, so /public/workers/... is not the runtime asset path, while new URL("../../public/workers/...", import.meta.url) is a bundler-resolved worker module reference. Remove the inaccurate Next.js 16 version claim, and verify the emitted worker path in both development and production builds.Source: MCP tools
🤖 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.
Nitpick comments:
In `@cueweb/app/jobs/data-table.tsx`:
- Around line 705-706: Update the comment near the worker URL construction to
explain that public files are served from the site root, so /public/workers/...
is not the runtime asset path, while new URL("../../public/workers/...",
import.meta.url) is a bundler-resolved worker module reference. Remove the
inaccurate Next.js 16 version claim, and verify the emitted worker path in both
development and production builds.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d634ac02-546e-4f8d-ac13-fe16ab03ba66
📒 Files selected for processing (1)
cueweb/app/jobs/data-table.tsx
- Restore the Figure 74 caption in the other-guides page, which had been truncated to "ftart After column is blank" by a bad edit; it now matches the image alt text and the wording used in the other pages. - Clarify what Clear does in the quick start and the other-guides layer action list: it drops the delay the layer currently has, but the exit-status backoff can apply a new one while the underlying condition persists. The user guide and tutorial already said so. - Use "afterward" rather than "afterwards" in the three places this change introduced.
1cea9a8
into
AcademySoftwareFoundation:master





Related Issues
Summarize your change.
Bring CueWeb to parity with the CueGUI half of the layer start-after gate: the time before which no frame of a layer may be booked, written either by an operator or automatically by Cuebot's exit-status backoff (dispatcher.layer_delay.rules).
rest_gateway needs no registration change - it generates a route per RPC from job.proto, so SetStartAfter appears once the image is rebuilt. The news post is corrected accordingly; it had listed both that and CueWeb parity as open follow-up work.
LLM usage disclosure
Parts of this solution's implementation were developed with assistance from Claude Opus.
Summary by CodeRabbit
New Features
Documentation