Skip to content

test: e2e - #87

Merged
fum4 merged 4 commits into
masterfrom
e2e
Mar 20, 2026
Merged

fum4 merged 4 commits into
masterfrom
e2e

Conversation

@fum4

@fum4 fum4 commented Mar 19, 2026 •

Copy link
Copy Markdown
Owner
  • add apps/e2e with Playwright + Electron onboarding flow test (launches real desktop app with WM_PORT_OFFSET=900 for isolation)
  • rename test scripts from test to test:unit across all apps/libs (distinguishes unit tests from e2e in Nx targets and CI)
  • update CI workflow with per-project affected checks and e2e job (cli, desktop-app, port-offset unit jobs were missing)

Summary by CodeRabbit

  • New Features

    • Added end-to-end Playwright + Electron test suite with run/ui/report commands.
  • Changes

    • Standardized unit test scripts/targets to test:unit across projects.
    • CI now splits unit vs. e2e jobs and refines affected checks to trigger only relevant suites.
    • Added per-app unit jobs and an e2e job; VS Code test launch configs updated.
    • Web entry path updated; multiple .gitignore files adjusted.
  • Documentation

    • Added E2E testing guidance and updated development testing docs.

- add apps/e2e with Playwright + Electron onboarding flow test
  (launches real desktop app with __WM_PORT_OFFSET__=900 for isolation)
- rename test scripts from test to test:unit across all apps/libs
  (distinguishes unit tests from e2e in Nx targets and CI)
- update CI workflow with per-project affected checks and e2e job
  (cli, desktop-app, port-offset unit jobs were missing)
@fum4 fum4 self-assigned this Mar 19, 2026
@vercel

vercel Bot commented Mar 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
openkit Ignored Ignored Preview Mar 20, 2026 1:19am

@coderabbitai

coderabbitai Bot commented Mar 19, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 28fc430b-bfd9-497e-990a-bfa98510e429

📥 Commits

Reviewing files that changed from the base of the PR and between e34e023 and b59c63e.

📒 Files selected for processing (2)
  • apps/e2e/src/fixtures.ts
  • nx.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/e2e/src/fixtures.ts
  • nx.json

📝 Walkthrough

Walkthrough

Adds an apps/e2e Playwright+Electron E2E suite, renames test scripts/targets to explicit test:unit* and test:e2e*, updates Nx defaults and CI (.github/workflows/test.yml) to emit finer affected outputs and split unit vs e2e jobs, and adds related docs and per-project .gitignore entries.

Changes

