Repository navigation
fix: bring a new worktree forward once listed, and end three desktop and journey flakes - #1869
Merged
Merged
Conversation
…a failed journey turn
A new worktree on this machine came forward twice: the core's start follow and the page's open once the pane was listed. The page's open ignored a newer visit and the 90-second bound, so a late listing could undo where the operator went. The page now only presents what the core selects, by the start's request id; a pull request's hand-off carries one too. A device's start is still opened once its device lists the pane. Refs with-hide/hide-private#311
The closing click now uses Playwright's own click, so a covered or disabled control fails as anywhere else; only the page-closed error is accepted, and only because the close is awaited next. Refs with-hide/hide-private#325
# Conflicts: # docs/UI_BEHAVIOR.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes with-hide/hide-private#340
Closes with-hide/hide-private#325
Closes with-hide/hide-private#311
Summary
Five desktop/journey flakes, each handled at its cause; one was a product defect.
docs/ARCHITECTURE.mdalready stated), and comes forward only while the operator has visited nothing else since, within 90 seconds and on the same Herdr connection.The page no longer sends its own focus for a worktree made on this machine (New worktree, the start panel, Start from an issue, a pull request's 맡기기): it only shows what the core selected, by the start's request id, so a visit made while the worktree was being created is kept. A worktree made on a device is still opened from the page once that device lists it. The spec also waits for the project's first pane before removing it.
web/e2e/closing-click.ts) keeps Playwright's real pointer click, accepts that one error only, and then waits for the page to close; the two practice.spec clicks with the same shape use it too.스크린샷 없음: nothing is drawn differently; what changes is whether a created worktree is brought forward after the operator moved elsewhere.
Review
docs/UI_BEHAVIOR.md, Start panel. Before, it came forward only when the catalog already listed it, and the page could also pull it forward late over a newer visit. Say if staying behind was wanted.herdr-core/src/runtime/session.rs,group_starts.rs- Herdr/core focus ownership:worktree_createnow holds the start focus permission, so a visit made during creation cancels the follow (90 s bound, generation check), as for agent starts.herdr-core/src/runtime/pull_requests.rs,projects.rs,events.rs-pr_delegatetakes an optionalrequest_id, carried to the agent start or the worktree start and onto its answer.web/src/actions.ts(createWorktree,delegatePullRequest),web/src/opening.ts(followStartedPane) - the page sends a start request id and begins the opening for a start on this machine; only a device's pane is still opened fromWorkspaceNotices.web/e2e/closing-click.ts- a reallocator.click(); only the page-closed error is tolerated, and only because the close is awaited next.scripts/agent_journey/journey.py- the Test the graph's dash flow by the state its stepper owns #309 trace is collected on every turn, not only failed ones: per activity change oneagent listand onepane read, at most 8 moments (16 CLI calls, each with the existing 15 s bound) per turn; it is written to the result only for a turn that did not pass.Evidence
start.focus_dispositionwithlocal_checkout_ownerset vs null).a_local_worktree_result_waits_for_its_catalog_before_it_comes_forwardfailed before the fix (front checkout stayed main) and passes after.createdWorktreeFollow.test.tsxdrives New worktree on the screen path: create, a newer visit, then the late listing; nofocus_panefor the new pane is sent. With the page's old open-when-listed restored it fails (expected 'pane-next' to be null). It also checks that a device's worktree is still opened throughremote_controlonce listed, and that 맡기기 sends a request id only on this machine.a_node_pull_request_with_no_checkout_gets_its_worktree_on_the_nodenow also checks the request id reaches the answer; it failed until the worktree start stamped it.practice.spec.tswhole file 27/27 (3 runs) and desktopfirst-run.spec.ts"practice first" 5/5 with the pointer-click helper (macOS, under load).closing-click.tsagainst a throwaway page: passes on a plain button that closes its page, fails on the same button under a transparent cover and withpointer-events: none(3 runs each). The previous synthetic-click helper passed both covered cases.outside-home-project.spec.ts10/10,herdr-coexistence.spec.tscold restoration 5/5,sleep-wake-click.spec.ts5/5 locally (macOS).herdr-coexistence.spec.ts:106(agent liststill had the sleeper after cold restore).leave()runswindow.close()(web/src/practice/PracticeApp.tsx:58).stopped->workingabout 1.1 s after the prompt and stayedworkingpast 180 s while the model had answered./forkitself worked (pane shows "Forked conversation."), so the late-terminal-response lead does not fit. The trace does not record the final screen after the row is stuck on one activity, so it is a diagnostic, not a fix.docs/ARCHITECTURE.md(about 960 KB) was read only in the start focus, sleep and worktree sections, not in full.Verification record