Skip to content

test(e2e): cover desktop mutation smoke flow#329

Closed
AkaraChen wants to merge 1 commit into
advisor/013-ci-website-node-checksfrom
advisor/014-desktop-mutation-smoke
Closed

test(e2e): cover desktop mutation smoke flow#329
AkaraChen wants to merge 1 commit into
advisor/013-ci-website-node-checksfrom
advisor/014-desktop-mutation-smoke

Conversation

@AkaraChen

@AkaraChen AkaraChen commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Plan 014: Add desktop mutation smoke coverage and release gate

Executor instructions: Follow steps. Update plans/README.md when done.

Drift check (run first): git diff --stat 3ee5b79..HEAD -- e2e-tests .github/workflows/tauri-smoke.yml .github/workflows/release.yml src-tauri/tauri.conf.json package.json

Status

  • Priority: P2
  • Effort: M
  • Risk: MED
  • Depends on: plans/013-ci-website-node-tooling-checks.md
  • Category: tests
  • Planned at: commit 3ee5b79, 2026-06-13

Why this matters

Current desktop smoke coverage mostly verifies that the app window renders. Many highest-risk flows are IPC mutations: create project/profile, interact with terminal/session state, and observe Git/file refresh. Release CI should gate on at least one real Tauri-driver mutation path so generated bindings, backend commands, DB migrations, and UI wiring are tested together.

Current state

Resolved in this checkout:

  • e2e-tests/test/smoke.test.mjs now runs the app with isolated temporary HOME/XDG directories, creates a temporary git fixture, creates a project through Tauri IPC, renames it through the sidebar UI, and verifies persisted project state via Tauri IPC.
  • The smoke workflow is reusable via workflow_call, and .github/workflows/release.yml gates publishing on that Linux smoke workflow.
  • e2e-tests/README.md documents the mutation coverage, isolated runtime data, local Linux command, and release gate.
  • Local macOS verification loads the Mocha suite and skips both tests because Tauri desktop WebDriver is unsupported on macOS; Linux execution is enforced by CI/release workflows.

Relevant files:

  • e2e-tests/test/smoke.test.mjs — Mocha/Selenium/Tauri driver smoke tests.
  • e2e-tests/README.md — local e2e instructions.
  • .github/workflows/tauri-smoke.yml — smoke workflow using virtual display/Tauri driver.
  • .github/workflows/release.yml — release workflow.

Current excerpt:

  • smoke.test.mjs has basic render assertions around app shell; it does not create/delete project/profile or exercise terminal/Git mutations.

Commands you will need

Purpose Command Expected on success
E2E install/check cd e2e-tests && bun install --frozen-lockfile && bun test exit 0 in supported environment
Smoke workflow parity command documented in e2e-tests/README.md exit 0
App checks bun run lint:check && ./node_modules/.bin/tsc --noEmit && cargo test --manifest-path src-tauri/Cargo.toml exit 0

Scope

In scope:

  • One or two reliable Tauri-driver smoke tests for mutation flows.
  • CI/release workflow gating on the smoke workflow/job.
  • E2E docs update for any required environment variables/temp dirs.

Out of scope:

  • Full visual regression suite.
  • Testing every feature path.

Git workflow

Branch advisor/014-desktop-mutation-smoke; commit test(e2e): cover desktop mutation smoke flow.

Steps

Step 1: Choose the smallest reliable mutation flow

Prefer this flow:

  1. Launch app with isolated temp app data/config if supported.
  2. Create or import a temp Git project fixture.
  3. Verify the project appears in sidebar/list.
  4. Create a profile/worktree or open default profile.
  5. Verify terminal/project UI reflects the mutation.
  6. Clean up via UI or isolated temp directory teardown.

If profile creation is flaky in CI, use project create/delete plus a simple file-tree operation instead.

Verify: local e2e command passes repeatedly twice.

Step 2: Add selectors/test hooks only where necessary

If UI lacks stable selectors, add minimal data-testid/accessible labels in source components. Prefer accessible roles/names over implementation-specific CSS selectors.

Verify: app frontend tests/typecheck pass if source changed.