Cohort / File(s) Summary
CI/CD Workflow Restructuring
.github/workflows/test.yml
Reworks check-affected outputs (cli_startup → cli, adds desktop_app, port_offset, e2e), switches affected selection to test:unit/test:e2e, removes CLI-startup special-case, and splits unit vs e2e jobs (adds macOS e2e job).
E2E Infrastructure
apps/e2e/package.json, apps/e2e/playwright.config.ts, apps/e2e/project.json, apps/e2e/tsconfig.json, apps/e2e/src/fixtures.ts, apps/e2e/src/onboarding.test.ts, apps/e2e/README.md, apps/e2e/.gitignore
Adds new Nx app e2e with Playwright config, TypeScript config, fixtures that launch built Electron with __WM_PORT_OFFSET__, an onboarding test, README, and ignore rules for Playwright outputs.
Test Script & Target Standardization
package.json, apps/cli/package.json, apps/desktop-app/package.json, apps/server/package.json, apps/web-app/package.json, libs/logger/package.json, libs/port-offset/package.json, libs/shared/package.json, apps/web-app/project.json
Renames package scripts from generic test/test:watch/test:coverage to test:unit/test:unit:watch/test:unit:coverage; adds root test:unit* and test:e2e* scripts; updates web-app project targets.
Nx Defaults & E2E Target Wiring
nx.json
Replaces generic test defaults with test:unit* and test:unit:coverage, adds test:unit:watch, and introduces test:e2e, test:e2e:ui, test:e2e:report defaults; e2e targets depend on desktop-app:build.
IDE Launch & Documentation
.vscode/launch.json, docs/DEVELOPMENT.md, docs/ARCHITECTURE.md
Updates VS Code launch configs to new test:unit* and adds test:e2e*; documents E2E usage, __WM_PORT_OFFSET__=900 isolation, and new test commands.
Project .gitignore additions & root .gitignore changes
*.gitignore (root and many apps/*/.gitignore, libs/*/.gitignore)
Adds per-project .gitignore files for node_modules, dist, coverage, release, and Playwright artifacts; removes several entries from root .gitignore.
Web app config & entry path
apps/web-app/vite.config.ts, apps/web-app/index.html
Removes custom root/build outDir, narrows Vitest discovery/setup paths to src/**, tightens coverage include/exclude, and changes index script to /src/main.tsx.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as Playwright Test Runner
  participant Fixtures as E2E Fixtures
  participant FS as Temp Project FS
  participant Electron as ElectronApp (built desktop-app)
  participant Window as App Window / UI

  Runner->>Fixtures: request fixtures (testProject, electronApp, window)
  Fixtures->>FS: create temp dir, init git
  Fixtures->>Electron: locate built app, launch with env __WM_PORT_OFFSET__=900, NODE_ENV=test
  Electron->>Window: open main window
  Runner->>Window: perform onboarding interactions & assertions
  Window-->>Runner: return UI state / results
  Fixtures->>Electron: close app
  Fixtures->>FS: cleanup temp dir
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • LunatiqueCoder

Poem

🐰 A little rabbit hops with glee,
Playwright and Electron dance for me.
Unit tests tidy, E2E takes flight,
Ports offset so they sleep at night.
Hooray — the monorepo tests unite! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: e2e' accurately summarizes the primary change—introducing end-to-end testing infrastructure with Playwright and Electron—and is concise and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch e2e
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor

Claude Review

🟠 Medium

  1. E2E runs on macos-latest only (.github/workflows/test.yml:199): If the desktop app targets Linux as well (there's a package:linux script), consider adding a Linux runner or a comment explaining why E2E is macOS-only.

  2. Hardcoded relative path to main.js in fixtures (apps/e2e/src/fixtures.ts:38): path.resolve(import.meta.dirname, "../../../apps/desktop-app/dist/main.js") is fragile — it assumes the test always runs from apps/e2e/src/. Consider resolving from the workspace root or using an environment variable.

  3. Electron version pinning (apps/e2e/package.json:13): "electron": "^40.6.1" should ideally match the version used by desktop-app to avoid testing against a different runtime. Consider a workspace catalog entry or a comment linking the two versions.

🟡 Minor

  1. Missing newline at end of new .gitignore files: libs/agents/.gitignore, libs/integrations/.gitignore, and libs/port-offset/src/hooks/node/.gitignore all end without a trailing newline. Minor but easy to fix.

  2. Test file placement (apps/e2e/src/onboarding.test.ts): Per CLAUDE.md, test files should be in __test__/ directories. The README documents the convention as src/__test__/ but the test file is at src/onboarding.test.ts.

  3. web-app/project.json has stale target test:watch (apps/web-app/project.json:13): The test:watch target still has dependsOn: ["logger:build"], but all other packages renamed watch to test:unit:watch. This target name won't match the renamed script.

🟢 Resolved

  1. Root package.json test scripts reference old Nx target names — Fixed. Root scripts now correctly use -t test:unit and -t test:e2e.

  2. test:unit:affected also references old target name — Fixed. Now uses -t test:unit.

  3. Missing newline at end of root .gitignore — Fixed. The root .gitignore now has a proper trailing newline.

  4. E2E caching may produce stale results (nx.json) — Fixed. test:e2e, test:e2e:ui, and test:e2e:report all have "cache": false.

  5. test:e2e:report probably shouldn't be cached (nx.json) — Fixed. Now "cache": false.

  6. test:unit:watch cached in nx.json — Fixed. Now "cache": false.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 11

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/test.yml:
- Around line 58-60: The smoke job "smoke-cli" is incorrectly gated by the
condition needs.check-affected.outputs.cli == 'true', which prevents running
backend/startup checks when only server or port-offset changes occur; update the
job to remove or broaden that condition so it runs when relevant backend changes
are affected (for example, remove the if line or change it to check for cli OR
server/port-offset outputs from the check-affected step such as
needs.check-affected.outputs.server or needs.check-affected.outputs.port-offset)
so the smoke-cli job still builds and exercises the backend when server-related
changes are present.

In @.gitignore:
- Line 13: Add the credentials file path to .gitignore to prevent accidental
commits: update the .gitignore file to include the entry for
scripts/claude-auth/claude-credentials.json (or a more general pattern like
scripts/claude-auth/*.json) so that any generated credentials are ignored by Git
and not accidentally committed.

In `@apps/e2e/package.json`:
- Around line 11-15: Update the Electron devDependency in apps/e2e package.json:
change the electron version specifier under "devDependencies" from "^40.6.1" to
"^41.0.3" (unless there is an explicit compatibility constraint), run npm/yarn
install to refresh lockfile, and verify e2e tests (Playwright setup) still pass;
reference the "devDependencies" block and the "electron" entry when making the
change.

In `@apps/e2e/README.md`:
- Around line 12-20: The README mixes repo-root and package-local commands;
decide whether to show root-level scripts (e.g., test:e2e*) or package-local
commands in apps/e2e; then make all examples consistent. Either prefix the
package-local commands with a setup step (add a line like "cd apps/e2e" and use
"pnpm e2e", "pnpm e2e:report", "pnpm nx run e2e:e2e:ui") or replace them with
equivalent root scripts (use "pnpm run test:e2e" / the root test:e2e* variants
and "pnpm nx run e2e:e2e:ui" from the repo root). Update the README block to use
the chosen scope consistently and add a short note indicating which directory to
run from.

In `@apps/e2e/src/fixtures.ts`:
- Around line 26-30: The temporary git repo initialization in
apps/e2e/src/fixtures.ts uses execFileSync to run "git init" and "git commit"
against the working directory 'dir' but does not configure a Git identity,
causing commits to fail on CI; before the commit call, run execFileSync to set
local git config user.name and user.email for that repo (e.g., using
execFileSync("git", ["config", "user.name", "..."], { cwd: dir }) and
execFileSync("git", ["config", "user.email", "..."], { cwd: dir })) so the
subsequent execFileSync("git", ["commit", "--allow-empty", "-m", "init"], { cwd:
dir, stdio: "ignore" }) succeeds.
- Around line 37-38: The code uses import.meta.dirname when computing mainPath
inside the electronApp fixture; replace that with fileURLToPath(import.meta.url)
and path.dirname to get the directory compatible with Node 18: compute const
__filename = fileURLToPath(import.meta.url) and const __dirname =
path.dirname(__filename) (or equivalent inline), then use
path.resolve(__dirname, "../../../apps/desktop-app/dist/main.js") for mainPath;
also add the import for fileURLToPath from 'url' at the top of the file.

In `@apps/e2e/src/onboarding.test.ts`:
- Around line 7-49: This spec (the test.describe("Onboarding flow") containing
test("completes setup wizard and reaches the workspace"...)) must be moved into
a __test__ directory to match repo conventions: relocate the file into
src/__test__/ (keep the .test.ts suffix), then update any relative imports or
fixtures referenced by the spec so they resolve from the new location and ensure
the test runner glob still picks it up; verify the test name and suite remain
unchanged after the move.

In `@docs/ARCHITECTURE.md`:
- Around line 343-346: Update the documentation reference to use the correct Nx
target name: replace the incorrect `e2e:e2e` string with `e2e:test:e2e` in the
E2E section so it matches the actual configuration and CI command (`pnpm nx run
e2e:test:e2e`); ensure any nearby explanatory text that mentions the target is
updated to the new `e2e:test:e2e` identifier.

In `@docs/DEVELOPMENT.md`:
- Around line 110-114: Update the E2E command examples to match the root
package.json scripts introduced in the PR: replace usages of `pnpm e2e` and
`pnpm nx run e2e:e2e:ui` with the new `pnpm test:e2e` and `pnpm test:e2e:ui` (or
the appropriate `test:e2e*` script names), and update the report command example
to the matching script such as `cd apps/e2e && pnpm test:e2e:report` so all
examples reference the actual script names (`test:e2e`, `test:e2e:ui`,
`test:e2e:report`) used in the root package.json.

In `@nx.json`:
- Around line 38-46: The dependsOn entries for test:e2e and test:e2e:ui
incorrectly use CLI-style "desktop-app:build" strings; replace them with Nx's
object syntax so the e2e targets properly depend on the desktop-app build
(update the dependsOn array for "test:e2e" and "test:e2e:ui" to use an object
form referencing target "build" and the desktop-app project, e.g., using keys
target and projects rather than a single string).

In `@package.json`:
- Around line 31-33: The root package.json scripts call non-existent Nx targets
"-t test" and "-t test:coverage"; update the three scripts so they call the
workspace target names defined in nx.json: replace "-t test" with "-t test:unit"
in "test:unit" and "test:unit:affected" and replace "-t test:coverage" with "-t
test:unit:coverage" in "test:unit:coverage" so the scripts invoke "pnpm nx
run-many -t test:unit --parallel", "pnpm nx affected -t test:unit --parallel
--base=${NX_BASE:-origin/master} --head=${NX_HEAD:-HEAD}", and "pnpm nx run-many
-t test:unit:coverage --parallel" respectively.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 51b0302c-a630-4ad5-8a43-bfb7636afdf4

📥 Commits

Reviewing files that changed from the base of the PR and between 2173af1 and 6724331.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • .github/workflows/test.yml
  • .gitignore
  • .vscode/launch.json
  • apps/cli/package.json
  • apps/desktop-app/package.json
  • apps/e2e/.gitignore
  • apps/e2e/README.md
  • apps/e2e/package.json
  • apps/e2e/playwright.config.ts
  • apps/e2e/project.json
  • apps/e2e/src/fixtures.ts
  • apps/e2e/src/onboarding.test.ts
  • apps/e2e/tsconfig.json
  • apps/server/package.json
  • apps/web-app/package.json
  • apps/web-app/project.json
  • docs/ARCHITECTURE.md
  • docs/DEVELOPMENT.md
  • libs/logger/package.json
  • libs/port-offset/package.json
  • libs/shared/package.json
  • nx.json
  • package.json

Comment on lines 58 to +60
smoke-cli:
needs: check-affected
if: needs.check-affected.outputs.cli_startup == 'true'
if: needs.check-affected.outputs.cli == 'true'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Don't gate the smoke job on CLI-only changes.

This job builds server and exercises backend startup too. With the current condition, a server or port-offset regression can skip smoke entirely when cli itself isn't affected.

Suggested fix
-    if: needs.check-affected.outputs.cli == 'true'
+    if: needs.check-affected.outputs.cli == 'true' || needs.check-affected.outputs.server == 'true' || needs.check-affected.outputs.port_offset == 'true'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
smoke-cli:
needs: check-affected
if: needs.check-affected.outputs.cli_startup == 'true'
if: needs.check-affected.outputs.cli == 'true'
smoke-cli:
needs: check-affected
if: needs.check-affected.outputs.cli == 'true' || needs.check-affected.outputs.server == 'true' || needs.check-affected.outputs.port_offset == 'true'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test.yml around lines 58 - 60, The smoke job "smoke-cli"
is incorrectly gated by the condition needs.check-affected.outputs.cli ==
'true', which prevents running backend/startup checks when only server or
port-offset changes occur; update the job to remove or broaden that condition so
it runs when relevant backend changes are affected (for example, remove the if
line or change it to check for cli OR server/port-offset outputs from the
check-affected step such as needs.check-affected.outputs.server or
needs.check-affected.outputs.port-offset) so the smoke-cli job still builds and
exercises the backend when server-related changes are present.

Comment thread .gitignore Outdated
coverage/
.superpowers/
scripts/claude-auth/claude-credentials.json No newline at end of file
.superpowers/ No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether the credentials file exists, is ignored, or already tracked.
set -euo pipefail

fd "claude-credentials.json" || true
git check-ignore -v scripts/claude-auth/claude-credentials.json || true
git ls-files --error-unmatch scripts/claude-auth/claude-credentials.json >/dev/null 2>&1 \
  && echo "tracked: scripts/claude-auth/claude-credentials.json" \
  || echo "not tracked: scripts/claude-auth/claude-credentials.json"

Repository: fum4/openkit

Length of output: 112


Consider adding credentials file to .gitignore as a preventative measure.

The credentials file scripts/claude-auth/claude-credentials.json does not currently exist in the repository and is not tracked. However, adding it to .gitignore is good practice to prevent accidental commits if it is created during development.

Suggested addition
 .superpowers/
+scripts/claude-auth/claude-credentials.json
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.superpowers/
.superpowers/
scripts/claude-auth/claude-credentials.json
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore at line 13, Add the credentials file path to .gitignore to
prevent accidental commits: update the .gitignore file to include the entry for
scripts/claude-auth/claude-credentials.json (or a more general pattern like
scripts/claude-auth/*.json) so that any generated credentials are ignored by Git
and not accidentally committed.

Comment thread apps/e2e/package.json
Comment on lines +11 to +15
"devDependencies": {
"@playwright/test": "^1.58.2",
"electron": "^40.6.1",
"playwright-core": "^1.58.2"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the Playwright and Electron versions exist

echo "=== Checking latest Playwright version on npm ==="
curl -s https://registry.npmjs.org/@playwright/test | jq '.["dist-tags"].latest'

echo -e "\n=== Checking latest Electron version on npm ==="
curl -s https://registry.npmjs.org/electron | jq '.["dist-tags"].latest'

Repository: fum4/openkit

Length of output: 172


Consider updating Electron to the latest stable version.

The E2E package structure is well-organized with appropriate Playwright scripts and correct dependency declarations. The @playwright/test and playwright-core versions (^1.58.2) match the latest releases.

However, Electron 40.6.1 is behind the latest available version (41.0.3). Update to ^41.0.3 unless there is a specific compatibility reason to remain on the 40.x branch.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/e2e/package.json` around lines 11 - 15, Update the Electron
devDependency in apps/e2e package.json: change the electron version specifier
under "devDependencies" from "^40.6.1" to "^41.0.3" (unless there is an explicit
compatibility constraint), run npm/yarn install to refresh lockfile, and verify
e2e tests (Playwright setup) still pass; reference the "devDependencies" block
and the "electron" entry when making the change.

Comment thread apps/e2e/README.md
Comment on lines +12 to +20
```bash
# Run all e2e tests (builds desktop-app first via Nx dependency)
pnpm e2e

# Interactive debugging with Playwright UI
pnpm nx run e2e:e2e:ui

# View last test report
cd apps/e2e && pnpm e2e:report

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify whether these are repo-root or package-local commands.

This block mixes scopes. Without an initial cd apps/e2e, pnpm e2e / pnpm nx run e2e:e2e:ui don't exist at the root, while the root package now exposes test:e2e*. Pick one scope and use it consistently so copy/paste works.

Suggested README update
-# Run all e2e tests (builds desktop-app first via Nx dependency)
-pnpm e2e
+# Run all e2e tests (repo root)
+pnpm test:e2e

-# Interactive debugging with Playwright UI
-pnpm nx run e2e:e2e:ui
+# Interactive debugging with Playwright UI (repo root)
+pnpm test:e2e:ui

-# View last test report
-cd apps/e2e && pnpm e2e:report
+# View last test report (repo root)
+pnpm test:e2e:report
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/e2e/README.md` around lines 12 - 20, The README mixes repo-root and
package-local commands; decide whether to show root-level scripts (e.g.,
test:e2e*) or package-local commands in apps/e2e; then make all examples
consistent. Either prefix the package-local commands with a setup step (add a
line like "cd apps/e2e" and use "pnpm e2e", "pnpm e2e:report", "pnpm nx run
e2e:e2e:ui") or replace them with equivalent root scripts (use "pnpm run
test:e2e" / the root test:e2e* variants and "pnpm nx run e2e:e2e:ui" from the
repo root). Update the README block to use the chosen scope consistently and add
a short note indicating which directory to run from.

Comment thread apps/e2e/src/fixtures.ts Resolved
Comment on lines +7 to +49
test.describe("Onboarding flow", () => {
test("completes setup wizard and reaches the workspace", async ({
electronApp,
window,
testProject,
}) => {
// 1. WelcomeScreen should be visible
await expect(window.getByText("Welcome to")).toBeVisible({ timeout: 15_000 });
await expect(window.getByText("Ready to launch")).toBeVisible();

// 2. Mock the native file dialog to return the test project dir, then click "Ready to launch"
await electronApp.evaluate(({ dialog }, projectDir) => {
dialog.showOpenDialog = () => Promise.resolve({ canceled: false, filePaths: [projectDir] });
}, testProject.dir);

await window.getByText("Ready to launch").click();

// 3. Wait for server startup + setup screen (server can take up to 30s to start)
await expect(window.getByText("Auto-detect settings")).toBeVisible({ timeout: 45_000 });

// 4. Choice screen → click auto-detect
await window.getByText("Auto-detect settings").click();

// 5. Agents screen → click "Skip for now"
await expect(window.getByText("Skip for now").first()).toBeVisible({ timeout: 15_000 });
await window.getByText("Skip for now").first().click();

// 6. Commit & Push screen → click "Skip for now"
await expect(window.getByText("Configuration Created")).toBeVisible({ timeout: 15_000 });
await window.getByText("Skip for now").first().click();

// 7. Integrations screen → click "Continue without integrations" (or "Continue")
const continueButton = window.getByText(/^Continue/);
await expect(continueButton).toBeVisible({ timeout: 15_000 });
await continueButton.click();

// 8. Complete screen → click "Go to workspace"
await expect(window.getByText("Go to workspace")).toBeVisible({ timeout: 10_000 });
await window.getByText("Go to workspace").click();

// 9. Verify workspace loaded — the main UI should show the "Create worktree" button
await expect(window.getByText("Create worktree")).toBeVisible({ timeout: 15_000 });
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Move this spec under src/__test__/.

The new suite is documented as src/__test__/..., but this file lives directly under src/. Keeping it here makes the E2E package the exception to the repo's test layout convention. Based on learnings, Applies to /test//*.test.{ts,tsx} : Place test files in test/ directories at each directory level that contains testable code, with .test.ts/.test.tsx suffix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/e2e/src/onboarding.test.ts` around lines 7 - 49, This spec (the
test.describe("Onboarding flow") containing test("completes setup wizard and
reaches the workspace"...)) must be moved into a __test__ directory to match
repo conventions: relocate the file into src/__test__/ (keep the .test.ts
suffix), then update any relative imports or fixtures referenced by the spec so
they resolve from the new location and ensure the test runner glob still picks
it up; verify the test name and suite remain unchanged after the move.

Comment thread docs/ARCHITECTURE.md
Comment on lines +343 to +346
### E2E: Playwright + Electron

The `apps/e2e` package uses Playwright's Electron support to launch the real desktop app and test full user flows (onboarding, workspace interactions). Tests run with `__WM_PORT_OFFSET__=900` for instance isolation. The Nx target `e2e:e2e` depends on `desktop-app:build`, which cascades through all required app builds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the actual E2E target names defined in nx.json and package.json

echo "=== Checking nx.json for test:e2e target defaults ==="
rg -n "test:e2e" nx.json

echo -e "\n=== Checking e2e package.json scripts ==="
cat apps/e2e/package.json | jq '.scripts'

echo -e "\n=== Checking CI workflow for e2e target usage ==="
rg -n "e2e.*test" .github/workflows/

Repository: fum4/openkit

Length of output: 469


Update the Nx target reference from e2e:e2e to e2e:test:e2e.

The documentation incorrectly references the Nx target as e2e:e2e. Based on the actual configuration in nx.json and the CI workflow (pnpm nx run e2e:test:e2e), the correct target name is e2e:test:e2e.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/ARCHITECTURE.md` around lines 343 - 346, Update the documentation
reference to use the correct Nx target name: replace the incorrect `e2e:e2e`
string with `e2e:test:e2e` in the E2E section so it matches the actual
configuration and CI command (`pnpm nx run e2e:test:e2e`); ensure any nearby
explanatory text that mentions the target is updated to the new `e2e:test:e2e`
identifier.

Comment thread docs/DEVELOPMENT.md
Comment on lines +110 to +114
| Command | Description |
| -------------------------------- | -------------------------------------------- |
| `pnpm e2e` | Run all E2E tests (builds desktop-app first) |
| `pnpm nx run e2e:e2e:ui` | Interactive Playwright UI for debugging |
| `cd apps/e2e && pnpm e2e:report` | View last test report |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the root E2E command examples.

These commands don't match the scripts added in the root package.json. From the repo root, pnpm e2e / pnpm nx run e2e:e2e:ui will fail; the PR adds test:e2e* commands instead.

Suggested doc update
-| `pnpm e2e`                       | Run all E2E tests (builds desktop-app first) |
-| `pnpm nx run e2e:e2e:ui`         | Interactive Playwright UI for debugging      |
-| `cd apps/e2e && pnpm e2e:report` | View last test report                        |
+| `pnpm test:e2e`                  | Run all E2E tests (builds desktop-app first) |
+| `pnpm test:e2e:ui`               | Interactive Playwright UI for debugging      |
+| `pnpm test:e2e:report`           | View last test report                        |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/DEVELOPMENT.md` around lines 110 - 114, Update the E2E command examples
to match the root package.json scripts introduced in the PR: replace usages of
`pnpm e2e` and `pnpm nx run e2e:e2e:ui` with the new `pnpm test:e2e` and `pnpm
test:e2e:ui` (or the appropriate `test:e2e*` script names), and update the
report command example to the matching script such as `cd apps/e2e && pnpm
test:e2e:report` so all examples reference the actual script names (`test:e2e`,
`test:e2e:ui`, `test:e2e:report`) used in the root package.json.

Comment thread nx.json Outdated
Comment on lines +38 to +46
"test:e2e": {
"cache": true,
"dependsOn": ["desktop-app:build"],
"inputs": ["default", "^default"]
},
"test:e2e:ui": {
"cache": true,
"dependsOn": ["desktop-app:build"],
"inputs": ["default", "^default"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Nx dependsOn syntax target configuration nx.json

💡 Result:

In Nx, dependsOn can be set per target in a project’s project.json / package.json target config, or globally for all projects via nx.json > targetDefaults. [1][2]

1) Compact string syntax (most common)

Inside a target:

  • "dependsOn": ["build"] → run the same project’s build before this target. [2]
  • "dependsOn": ["^build"] → run build for all dependency projects (from the project graph) before running this target. [2]

Example (nx.json applies to all projects):

{
  "targetDefaults": {
    "build": {
      "dependsOn": ["^build"]
    }
  }
}

This is equivalent to adding {"dependsOn":["^build"]} to every project’s build target. [1]

2) Expanded object syntax (more control)

Use objects when you need to specify which projects, whether to use dependencies, and whether to forward CLI params:

{
  "dependsOn": [
    { "target": "build", "params": "ignore" },
    { "dependencies": true, "target": "build", "params": "forward" },
    { "projects": "self", "target": "pre-build", "params": "forward" },
    { "projects": "{dependencies}", "target": "build" }
  ]
}

Key fields shown in Nx docs:

  • target: target name to run first
  • dependencies: true: run on all dependency projects
  • projects: e.g. "self" or "{dependencies}"
  • params: "forward" or "ignore" (default "ignore") [2]

Where to put it

  • Per-project: project.json (or package.json under the "nx" key) target definition. [2]
  • Global default: nx.json > targetDefaults.<targetName>.dependsOn. [1]

Sources: Nx nx.json reference (task pipelines / targetDefaults) [1], Nx project configuration reference (dependsOn + expanded syntax) [2].


🏁 Script executed:

fd nx.json

Repository: fum4/openkit

Length of output: 63


🏁 Script executed:

cat -n nx.json

Repository: fum4/openkit

Length of output: 1901


🌐 Web query:

Nx dependsOn "project:target" string syntax valid

💡 Result:

In Nx, a dependsOn string entry is meant to be just a target name (same project), or a target name prefixed with ^ to run it on dependency projects first (e.g. "dependsOn": ["build"] or "dependsOn": ["^build"]). "project:target" is not a valid/recognized string form for dependsOn. [1] [2]

If you need to depend on a target in a specific other project, use the object syntax, e.g.:

"dependsOn": [{ "projects": "myapp", "target": "build" }]

(or "projects": ["proj1","proj2"], or "projects": "{dependencies}"). [1]

Sources:
[1] Nx “Project Configuration” (dependsOn string + object syntax examples)
[2] Nx “nx.json Reference” (dependsOn examples, incl. ^build)


Use Nx's object syntax for the desktop build dependency.

dependsOn doesn't support CLI-style project:target strings. The string "desktop-app:build" is invalid and Nx will ignore it, causing E2E tests to run without waiting for the desktop app build to complete.

Suggested fix
     "test:e2e": {
       "cache": true,
-      "dependsOn": ["desktop-app:build"],
+      "dependsOn": [{ "projects": ["desktop-app"], "target": "build" }],
       "inputs": ["default", "^default"]
     },
     "test:e2e:ui": {
       "cache": true,
-      "dependsOn": ["desktop-app:build"],
+      "dependsOn": [{ "projects": ["desktop-app"], "target": "build" }],
       "inputs": ["default", "^default"]
     },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nx.json` around lines 38 - 46, The dependsOn entries for test:e2e and
test:e2e:ui incorrectly use CLI-style "desktop-app:build" strings; replace them
with Nx's object syntax so the e2e targets properly depend on the desktop-app
build (update the dependsOn array for "test:e2e" and "test:e2e:ui" to use an
object form referencing target "build" and the desktop-app project, e.g., using
keys target and projects rather than a single string).

Comment thread package.json Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web-app/vite.config.ts (1)

1-6: ⚠️ Potential issue | 🟡 Minor

Missing JSDoc comment at the top of the file.

As per coding guidelines, every source file must have a JSDoc comment explaining what the file is for.

📝 Suggested JSDoc
+/**
+ * Vite and Vitest configuration for the web-app.
+ * Includes stubs for Node-only modules and dev server proxy setup.
+ */
 import { defineConfig } from "vitest/config";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web-app/vite.config.ts` around lines 1 - 6, Add a JSDoc comment at the
top of vite.config.ts describing the file's purpose (Vite config for the web
app), mention exported configuration created by defineConfig and any
environment-driven settings like webAppPort and serverPort
(OPENKIT_WEB_APP_PORT, OPENKIT_SERVER_PORT); place the comment above the
existing imports so it documents the module and the key symbols (webAppPort,
serverPort, and default export from defineConfig).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/web-app/vite.config.ts`:
- Around line 1-6: Add a JSDoc comment at the top of vite.config.ts describing
the file's purpose (Vite config for the web app), mention exported configuration
created by defineConfig and any environment-driven settings like webAppPort and
serverPort (OPENKIT_WEB_APP_PORT, OPENKIT_SERVER_PORT); place the comment above
the existing imports so it documents the module and the key symbols (webAppPort,
serverPort, and default export from defineConfig).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8c0fdc56-9273-43c6-8300-a0fc21c55928

