Skip to content

feat(review): surface loading tasks under Ready (no ✓) and open their window on click - #576

Merged
jlong merged 1 commit into
mainfrom
jlong/review-sidebar-show-a-loading-task-under-ready-for-review-no-checkmark-until-serving-and-open-its-window-on-click-instead-of-re-prompting-to-load
Aug 17, 2026
Merged

feat(review): surface loading tasks under Ready (no ✓) and open their window on click#576
jlong merged 1 commit into
mainfrom
jlong/review-sidebar-show-a-loading-task-under-ready-for-review-no-checkmark-until-serving-and-open-its-window-on-click-instead-of-re-prompting-to-load

Conversation

@jlong

@jlong jlong commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Task

The review sidebar has two sections, "Ready for Review" and "Queued for Review" (crates/shelbi-tui/src/app.rs:500 and :519), and the Ready rows carry a (crates/shelbi-tui/src/sidebar.rs). A review-routed task moves through three sub-states: pending-load (in review, no slot yet), loading (on a slot, installing/building), serving (up, ready to inspect). Clicking a sidebar task calls open_review_load_prompt (app.rs:706:724), which shows the slot-selection dialog and starts a load.

Two problems while a task is loading: it isn't surfaced under "Ready for Review" until the load finishes, and clicking it re-opens the load prompt even though it's already loading onto a slot.

Current Behavior

  • A task that is loading onto a review slot is not shown under "Ready for Review" until loading completes; the and the Ready placement appear together only once it's serving.
  • Clicking any review task — including one that is already loading — runs open_review_load_prompt and shows the "pick a review slot / load" dialog. For a loading task this is wrong: it's already on a slot being built.

Expected Behavior

  • Move to Ready immediately on load-start. As soon as a task begins loading onto a review slot, show it under "Ready for Review" — but without the . The appears only once the slot is serving (ready to inspect). (So "Ready for Review" contains loading rows without a checkmark and serving rows with a checkmark.)
  • Click while loading → just open the review window. Clicking a task that is loading or serving opens/attaches its review window directly (the open_loaded_review_interface path, app.rs:877), with no load prompt.
  • Click while queued → still prompt. Clicking a task in "Queued for Review" (pending-load, not yet on a slot) keeps the current behavior: open the review-load slot-selection prompt. The prompt is only correct for the queued/pending-load state.

Technical Details

  • Branch the click handler (app.rs:706) on the task's review sub-state: pending-load → open_review_load_prompt; loading or serving → open the review interface directly (no dialog). Source the sub-state from the assigned review slot's workspace state / the in-flight load job (poll_review_load, WorkspaceState::Serving in activity.rs), not just section membership.
  • Sidebar section placement (app.rs:500/:519): a task that is loading belongs in "Ready for Review"; gate the on serving, not merely on being in the Ready section (sidebar.rs checkmark render).
  • Keep the "a review load is already in progress…" guard (app.rs:726) intact.

Acceptance Criteria

  • A task that begins loading onto a review slot appears under "Ready for Review" immediately, with no .
  • The on that row appears only once the slot is serving (ready to inspect).
  • Clicking a loading task opens/attaches its review window and does NOT show the review-load slot-selection prompt.
  • Clicking a serving task opens its review window (unchanged).
  • Clicking a task in "Queued for Review" (pending-load) still opens the review-load prompt (unchanged).
  • cargo build/test/clippy green; sidebar/app tests cover the loading-row-without-checkmark placement and the loading-click-opens-window (no-prompt) branch.

Auto-opened by Shelbi — review at: /Users/jlong/.shelbi/projects/shelbi/tasks/review-sidebar-show-a-loading-task-under-ready-for-review-no-checkmark-until-serving-and-open-its-window-on-click-instead-of-re-prompting-to-load.md

… window on click

A review-routed task that begins loading onto a review slot now appears under
"Ready for Review" immediately, rendered with a ▶ (not the ✓, which stays gated
on the serving marker) and no location. Previously a loading task lived under
"Queued for Review" until the load finished, so the row vanished from Ready
during the whole checkout/install/build and its ✓ + placement only appeared once
serving.

Clicking a review task now branches on its lifecycle sub-state instead of raw
section membership:
- pending-load (not on a slot) → open the slot-selection load prompt (unchanged)
- loading or serving (already on a slot) → open/attach its review interface
  directly, no dialog

Key decisions (not asked about):
- Moved the Loading arm of `split_review_sections` from `queued` to `ready`;
  the ✓ was already gated on `ReviewState::Serving` in `Row::decoration`, so a
  Loading row in the Ready section paints ▶ with no ✓ for free — no renderer
  change to the checkmark itself.
- Added `App::review_substate`, which sources the sub-state from the in-flight
  `review_job` first (authoritative Loading before the next 750ms refresh
  records the slot assignment, so a double-click mid-load opens the booting
  window rather than re-prompting) then the section entries' own `state`.
  Unknown ids fall back to Pending so a stale click re-prompts rather than
  opening a nonexistent window. Kept the existing "a review load is already in
  progress…" guard in `open_review_load_prompt` intact as the belt-and-braces
  backstop.
- Reused `open_ready_review` (not the private `open_loaded_review_interface`)
  for the loading/serving click branch: it was already the Ready-click entry
  point and handles the NeedsLaunch/Loading/RemoteFallback outcomes.

Tests: reworked `review_tasks_split_by_serving_state` and the stale-marker test
for the new placement; added `review_substate_drives_the_click_branch` (covers
the loading-click-opens-window no-prompt branch, incl. the in-flight-job
override); extended the sidebar render test with a loading row asserting ▶ under
Ready with no ✓ and no location.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
shelbi Ready Ready Preview Aug 17, 2026 12:59pm

Request Review

@jlong
jlong merged commit 2f2e87d into main Aug 17, 2026
3 checks passed
@jlong
jlong deleted the jlong/review-sidebar-show-a-loading-task-under-ready-for-review-no-checkmark-until-serving-and-open-its-window-on-click-instead-of-re-prompting-to-load branch August 17, 2026 13:03
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