Skip to content

fix: restore recent test regressions and upgrade effect beta#18158

Merged
Hona merged 4 commits intodevfrom
fix/test-regressions-recently
Mar 18, 2026
Merged

fix: restore recent test regressions and upgrade effect beta#18158
Hona merged 4 commits intodevfrom
fix/test-regressions-recently

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented Mar 18, 2026

  • The pain: dev started going red after 4ba7d3b40 with real regressions in explicit-route autoselecting, a flaky multiline prompt e2e, and deterministic watcher failures on Windows temp roots, while Effect was still pinned to 4.0.0-beta.31.
  • The solution: restore the autoselect guard, harden the multiline prompt test, fix watcher startup and protected-path handling, and upgrade effect plus @effect/platform-node to 4.0.0-beta.35 through workspace catalog: pins.
  • Why it works: explicit /:dir/... routes are no longer overwritten after async readiness, the prompt test now drives the focused contenteditable directly, watcher tests now start the service and no longer ignore temp-root projects, and beta.35 lets the callback bridge use Deferred.doneUnsafe.
  • Fixes: the recent always-red dev failures in packages/app/e2e/projects/workspaces.spec.ts:108, packages/app/e2e/prompt/prompt-multiline.spec.ts:4, packages/app/e2e/session/session-model-persistence.spec.ts:266, and packages/opencode/test/file/watcher.test.ts.

@Hona Hona requested a review from adamdotdevin as a code owner March 18, 2026 23:22
Copilot AI review requested due to automatic review settings March 18, 2026 23:22
@Hona Hona enabled auto-merge (squash) March 18, 2026 23:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes several newly introduced regressions causing dev to go red by restoring correct project autoselection behavior, hardening flaky E2E prompt input, stabilizing file watcher startup/ignore handling (notably on Windows temp roots), and upgrading effect / @effect/platform-node to beta.35 via workspace catalog pins.

Changes:

  • Prevent async autoselect from overriding explicit route selection in the app layout.
  • Make multiline prompt E2E input more deterministic by focusing and typing directly into the contenteditable and asserting exact content.
  • Stabilize watcher tests/service startup and adjust protected-path ignore behavior; upgrade Effect packages to 4.0.0-beta.35 via catalog:.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/opencode/test/file/watcher.test.ts Starts the watcher service explicitly and replaces callback/fiber waiting with a Deferred-based approach.
packages/opencode/src/file/watcher.ts Filters protected ignore paths to those within the watched directory to avoid ignoring parent protected roots.
packages/opencode/package.json Switches @effect/platform-node to workspace catalog: pin.
packages/desktop-electron/package.json Switches effect to workspace catalog: pin.
packages/app/src/pages/layout.tsx Adds an autoselect guard to prevent explicit-route override after async readiness.
packages/app/package.json Switches effect to workspace catalog: pin.
packages/app/e2e/prompt/prompt-multiline.spec.ts Hardens multiline prompt test by focusing and using locator key input APIs with stronger assertions.
package.json Adds @effect/platform-node to catalog and bumps effect to 4.0.0-beta.35.
bun.lock Updates lockfile to reflect catalog pins and beta.35 resolutions (including new transitive deps).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hona Hona disabled auto-merge March 18, 2026 23:29
@Hona Hona requested a review from Copilot March 18, 2026 23:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes several recent regressions causing dev to go red by restoring explicit-route autoselect behavior, hardening a flaky multiline prompt E2E test, stabilizing the file watcher startup + protected-path handling (notably on Windows temp roots), and upgrading effect / @effect/platform-node via workspace catalog: pins.

Changes:

  • Restore an autoselect guard so explicit /:dir/... routes aren’t overwritten after async readiness.
  • Make the multiline prompt E2E test drive the focused contenteditable directly and assert the resulting newline content deterministically.
  • Start the FileWatcher service explicitly in tests, refine protected-path ignore behavior, and upgrade effect + @effect/platform-node to 4.0.0-beta.35 via catalog:.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/opencode/test/file/watcher.test.ts Ensures watcher service is started before assertions; refactors event waiting to use Deferred/acquireUseRelease for more deterministic cleanup.
packages/opencode/src/file/watcher.ts Filters protected paths to those relevant to the watched directory before passing to watcher ignore list.
packages/opencode/package.json Switches @effect/platform-node to the workspace catalog: pin.
packages/desktop-electron/package.json Switches effect to the workspace catalog: pin.
packages/app/src/pages/layout.tsx Adds an autoselect guard after readiness to preserve explicit directory routes.
packages/app/package.json Switches effect to the workspace catalog: pin.
packages/app/e2e/prompt/prompt-multiline.spec.ts Uses locator-focused key input (focus/pressSequentially) and asserts final innerText including the newline.
package.json Pins effect and @effect/platform-node to 4.0.0-beta.35 in the workspace catalog.
bun.lock Updates the lockfile to reflect the catalog-pinned upgrades and resulting transitive changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hona Hona merged commit 5d2f8d7 into dev Mar 18, 2026
9 checks passed
@Hona Hona deleted the fix/test-regressions-recently branch March 18, 2026 23:54
AvatarGanymede pushed a commit to AvatarGanymede/opencode-dev that referenced this pull request Mar 19, 2026
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 19, 2026
raf1hh pushed a commit to raf1hh/opencode that referenced this pull request Mar 20, 2026
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 20, 2026
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
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.

2 participants