📥 Commits

Reviewing files that changed from the base of the PR and between 8bb4317 and e34e023.

📒 Files selected for processing (18)
  • .gitignore
  • apps/cli/.gitignore
  • apps/desktop-app/.gitignore
  • apps/e2e/.gitignore
  • apps/mobile-app/.gitignore
  • apps/server/.gitignore
  • apps/web-app/.gitignore
  • apps/web-app/index.html
  • apps/web-app/project.json
  • apps/web-app/vite.config.ts
  • apps/website/.gitignore
  • libs/agents/.gitignore
  • libs/integrations/.gitignore
  • libs/logger/.gitignore
  • libs/port-offset/.gitignore
  • libs/port-offset/src/hooks/node/.gitignore
  • libs/shared/.gitignore
  • nx.json
💤 Files with no reviewable changes (1)
  • .gitignore
✅ Files skipped from review due to trivial changes (14)
  • apps/cli/.gitignore
  • libs/port-offset/.gitignore
  • apps/web-app/.gitignore
  • libs/integrations/.gitignore
  • apps/e2e/.gitignore
  • libs/shared/.gitignore
  • apps/server/.gitignore
  • libs/port-offset/src/hooks/node/.gitignore
  • apps/desktop-app/.gitignore
  • apps/web-app/index.html
  • libs/logger/.gitignore
  • apps/website/.gitignore
  • libs/agents/.gitignore
  • apps/mobile-app/.gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web-app/project.json

@fum4
fum4 merged commit d0ea2df into master Mar 20, 2026
23 checks passed
@fum4
fum4 deleted the e2e branch March 20, 2026 01: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