mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Tell the person Plan2Code is not running when a finished screen's press goes uncollected, instead of showing "Opening Changelog…" forever
AI Assisted
This commit is contained in:
1 parent
d4d64987fe
commit
c3ee918b62
3 files changed
+38
No files matched your search
@@ -223,6 +223,19 @@ function uncollectedLimit() {
|
||||
// them up -- but "Sent. Waiting for Plan2Code." forever does not say that.
|
||||
export const stranded = () => page.pendingResult && agentAdrift();
|
||||
|
||||
// A press on a finished screen (Commit it now, Update CHANGELOG first, the way
|
||||
// back to the dashboard, Continue here, a review) that nothing has collected.
|
||||
// agentAdrift() stays quiet after a finish, where no agent is the normal end,
|
||||
// but a press sent to one means somebody is waiting on it: an agent still in
|
||||
// `wait` pings every five seconds, so a minute of silence says it is gone (its
|
||||
// turn ended while the person was away) and the press sits saved until it
|
||||
// is woken.
|
||||
export function pressStranded() {
|
||||
if (!finish() || page.gone || !page.pendingResult || !page.agentLastSeen) return false;
|
||||
if (!page.local.afterBuild || page.local.afterBuild === "done") return false;
|
||||
return Date.now() - Date.parse(page.agentLastSeen) > UNCOLLECTED_MS;
|
||||
}
|
||||
|
||||
// The spec whose overview.md the Overview tab shows: the dashboard picker's
|
||||
// selection on the dashboard, the session's own spec everywhere else.
|
||||
export const overviewSpec = () => (isDashboard() ? selSpec()?.dir || "" : (page.S && page.S.specDir) || "");
|
||||
|
||||
Reference in new issue
Block a user