Commit Graph
9 Commits
Author SHA1 Message Date
Brennan BensonandMerge Sim 556a7772ed fix(e2e): remove four real flake sources and one caret race (#20169)
Four E2E specs failed once each across six main runs. Each traces to a
timing boundary the test could not control, not to product instability:

- linear-url-workspace-entry: pasted before X selection ownership landed,
  delivering stale text. Gate on a clipboard read-back.
- native-chat-first-flush-race: a bare 1_500ms sleep is exactly
  UNFLUSHED_SETTLE_MS, so it straddled the boundary deciding which of two
  hydration paths carried the test. Observe the not-yet-flushed read
  instead; a notFound is never cached, so this cannot perturb hydration.
- orchestration-idle-mail-delivery: asserted that a PTY -> daemon -> main
  round trip beats a 500ms production heuristic. Use the existing
  ORCA_E2E_ORCHESTRATION_POINTER_ENTER_DELAY_MS knob.
- tasks-page: the probe timeout was the one figure in the file not derived
  from GITHUB_TASK_SEARCH_IDLE_MS.

worktree.spec.ts exposed a real product race rather than a test bug: the
emoji caret-restore frame stayed armed through ordinary typing, so a
late frame could yank the caret back mid-input. Cancel it on the
non-emoji onChange path.

Also repairs a stale assertion: #20025 changed
remountTerminalTabForRecovery to return a result object and updated the
sibling call site but missed this one, so the comparison to `true` could
never pass. It is a deterministic break, not a flake.

Co-authored-by: Merge Sim <sim@local>
2026-09-11 18:37:16 -07:00
Jinjing 0d8785b916 Prevent stale search commits from timer race conditions (#17495)
Validate scheduled values match current state before executing idle
timeout callbacks. Use useLayoutEffect to synchronously update refs,
preventing outdated searches when rapid keystrokes overwrite timers.
2026-08-30 19:07:01 -07:00
Neil fd52e942bd fix(tasks): keep the remembered GitHub scroll offset instead of clobbering it (STA-5949) (#17433) 2026-08-30 11:49:12 -07:00
Jinwoo Hong bd9addb449 fix(tasks): restore GitHub page and scroll position on reopen (#13096) 2026-08-09 11:08:04 -07:00
Jinjing 4c26ef626c Extract GitHub task search commit debouncing into a hook (#13112)
* Extract GitHub task search commit debouncing into a hook

Move debounce logic from TaskPage into useGitHubTaskSearchCommit to
prevent excessive GitHub API calls on every keystroke. Uses a 750ms
idle window before committing search values. Add tests for the new hook.

* Keep task rows visible while typing search query

Removed premature row-hiding logic from the search input handler that was
triggering before debounced queries fire. The handler now only updates the
input state; debouncing and query timing are handled by a dedicated hook.
Added e2e test verifying search idles before fetching and Enter doesn't
double-fetch.

* Test that GitHub task search commits cancel on disable and unmount

Verify the useGitHubTaskSearchCommit hook properly cleans up pending
commits when disabled or when the component unmounts. This prevents
unnecessary GitHub API calls during normal user interaction.

Also fix e2e test instrumentation to find the active repo through the
worktree relationship rather than assuming the first repo with a path.
2026-08-07 19:18:29 -07:00
Brennan Benson e7ef7681ae Fix flaky e2e tests (#5680) 2026-06-18 00:11:32 -07:00
Neil 82372fbbdb fix: stabilize e2e assertions (#2217) 2026-05-17 21:51:50 -07:00
Brennan BensonandOrca 76a1c691e9 test(e2e): assert on rendered DOM in 5 specs previously store-tautologies (#1194)
Co-authored-by: Orca <help@stably.ai>
2026-04-27 20:55:47 -07:00
Jinjing 0bbf2d7a8f feat: cross-repo issues view in new workspace page (#942)
* feat: cross-repo issues view with multi-repo selection

- Add multi-repo selection via RepoMultiCombobox with persisted defaultRepoSelection setting (null = sticky-all)
- Stamp repoId on GitHubWorkItem at the renderer fetch boundary; merge items from all selected repos with per-repo failure tracking
- Extract task-query helpers (tokenize/strip/parseTaskQuery) to src/shared and add unit tests
- Refactor NewWorkspacePage row to <div role=button> to allow nested interactive elements without invalid-HTML hydration errors
- fix(repo-combobox): toggle all-repos selection on repeat click

* fix(tasks): route Use CTA to item's own repo in cross-repo view

handleUseWorkItem previously referenced a removed 'repoId' state; use item.repoId so launching from a merged cross-repo list targets the correct repo.

* test(e2e): add tasks page smoke test
2026-04-22 10:58:18 -07:00