Skip to content

Driver tab follow-ups: an open PR's label reads as landed, the panel re-triggers its own observer, and unread sessions are revisited every five minutes (#1332, #1703) #1707

Description

@suleimansh

🤖 automated · Fable 5, effort high

Three things the #1703 review left open on purpose — none blocked the merge, each is a decision or a small change.

1. #N · Open reads as landed

content.js:754LANDED_LABEL = /^#\d+ · / — treats any pull-request label as "landed", open PRs included. A status word on the row wins since d3c87fac, so a session showing both "Awaiting input" and #1704 · Open is visited. But a session whose row shows only #1704 · Open (no status word) is never visited: its question, if it asks one later, is invisible until claude.ai puts a status word back.

Question: is "open PR, no status word" a terminal state for the Driver, or should only Merged / Closed count as landed, with Open treated as idle? The second reading costs a visit per open-PR session when it changes; the first risks missing a late question.

2. The panel/overlay rewrite re-triggers its own observer

content.js:1308-1316 — the MutationObserver watches document.documentElement (childList, subtree, characterData) and every survey redraws the panel or the overlay, which mutates the DOM, which schedules the next survey 250 ms later. A full survey (deep query of every code element, transcript diff, self-report) runs about four times a second for as long as the tab lives — and the Driver tab lives forever. Pre-existing, not introduced by #1703, but #1703 made the tab permanent.

Fix shape: observe the transcript region rather than the root, or have the redraw disconnect/reconnect the observer around its own writes. Either is a few lines; the second keeps the "any change triggers a re-read" guarantee intact.

3. Age-revisiting unread sessions

driver-plan.js:11-14PARKED = {awaiting, unread} and REVISIT_MS = 5 min: an unread session is revisited every five minutes for the whole 12-hour window even when nothing changed, because claude.ai's list does not clear "Unread response" on a visit. At fan-out (N finished sessions all unread) that is N visits per five minutes, each mirroring nothing new. Only awaiting needs that insurance — a question asked in prose carries no block, so the list status is the only signal, and a re-read is what catches it.

Design question for Rom: visit unread once on change only, and revisit only awaiting on age?

Context

Found in the #1703 review (comment 5414897797) and confirmed on the merged code (5091d8bc). The dogfood that preceded the merge (#1703, comment 5416375723) exercised the answer and create paths and found + fixed a fourth item (an answered question resurfacing after a daemon restart, 613a4949); these three are what remains.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions