Repository navigation
Dashboard D2a: run rounds and previews as jobs (r, p), the Jobs view, the log, toasts - #30
Conversation
…sts, the inline launcher
…the Jobs keys, toasts on their end
…s, row marks and the Overview's Job line
catalan-adobe
left a comment
There was a problem hiding this comment.
Approach
What it does: r and p run the CLI’s loop check, then launch a confirmed round or preview. The Jobs view follows its log and reports the outcome even after the dashboard restarts.
Fit with the repo: Jobs belong in dash/. Two choices need adjustment. First, the base dash/src/app.rs sends I/O through worker effects; jobs_app.rs now starts processes, saves records, and reads logs on the UI thread’s 200 ms tick. Slow storage can stall input and drawing. Second, the PR says a reused PID “still shows as running.” That is more than a display issue: K can then signal an unrelated process group using the saved PGID.
Strongest case for the approach as built: docs/superpowers/specs/2026-11-26-review-dashboard-design.md calls for this inline launcher and its three files (.json, .log, .exit). They let a round outlive the terminal without a daemon. All 40 changed files are under dash/; the CLI still decides whether to run and what to post.
Alternatives: Keep the launcher and file format. (1) Give a jobs worker ownership of Store and the child handles, reporting changes through the existing event channel. That adds messages but keeps disk latency off the UI thread. (2) Let restored jobs show logs and completion, but enable K only for a child the dashboard still owns. That costs stop-after-restart; a way to verify the original wrapper’s identity would justify restoring it.
Questions for the author: Is r an explicit exception to the design’s “confirm dialog that shows the exact text”? The same design says r runs and posts after confirmation. This PR implements the latter: the user sees the command, not the review it will post.
Missing context: No PR discussion resolves that confirmation rule.
Approach: Questionable
Strengths
dash/src/jobs_app.rs:372builds the command shown in the dialog from the same argv used to launch the job.dash/src/launcher.rs:219passes those arguments separately rather than interpolating them into shell code.dash/src/jobs_app.rs:263accounts for a status refresh that was already running when a round ended. The test atdash/tests/jobs.rs:162verifies that the toast uses the new blocker count, not the one visible before the round.dash/tests/contract.rs:331compares state-directory resolution with the actual Bash implementation. I ran the full Rust suite with the contract required and the build directory outside the checkout: 127 tests passed.
Issues
🚨 Critical (Must Fix Before Merge)
-
dash/src/jobs_app.rs:593—Kcan terminate an unrelated process group. Restored records have no owned child handle, but line 216 treats an existing numeric PID as a running job. If a wrapper died without writing.exitand its PID was reused as another process-group leader, confirming Stop sends TERM and then KILL to that unrelated group. Keep restored jobs observable, but refuse to signal them without verified process identity. For owned jobs, retain that ownership through signal delivery. -
dash/src/cli.rs:125— The account shown for an Enterprise round can differ from the account that posts it.CheckAnswerrecords the requested-ulogin as the effective account. Unlikeshow(lib/show.sh:102), the real review command callsuse_gh_user "$GH_USER"without the PR host (gh-pr-review:226), which looks up the login ongithub.com. If the login exists there but a different account is active on the Enterprise host, the check can succeed, the dialog can say “As alice,” and the review can post as the other account. Make the review/check path select and preflight credentials for the target host, asshowdoes, or refuse launches where identity cannot be established. Cover a non-active Enterprise login with the real CLI and stubgh.
⚠️ Important (Should Fix)
-
dash/src/cli.rs:341— Quitting can abandon a confirmed stop before SIGKILL. The five-second escalation runs in a detached Rust thread. If the user confirmsK, then quits during the grace period, the thread ends with the dashboard while a TERM-resistant job or descendant survives.stop_requesteddoes not resume escalation on restart. Track pending stops and finish them before normal shutdown, without waiting for jobs the user chose to leave running. -
dash/src/jobs_app.rs:238— Two open dashboards can bypass both job limits. Each loads records once at startup and then admits jobs from its own in-memory list. Withmax_jobs: 1, two dashboards opened before either launch can run two different PRs simultaneously; on the same PR, both can accept the job rather than refusing the second. Serialize admission against the shared store, or allow only one dashboard per state directory to manage jobs. The CLI’s per-PR lock does not enforce the overall limit. -
dash/src/launcher.rs:228— A round can outlive the dashboard without a discoverable job record. The detached wrapper starts before the JSON is saved. If the dashboard exits between spawn and rename, the round can continue and post, but the next dashboard scans only.jsonfiles and cannot follow it or report its result. Gate execution on successful record publication; if the parent disappears before releasing the gate, the wrapper should exit without running the command. Reap the child on the save-error path as well. -
dash/src/jobs_app.rs:525—Kremoves a queued job without confirmation. This immediately drops the only copy of the queued request. The log-view path at line 576 does the same and leaves the user viewing a job that no longer exists. Use one ID-bound confirmation path for unqueueing; if the job starts while the dialog is open, do not reinterpret confirmation to unqueue as permission to kill it. -
dash/src/ui/jobs.rs:253— A round can be confirmed while its command and buttons are off-screen. The popup clamps its height, but the paragraph does not scroll, and the command and buttons come last. In a short terminal, or with a long diagnosis and CLI path, Enter still starts a normal round even though the user cannot inspect the command. Keep the buttons visible and make the entire confirmation text accessible before accepting Start. -
dash/src/jobs_app.rs:331— Restored completions can be marked notified without ever showing their toast. For example, if four previews finish while the dashboard is closed, startup pushes all four toasts before the first draw. The fourth evicts the first, but all four records havenotified: true. Queue excess notifications rather than dropping them, and acknowledge them when presented. -
dash/src/jobs.rs:231— A completion toast can attribute somebody else’s round to the job. If the detached job posts round 3 and someone posts round 4 before the dashboard restarts,rounds.last()makes the toast say that this job posted round 4, with round 4’s blocker counts. Match the job to its posted round before reporting numbers; use the existing generic “Round posted” message when the match cannot be established.
💡 Minor (Nice to Have)
-
dash/src/ui/jobs.rs:176— Long preview lines are unreadable beyond the right edge. The log renders without wrapping or horizontal scrolling, so an ordinary Markdown paragraph can be cut off with no key to reveal the rest. Add wrapping with visual-row scrolling, horizontal navigation, or a way to open the complete log in a pager. -
dash/src/launcher.rs:146— Clearing jobs reports success even when deletion fails. On a read-only filesystem,cforgets every finished job and says it cleared them, but they reappear on restart. A partial deletion can instead leave a log with no JSON record through which to retry cleanup. Return per-job deletion results, remove the record last, and report which jobs could not be cleared.
Recommendations
Add a lifecycle test with an actual dashboard process boundary. The current restart test drops an App inside the test process; it cannot detect a stop worker disappearing when the executable exits. Keep storage waits off the input loop when implementing the launch and cleanup fixes, particularly the synchronous sync_all in dash/src/launcher.rs:111.
Assessment
Ready to merge? No.
Reasoning: The normal single-dashboard path is well tested, but posting under the wrong account and signaling an unrelated process group are merge blockers. The shutdown and persistence gaps also undermine the promise that confirmed jobs remain trackable and controllable across sessions.
Review generated by gh pr-review · model: azure-openai-direct/gpt-6.2-astra
…while it ran, else no numbers rounds.last() could be another reviewer's round, posted after the job's and before the status was read: the toast then gave that round's number and blocking counts as the job's. The round whose posting time falls in the job's run (start to end, a minute of clock skew) is the job's; none or several: "Round posted · #N". The CLI's "Posted →" line names the PR, not the review, so the time is what tells.
…; r says it posts what it writes The loop check's answer took the -u login asked for as the account, though a login gh does not store makes the check (and the job) run without -u, as whatever account gh uses on the PR's host. The answer now names who the job runs as and where: the -u login (which the CLI looks up on the PR's host, issue #29), or the account gh uses there without one, asked of gh (gh api user --hostname <host>, in the job's environment; the gh that runs the extension). When gh can't say, the check fails and nothing starts. The record keeps that login. The r dialog says the round posts the review it writes, and that p previews it without posting: the review does not exist before the round runs.
… UI thread does no I/O for jobs Starting a job, saving its record, reaping it, reading its exit file and its log, signalling it: all of it ran on the UI thread's 200 ms tick, so a slow or stalled jobs folder stalled the keys and the drawing. A worker thread (jobs_worker.rs) now owns the Store and the child handles, as D1's workers own the CLI calls: the app sends it commands (enqueue, unqueue, stop, notified, clear, watch a log, shutdown) and keeps what it reports on the event channel (the jobs after each change, their ends, the open log, admissions, warnings). The stop's SIGTERM-then-SIGKILL runs in the worker without blocking it. Job IDs number the jobs of the process, so that two dashboards in one process don't collide. The behaviour is the same otherwise; the review's other findings follow.
… wrapper
A restored record whose wrapper died without an exit file, and whose PID another process-group leader took since, showed as running, and K sent SIGTERM then SIGKILL to that unrelated group. The record now keeps the wrapper's process identity, read at launch: its PID, its group (the same number: it leads its session) and its start time (ps -o pgid= -o lstart=, in UTC and the C locale; macOS and Linux). Before any signal (TERM or KILL, a job started here or found at start) the leader is verified to be that process; else K refuses ("can't verify this job's process; not stopping it"), and a job whose PID is gone or taken is lost. A job's liveness is the same check (a found job's, at most once a second). A job started here keeps its child unreaped while its stop is under way, so that its PID can't be reused before SIGKILL; SIGKILL follows once the wrapper has recorded the end, or after 5 s.
… waits at a gate The wrapper started the command at once, and the record was saved after: a dashboard that exited in between left a round running (and posting) that no later dashboard could find. The wrapper's stdin is now a pipe from the dashboard, and the wrapper reads "go" from it before it runs anything (the command's stdin is /dev/null). The dashboard reads the wrapper's identity, saves the record, then writes "go". A dashboard that dies before that, or can't save the record, closes the pipe unopened: the wrapper exits (125, no exit file) without running the command, and removes its log when no record names it. On the save-error path the wrapper is reaped.
The SIGTERM-to-SIGKILL escalation of K ran in a detached thread: quitting during the grace period ended it with the dashboard, and a job (or a child) that ignores SIGTERM kept running; a record with stop_requested was not acted on later. The jobs worker now tracks the stops under way. A quit (and an app dropped without one) finishes them, SIGKILL included, in at most 5 s in all, before the process exits; jobs the user leaves running are not waited for. The quit dialog says so, and the terminal says it is stopping them. At start, a record that asks for a stop, whose process is verified to be its wrapper still and has no exit file, gets SIGTERM again and SIGKILL after the grace.
… one-job-per-PR rule Each dashboard admitted jobs from its own list, read once at start: two dashboards could run more than max_jobs jobs, and both could run a job on the same PR. Admission now takes the jobs folder's lock (flock(2) on <state>/jobs/.lock, declared in sys.rs like kill and setsid; released if the process dies), reads the records under it, counts the running jobs (this dashboard's as it knows them, the others' verified by their process identity), refuses a queued job whose PR has a job running from another dashboard, and starts queued jobs while fewer than the limit run. Queued jobs try again at most once a second.
… that started meanwhile
K on a queued job dropped it at once, the only copy of the request, and the log view of it stayed open on a job that no longer existed. Stop and unqueue now share one dialog, bound to the job's ID and to what it was when asked (Remove for a queued job, Stop for a running one). Confirming the removal of a job that started while the dialog was open does not stop it: the dialog asks again, to stop it, Cancel selected. The worker checks again when it takes the command: a job that is no longer queued is not removed. A log whose job goes from the list closes, with a message ("Took the job of #2 off the queue: its log closed").
…s toast is on screen At most three toasts show; a fourth evicted the first, though every one's record was marked notified: four jobs that ended while no dashboard ran showed three toasts, and the next start showed none of the fourth. Toasts now queue: one shows when there is room (a toast on screen goes after 8 s), with its bell or desktop notification then, and its job's record is marked notified at that moment, not before.
A preview's Markdown paragraph ran past the right edge with no way to read the rest. The log view now wraps each line to the screen's width (by display width, characters whole) and scrolls by those rows: j/k, ctrl+d/u, gg, G and F work on rows, and follow mode keeps the last row in view.
…t has been on screen The popup was clamped to the screen, the text did not scroll, and the command and the buttons came last: in a short terminal, or with a long diagnosis, Enter started a round whose command the user could not see. The buttons now take the dialog's last row and a line above them says when there is more; the text above scrolls (j/k, the arrows, space, page keys, G). Start and Run anyway are taken only once every row of the text has been on screen (drawn: an answer and a key in one batch of events is not seen); else the dialog stays and says to scroll.
… last
Clearing ignored every deletion error: on a read-only folder it forgot the finished jobs and said it cleared them, and they came back on the next start; a partial deletion could leave a log with no record to clear it from. Store::remove now deletes the exit and log files first and the record last, stopping at the first error (a file already gone is none), and says how it went. The worker keeps the jobs it could not clear listed, and the message names them with the error ("Cleared 0 finished jobs; could not clear the preview of #2 (Permission denied …)").
…er, the gate, process identity, the folder's lock, stops on quit, toasts in turn
|
Thanks for round 1. Both critical findings, the approach points and all the other findings are fixed in 13 commits ( Approach
Critical
Important
Minor
Checks: on |
catalan-adobe
left a comment
There was a problem hiding this comment.
Round 2 · since round 1
5 fixed · 6 still open · 9 new (9 in the new commits) · open blocking: 13 (was 9) · loop: early
Approach
Unchanged since round 1: dash/src/jobs_worker.rs takes job I/O off the UI thread, but for restored jobs dash/src/launcher.rs checks the wrapper with ps and then signals a numeric process group that can be reassigned between those calls.
Approach: Questionable
Strengths
- The launch gate at
dash/src/launcher.rs:331fixes the untracked-posting window: the wrapper cannot run the CLI until its JSON record has been published. The process-boundary test atdash/src/launcher.rs:654verifies that losing the dashboard before that point runs nothing. - Queue removal is now bound to both the job ID and the action the user confirmed.
dash/tests/jobs.rs:744verifies that confirming “Remove” does not kill a job that started while the dialog was open. - I ran the Rust suite in a temporary copy with the CLI contract required: 149 tests passed. I also exercised the event-ordering and two-dashboard cases called out below. The review checkout remained unchanged.
Issues
🚨 Critical (Must Fix Before Merge)
-
F1 ·
dash/src/launcher.rs:407— A restored job can still signal an unrelated process group. The new start-time check rejects a PID that was already reused whenpsran. It does not hold the process identity across the subsequentkill(-pgid, …). If the original group exits and its number is reassigned between those calls, TERM or KILL goes to the replacement. Keep restored jobs observable, but refuseKunless the signal can be delivered through an identity held across delivery; an owned, unreaped child provides that guarantee for locally launched jobs. -
dash/src/cli.rs:139— The fallback login shown at confirmation is not bound to the job. This is separate from F2’s stored-login host lookup, which is fixed. After a successful check without-u, the dashboard reads the active login, butdash/src/jobs_app.rs:492still builds a command without-u. I confirmed with the fake CLI that a dialog naming Alice produced a job that posted as Bob after the active login changed. A queued round makes that interval potentially minutes long. Bind the verified identity to the actual invocation, or have the CLI refuse to post if its effective login differs from the confirmed one. Do not persist a token in the job record.
⚠️ Important (Should Fix)
-
F3 ·
dash/src/jobs_worker.rs:450— A contended admission lock can still interrupt a confirmed stop on quit. The worker now owns escalation, but that same worker blocks inflockwhile retrying a queued job. With a TERM-resistant job, a queued job, and the folder lock held by another manager, I observedshutdown_jobs()time out with the stopped job still alive.dash/src/main.rs:131warns and proceeds to exit. Make admission retry without blocking stop deadlines or shutdown processing. -
F4 ·
dash/src/jobs_worker.rs:466— Two dashboards can still accept queued jobs for the same PR. The lock protects the count of running records, but the clash check cannot see another dashboard’s in-memory queue. Withmax_jobs = 1and PR #1 running, I confirmed that both dashboards accepted a preview of PR #2. If the first preview finishes between the second dashboard’s polls, both run. Reserve the PR across managers for the entire queued-or-running interval, or give one manager exclusive admission authority per state folder. -
F7 ·
dash/src/jobs_app.rs:537— Scrolling can authorize Start before the command is drawn. The buttons are now visible, but the key handler setsseen_allwhen the requested offset reaches the bottom. I confirmed thatGfollowed by Enter in one event batch launched a round while the last rendered frame still showed only the diagnosis. Update visibility from completed frames, not key events; track the rendered rows if the guarantee is that all text has appeared. -
F8 ·
dash/src/jobs_app.rs:432— A completion is still acknowledged before its toast is displayed. The FIFO fixes eviction of the fourth toast. However, moving a toast into the visible list immediately sendsNotified. I confirmed that handling a restored completion and thenqbefore the next draw persistednotified: truewithout drawing the toast once. Acknowledge after a successful frame that actually contains the notification; until then it must remain eligible on restart. -
F9 ·
dash/src/jobs.rs:252— A timestamp match can still attribute another reviewer’s round to the job. The window is better thanrounds.last(), but it extends a minute beyond job exit and supplies no identity. For example, if the job’s review loses its generated marker before restart, a colleague’s round posted 30 seconds after exit is now the sole match. Even when the right round is matched, line 283 appends the current PR label, which can belong to a later round. Match against evidence from the CLI’s posted result, use the matched round’s label, and keep the generic toast when there is no reliable match. -
dash/src/jobs_worker.rs:341— A restored stop can leave a TERM-resistant descendant running. If the foreground command dies on TERM, the wrapper writes.exitand exits. Once the wrapper is reaped, this branch drops the pending stop without sending KILL, even if a background member of the group ignored TERM. The job is reported as stopped. Have a supervisor that retains ownership finish the group stop, or refuse a restored stop that cannot be completed safely; do not fix this by signaling an unverified PGID. -
dash/src/jobs_worker.rs:296— A normally completed wrapper can remain a zombie for the dashboard’s lifetime. Iftry_wait()sees a live child and the wrapper publishes.exitbefore the file read, the worker marks the job finished. Subsequent polls visit onlyRunningjobs, so nobody waits on that child again, even afterc. Sweep owned children independently of display state, retaining only the intentional pending-stop exception. -
dash/src/jobs_worker.rs:383— A stale notification can recreate a job another dashboard cleared.Notifiedrewrites the entire cached record without checking that it still exists. I confirmed that dashboard A could clear all three files and dashboard B’s delayed acknowledgement would then recreate just the JSON. The next restart sees a lost job instead of a cleared one. Serialize clear and record updates, reread under the lock, and update only the intended field of an existing record. -
dash/src/jobs_app.rs:609— Quitting during admission skips the running-jobs confirmation.quit()counts published running and queued jobs, but notadmitting. I confirmed that Enter followed byqwhile admission waited on the folder lock exited without a dialog; the worker then launched the job before processing shutdown. Include pending admissions in the quit decision and tell the user whether they will start or be cancelled. -
dash/src/jobs_worker.rs:193— Failure to open the jobs folder leaves confirmed requests permanently “starting.” On this path the worker warns once, then discards every command exceptShutdown. The UI still enablesrandp. With an unusable state path, I confirmed that a launch produced no job and a retry reported that the PR already had a round starting. Send an explicit unavailable state that disables launch, or answer everyEnqueuewith a refusal that clearsadmitting. -
dash/src/jobs_app.rs:354— A restored round can wait for a status reply that already arrived. Asynchronous restoration can finish after the initial fresh status.refresh_after()then returnsrefresh_done, but the job is appended toawaiting, which only drains on a subsequent status reply. I confirmed that the finished round remained silent until a manual refresh. If a successful completed epoch already covers the round, use its status immediately; otherwise wait for an outstanding or newly requested refresh.
💡 Minor (Nice to Have)
dash/src/launcher.rs:171— Partial cleanup can erase a finished job’s outcome. The deletion error is now reported correctly, but.exitis deleted before.log. If log deletion fails, the retained JSON restores as “lost” rather than “done.” Preserve the outcome until the other fallible cleanup has succeeded, or record that cleanup is pending.dash/src/ui/jobs.rs:167— Every redraw rewraps and allocates the entire log tail. An unchanged log can be up to 512 KiB, yet a tick or keypress rebuilds every visual row to display a few of them. Cache wrapping by log revision and viewport width.
Fixed since the last round (4)
- F2 — The real CLI now selects stored
-ucredentials on the PR URL’s host atgh-pr-review:229;tests/flow.sh:532covers posting with the non-active Enterprise login. - F5 —
dash/src/launcher.rs:331saves the record before opening the execution gate and aborts the wrapper on save failure. - F6 —
dash/src/jobs_app.rs:595treats unqueue and stop as separate confirmations, including when the job starts while the dialog is open. - F10 —
dash/src/ui/jobs.rs:167wraps long preview lines, and scrolling now uses visual rows.
Fixed finding with a distinct follow-up (1)
- F11 —
dash/src/jobs_worker.rs:556retains jobs whose deletion failed and reports the per-job error; the JSON is removed last. Loss of the exit status during partial cleanup is the separate Minor item above.
Recommendations
Keep the new process-boundary tests. Add deterministic cases for three boundaries the current suite mostly exercises separately: input before the next draw, two managers mutating one job record, and stop escalation while admission is blocked. These expose failures that passing single-dashboard lifecycle tests do not.
Assessment
Ready to merge? No.
Reasoning: The launch gate and queued-job confirmation are solid fixes, but the dashboard can still signal the wrong process group or post under a different login than the user confirmed. The reproduced admission, shutdown, and notification races also break the promised behavior across sessions.
Review generated by gh pr-review · model: azure-openai-direct/gpt-6.2-astra
A job found at start (another dashboard session started it) is followed, never signalled: a ps check can't hold the process across the kill that follows it, so its group's number could name another group by then. K refuses it and names its process group, to stop it by hand. Signals go through the wrapper's child, kept unreaped (launcher::Owned): while it is, the PID and so the group's number can't be reused. A stop a restored record asks for is no longer resumed.
When gh stores no login for the PR's account on its host, the check no longer falls back to running without -u and naming the active account (gh api user): the job would post as whichever account gh uses when it runs, possibly another one by then. The dialog says why, with only Close, and nothing starts. Every job carries -u <login>, the login the dialog names.
|
Thanks for round 2. Under this PR's rule, only critical findings get fixed after round 2, and then it merges. Both are fixed by removing code rather than adding it. The 11 important and 2 minor findings are in #35, for D2b or a follow-up. Critical
Checks on
|
Dashboard phase D2a: the dashboard runs review rounds as jobs.
rruns a round andpa preview, through the inline launcher. This PR also adds the Jobs view, the log view and toasts. D2b adds the other actions (a,w,d,e,o,y,x); the design is indocs/superpowers/specs/2026-11-26-review-dashboard-design.md("Jobs", "Screens › Jobs").randpgh pr-review <URL> --check --json -u <login>for the account that listed the PR, and shows the loop check in a dialog. The dialog says "As on ". If gh has no stored login for that account, nothing starts; the dialog says why. The round runs with that same-u. Since -u is a login of the PR URL's host for the review run, --check and gc (fixes #29) #32, the CLI looks-uup on the PR URL's host.[Start].[Run anyway](--force-round). Cancel is selected first.[Run anyway].gh pr-review <URL> -y -u <login> [--model <dash.model>] [--no-post] [--force-round]. The dialog shows it, with the buttons always on screen, and accepts Start only once the whole text has been seen. It also says thatrposts what it writes andppreviews without posting.pruns the loop check too: it's how the dashboard knows which account works, and a-ypreview would stop at exit 3 or 5 anyway.Jobs
Files: each job has
<state>/jobs/<id>.json(kind, PR, URL, account, argv, start time, PID, process group),.log(stdout and stderr) and.exit. The folder is 0700, the files 0600, and the JSON is written to a temporary file and renamed.State folder: found with the CLI's own rule; a contract test runs
lib/state.sh's functions under seven environment cases and compares the paths.Launcher:
/bin/sh -c WRAPPER <exit-file> <argv…>runs in a new session (setsid), with stdin/dev/null. The wrapper runs the command only once the job's record is saved, writes the exit code atomically, and survives a SIGTERM, so a stopped job still gets its code.A worker owns the jobs: it handles the jobs folder, the processes, the exit files, launching, saving, logs and stopping, and reports through the event channel, so the UI thread does no I/O for jobs. Admission runs under a lock in the jobs folder, so dashboards that share the folder share
dash.max_jobsand the one-job-per-PR rule.Lost: a job without an
.exitfile whose PID is gone is marked lost.Limits: at most
dash.max_jobs(default 3) run at once; more wait in a FIFO queue. One job per PR:randprefuse when that PR already has one.Progress: the header counts running and queued jobs, the PR row shows a mark, and the detail's Overview shows the job's last log line.
The end: the
.exitfile is checked on each tick. When a job ends, the PR's status and detail are refreshed and a toast is shown:dash.notify:toast(the default),bell, ordesktop(OSC 9).Quitting with jobs running: the dashboard asks, then leaves them running. On the next start, it reads their files: finished jobs get their toast once, running ones are followed, and dead ones are marked lost. Queued jobs live in memory only, and the quit dialog says so.
Jobs view (
J)enter: opens the log full screen, following while the job runs (Ftoggles following,Gjumps to the end).K: stops a running job that this dashboard started (SIGTERM to its process group, SIGKILL after 5 s), after you confirm. The signal goes through the dashboard's unreaped child, so it can't reach a reused process group. A job restored from an earlier session is shown but not stopped;Knames its process group so you can stop it yourself. On a queued job,Kasks before removing it. A quit finishes the stops under way.c: clears finished jobs and deletes their files.Config
dash.max_jobs,dash.notify, anddash.model. With nodash.model, jobs use the CLI's default model.Notes
killandsetsidare declared in a newsys.rs, as D1 already did forkill.Tests
.exitfiles, including lost; the queue and the one-job-per-PR limit; the keymap; the toast texts.gh-pr-review: a job's end gives a toast and a refresh; a job outlives the dashboard and its toast shows once on the next start;Kstops the whole process group; a lost job.