Step 3: Wire smoke into release gating

Ensure .github/workflows/release.yml requires the smoke workflow/job before packaging/publishing, or documents that release is blocked by required GitHub checks. If using workflow_run, make the dependency explicit and maintainable.

Verify: workflow syntax is valid; local equivalent commands pass.

Step 4: Update docs

Update e2e-tests/README.md with exact local commands and any required system services (xvfb, Tauri driver, WebKit driver).

Verify: commands in docs match actual package scripts.

Test plan

  • New e2e smoke test covering at least one real mutation through UI + IPC + DB/backend.
  • Existing render smoke remains.
  • App unit/Rust checks still pass.

Done criteria

  • E2E smoke covers a mutation, not only shell render.
  • Release process is gated by smoke or required checks are documented/enforced.
  • E2E docs are current.
  • App checks pass.

STOP conditions

  • Tauri driver is too flaky to run the mutation flow twice locally.
  • The flow requires secrets or user-specific paths.
  • CI platform lacks required GUI dependencies and cannot install them in reasonable time.

Maintenance notes

Keep smoke tests short and deterministic. Add broader exploratory coverage separately; this plan is for release confidence, not exhaustive QA.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 77682bb8-4bed-445c-a724-877613ac9b58

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch advisor/014-desktop-mutation-smoke

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@AkaraChen AkaraChen marked this pull request as ready for review June 14, 2026 06:19
@AkaraChen AkaraChen force-pushed the advisor/014-desktop-mutation-smoke branch from d8a9088 to ac7a24e Compare June 14, 2026 06:42
@AkaraChen AkaraChen force-pushed the advisor/013-ci-website-node-checks branch 2 times, most recently from dea3cde to daa945c Compare June 14, 2026 06:48
@AkaraChen AkaraChen force-pushed the advisor/014-desktop-mutation-smoke branch from ac7a24e to 617b464 Compare June 14, 2026 06:48
@AkaraChen AkaraChen force-pushed the advisor/013-ci-website-node-checks branch from daa945c to 843a0da Compare June 14, 2026 06:58
@AkaraChen AkaraChen force-pushed the advisor/014-desktop-mutation-smoke branch from 617b464 to dbf4383 Compare June 14, 2026 06:58

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbf4383b68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +182 to +186
HOME: path.join(runtimeRoot, "home"),
XDG_CACHE_HOME: path.join(runtimeRoot, "cache"),
XDG_CONFIG_HOME: path.join(runtimeRoot, "config"),
XDG_DATA_HOME: path.join(runtimeRoot, "data"),
TMPDIR: path.join(runtimeRoot, "tmp"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Redirect Windows app-data dirs for smoke mutations

When this suite is run on Windows (it only skips macOS), the app DB is resolved via app.path().app_data_dir() in src-tauri/src/lib.rs, which uses Windows app-data locations rather than HOME/XDG_*. The new create_project_from_folder smoke path writes to the database, so these env overrides still let the test create/rename a smoke project in the user's real 2code profile; include APPDATA/LOCALAPPDATA under runtimeRoot or skip Windows before running the mutation.

Useful? React with 👍 / 👎.

AkaraChen commented Jun 14, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

AkaraChen added a commit that referenced this pull request Jun 14, 2026
* perf(git): rely on watcher invalidation for refresh

Co-authored-by: multica-agent <github@multica.ai>

* fix(settings): retry cached ipc after failure

Co-authored-by: multica-agent <github@multica.ai>

* fix(notes): serialize profile autosaves

Co-authored-by: multica-agent <github@multica.ai>

* perf(db): index profile and pty lookup columns

Co-authored-by: multica-agent <github@multica.ai>

* chore(deps): resolve high audit advisories

Co-authored-by: multica-agent <github@multica.ai>

* ci: check website and node tooling

Co-authored-by: multica-agent <github@multica.ai>

* test(e2e): cover desktop mutation smoke flow

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
@AkaraChen

Copy link
Copy Markdown
Owner Author

Merged as part of the stack in #331.

@AkaraChen AkaraChen closed this Jun 14, 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.

1 participant