Commit Graph

8 Commits

Author SHA1 Message Date
Neil 46646d7ff1
chore(lint): upgrade oxlint to 1.71 + enable 7 new rules (autofixed backlog) (#6841)
* chore(lint): upgrade oxlint to 1.71 and enable 7 new rules

Upgrade oxlint 1.67.0 -> 1.71.0 (1.72 was blocked by the repo's 3-day
minimum-release-age supply-chain guard; nothing here needs it). The
bump is a no-op on the existing config.

Enable 3 error rules (backlog autofixed to zero in this commit) and
4 warn rules (surface signal without gating CI):

error (autofixed, behavior-preserving):
- unicorn/prefer-node-protocol        (~1531 sites: bare builtin -> node:)
- typescript/no-import-type-side-effects (~36: all-inline-type -> import type)
- unicorn/no-array-reverse            (19: copy-then-reverse -> toReversed)

warn (real signal, current fires are test-only/correct):
- unicorn/no-array-fill-with-reference-type  (aliasing footgun guard)
- typescript/no-unsafe-function-type         (bans bare Function type)
- unicorn/prefer-array-flat-map              (map().flat() -> flatMap())
- unicorn/prefer-regexp-test                 (.match() in bool ctx -> .test())

mobile/.oxlintrc.json extends root, so it inherits all 7; the autofix
ran from root and covered mobile/ too.

Verification (all green): oxlint 0 errors (root+mobile+aux configs),
oxfmt clean, typecheck (node+cli+web), vitest 22795 passed / 0 failed,
builds (electron-vite + web + cli) succeed. node: rewrites confirmed to
skip embedded SSH/CLI string payloads (AST-only); all toReversed sites
verified to operate on fresh copies or write-once locals.

* chore(lint): bump mobile oxlint to 1.71 so inherited rules parse

mobile/ is a standalone pnpm project pinning its own oxlint@1.67, which
lacks unicorn/no-array-fill-with-reference-type (needs >=1.70). Since
mobile/.oxlintrc.json extends the root config, mobile CI's 'cd mobile &&
oxlint' failed to parse the new rule. Bump mobile to match root (1.71).

Verified in mobile/: oxlint 0 errors, oxfmt --check clean, tsc --noEmit
pass, vitest 978 passed / 0 failed.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-29 22:38:29 -07:00
Jinjing 26493072c1
Persist AI PR generation state across worktree switches (#5952)
Connect the ChecksPanel PR draft generation to the global generation
slice, aligning its behavior with SourceControl. This allows detail
generation to continue in the background when navigating away or
switching worktrees, and guarantees that generated fields, terminal seeds,
and branch-preparation push requirements are restored on remount.
2026-06-20 18:16:50 -07:00
Brennan Benson e7ef7681ae
Fix flaky e2e tests (#5680) 2026-06-18 00:11:32 -07:00
Jinjing 3f7e869f0c
Keep Create PR intent pinned to original worktree (#5552)
* Make Create PR intent resilient to worktree switching

Co-authored-by: Orca <help@stably.ai>

* Restrict PR creation sidebar actions to foreground worktrees

- Prevent switching tabs and opening the PR URL when a background
  worktree's PR creation finishes.
- Extract commit eligibility checking into a dedicated module and
  disable the commit message textarea during operations or when
  ineligible.
- Fix flakiness in the remote runtime request connection test.

* Abort Create PR if branch changes during details generation

If the branch changes within the active worktree while review details
are being generated, the Create PR flow now aborts and shows a muted
notice prompting the user to retry.

- Allows worktree navigation during PR details generation without
  treating it as an intent conflict.
- Adds localized strings for the new retry notice.
- Uses platform-independent paths in tests for cross-platform support.

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-16 18:45:24 -07:00
Jinjing 2899a60872
Durable persistence for commit message generation across worktree switches (#5243)
* Persist commit message generation state across worktree switches

Introduce a new global store slice for commit message generation to prevent
in-flight requests from being orphaned or lost when the Source Control
sidebar is unmounted or when switching between worktrees.

- Key commit generation records by worktree ID/path in the Zustand store
- Hydrate completed messages back into the draft input when returning to
  the originating worktree without overwriting active user edits
- Ensure the agent-selection dialog state remains bound to the target
  worktree that initiated the generation
- Wait for the PR composer eligibility check before hydrating completed
  PR field generations on sidebar remounts

* Route cancellations to starting runtime and prune stale worktree records

Ensure commit message and pull request generation cancellation requests
are always routed to the runtime environment that was selected when
the generation started, even if active settings change before
cancellation.

Additionally, prune commit message and pull request generation records
when worktrees are removed to prevent stale records from lingering in
the store.
2026-06-11 23:36:46 -07:00
Neil 9bfceb934f
test: stabilize e2e expectations (#4544) 2026-06-02 22:31:57 -07:00
Neil 07f0660eaa
test: harden flaky e2e assertions (#2564) 2026-05-21 15:46:09 -07:00
Jinjing 96ae43ca4b
fix: address review findings (#2499) 2026-05-20 23:59:51 -07:00