Skip to content

fix: bring a new worktree forward once listed, and end three desktop and journey flakes - #1869

Merged
yansfil merged 10 commits into
mainfrom
fix/flaky3-desktop
Oct 30, 2026
Merged

yansfil merged 10 commits into
mainfrom
fix/flaky3-desktop

Conversation

@yansfil

@yansfil yansfil commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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.

스크린샷 없음: nothing is drawn differently; what changes is whether a created worktree is brought forward after the operator moved elsewhere.

Review

  • 판단해 주세요: Flaky desktop e2e: area cycle native spec loses the keyboard after a blur or a second cycle start #311 now brings a new worktree on this machine forward only under the start's conditions (no newer visit, 90 s, same connection), written in 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_create now 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_delegate takes an optional request_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 from WorkspaceNotices.
    • web/e2e/closing-click.ts - a real locator.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 one agent list and one pane 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.
  • 질문: Agent 탭이 너무 일찍 아이콘으로 접히고, File View 탭에는 같은 탭 스트립이 없다 #322 and Test the graph's dash flow by the state its stepper owns #309 stay open with diagnostics only. Should their seven-day expiry move, or should they be deleted if they flake again without a cause?

Evidence

  • 확인한 것:
    • Flaky desktop e2e: area cycle native spec loses the keyboard after a blur or a second cycle start #311 reproduced locally before the fix, 1 of 5 then 1 of 10 runs; the dump showed the core's front checkout was the new worktree on the failing run and the main checkout on passing runs (start.focus_disposition with local_checkout_owner set vs null).
    • New Rust test a_local_worktree_result_waits_for_its_catalog_before_it_comes_forward failed before the fix (front checkout stayed main) and passes after.
    • New web test createdWorktreeFollow.test.tsx drives New worktree on the screen path: create, a newer visit, then the late listing; no focus_pane for 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 through remote_control once listed, and that 맡기기 sends a request id only on this machine.
    • a_node_pull_request_with_no_checkout_gets_its_worktree_on_the_node now also checks the request id reaches the answer; it failed until the worktree start stamped it.
    • herdr-core related lib tests (pull_request, node_issues, worktree, group_tabs_remote, start_focus, task_operation, group_start): 351 pass; clippy on herdr-core clean.
    • Whole web unit suite: 2286 pass; web typecheck and lint pass.
    • practice.spec.ts whole file 27/27 (3 runs) and desktop first-run.spec.ts "practice first" 5/5 with the pointer-click helper (macOS, under load).
    • closing-click.ts against a throwaway page: passes on a plain button that closes its page, fails on the same button under a transparent cover and with pointer-events: none (3 runs each). The previous synthetic-click helper passed both covered cases.
    • Earlier on this branch: outside-home-project.spec.ts 10/10, herdr-coexistence.spec.ts cold restoration 5/5, sleep-wake-click.spec.ts 5/5 locally (macOS).
    • 성능 테스트·Orca 비교와 README·소개 사이트 개선 #340 cause read from the CI failure: herdr-coexistence.spec.ts:106 (agent list still had the sleeper after cold restore).
    • OS 경계 4: 폴더 감시와 계정 위치를 hide-platform으로 옮기고 Windows에서 워크스페이스를 빌드합니다 #325 cause read from CI: the click's call log ends at "performing click action" with "Target page, context or browser has been closed"; leave() runs window.close() (web/src/practice/PracticeApp.tsx:58).
    • Test the graph's dash flow by the state its stepper owns #309: three occurrences, all macOS antigravity fork; the row went stopped -> working about 1.1 s after the prompt and stayed working past 180 s while the model had answered. /fork itself 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.
  • 확인하지 못한 것:
Verification record

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
@yansfil
yansfil merged commit 421141e into main Oct 30, 2026
33 checks passed
@yansfil
yansfil deleted the fix/flaky3-desktop branch October 30, 2026 06:29
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