Skip to content

test(e2e): repair desktop Appium suite after IA refactors#3649

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel-droid:e2e-suite-fixes
Jun 13, 2026
Merged

test(e2e): repair desktop Appium suite after IA refactors#3649
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel-droid:e2e-suite-fixes

Conversation

@senamakel-droid

@senamakel-droid senamakel-droid commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Problem

After the IA refactors, the desktop E2E suite failed broadly because specs/helpers targeted UI that moved or was renamed: the chat composer (button title, removed sidebar heading), navigation (routes now redirect; tabs renamed Chat/Brain/Human), and the Settings IA (panels split/merged/renamed). Two non-IA issues also surfaced: route-readiness relied on a root-innerText "signature changed" heuristic that the persistent TwoPanelLayout sidebar defeats, and test_reset leaves the on-disk auth session token in place so skipAuth specs running after a login stay authenticated.

Solution

  • Chat harness (~30 specs): clickByTitle targets the stable new-thread-button testid; new chatMounted() helper detects the composer instead of the removed "Threads" heading.
  • Navigation: rewrote HASH_TO_SIDEBAR_LABEL + redirect resolution; waitForHashRouteReady is now signature-independent and redirect/selector-tolerant.
  • Settings/Brain/Connections IA: per-panel marker fixes (privacy "Product Analytics", dev-options "Restart Tour", mascot→personality, voice→connections, billing "moved to web", composio/autonomy), channel-select-<id> testid, insights/N2.4/command-palette repointed to /brain?tab=intelligence&itab=memory.
  • Onboarding: walk the added activity/vault custom-wizard steps.
  • Auth/reset: opt-in clearAuthSession (calls auth_clear_session) used by runtime-picker + subagent/wallet chat-harness specs.

Submission Checklist

  • Tests added or updated (happy path + edge case) — this PR is test maintenance; specs exercise the failure paths.
  • Diff coverage ≥ 80% — N/A: changes are E2E specs/helpers + 2 trivial data-testid attributes; not unit-covered surface.
  • Coverage matrix updated — N/A: behaviour-only / test-only change.
  • Affected feature IDs listed — N/A: no feature behaviour change.
  • No new external network dependencies — uses the existing mock backend.
  • Manual smoke checklist — N/A: no release-cut surface change.
  • Linked issue closed — no tracking issue.

Impact

  • Desktop E2E (CI) only. No runtime/product behaviour change beyond two added data-testid attributes. No perf/security/migration impact.

Related

  • Closes:
  • Follow-up PR(s)/TODOs: telegram/cross-channel listener (needs dynamic channel-listener lifecycle on channels_connect); a few pre-existing flaky/edge specs (mid-stream cancel, autonomy save, onboarding-advanced Welcome→custom transition, Jira connect-modal CONNECTING seed).

AI Authored PR Metadata

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: senamakel-droid:e2e-suite-fixes
  • Commit SHA: 3330cee6fcdcf67834e13070f3dc0b4e48c87a31

Validation Run

  • pnpm --filter openhuman-app format:check — N/A (E2E specs; ESLint run on all changed files, clean)
  • pnpm typecheck — passes
  • Focused tests: full Linux E2E suite (6 shards) run repeatedly to validate; 83 baseline failures → chat green, foundation 21→3, settings/nav green
  • Rust fmt/check — N/A (no Rust changes; net diff is test-only + 2 testids)
  • Tauri fmt/check — N/A

Behavior Changes

  • Intended behavior change: none (test maintenance + 2 data-testid attributes)
  • User-visible effect: none

Parity Contract

  • Legacy behavior preserved: yes — only test expectations realigned to the shipped IA
  • Guard/fallback/dispatch parity checks: N/A

Duplicate / Superseded PR Handling

  • Duplicate PR(s): N/A
  • Canonical PR: this
  • Resolution: N/A

Summary by CodeRabbit

  • New Features

    • Expanded onboarding wizard with Custom Activity and Custom Vault steps.
  • Navigation & UI Updates

    • Intelligence moved into Brain; Webhooks moved to Integrations.
    • Command Palette labels updated to "Go to Connections" and "Go to Knowledge & Memory."
    • Analytics label renamed to "Share Product Analytics and Diagnostics."
    • Channel selection exposes stable identifiers for reliable selection.
  • Chores / Stability

    • E2E: manual workflow dispatch options, improved chat readiness checks across tests, and optional clearing of persisted auth during test resets.

@senamakel-droid senamakel-droid requested a review from a team June 13, 2026 16:24
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 60611e92-4250-4e53-8b24-fd783c44d33a

📥 Commits

Reviewing files that changed from the base of the PR and between e2caef8 and f724c43.

📒 Files selected for processing (33)
  • .github/workflows/e2e.yml
  • app/src/components/channels/ChannelSelector.tsx
  • app/src/pages/Skills.tsx
  • app/test/e2e/helpers/chat-harness.ts
  • app/test/e2e/helpers/reset-app.ts
  • app/test/e2e/helpers/shared-flows.ts
  • app/test/e2e/specs/chat-conversation-history.spec.ts
  • app/test/e2e/specs/chat-harness-cancel.spec.ts
  • app/test/e2e/specs/chat-harness-scroll-render.spec.ts
  • app/test/e2e/specs/chat-harness-send-stream.spec.ts
  • app/test/e2e/specs/chat-harness-subagent-continue.spec.ts
  • app/test/e2e/specs/chat-harness-subagent.spec.ts
  • app/test/e2e/specs/chat-harness-wallet-flow.spec.ts
  • app/test/e2e/specs/chat-multi-tool-round.spec.ts
  • app/test/e2e/specs/chat-tool-call-flow.spec.ts
  • app/test/e2e/specs/chat-tool-error-recovery.spec.ts
  • app/test/e2e/specs/command-palette.spec.ts
  • app/test/e2e/specs/conversations-web-channel-flow.spec.ts
  • app/test/e2e/specs/harness-channel-bridge-flow.spec.ts
  • app/test/e2e/specs/harness-cron-prompt-flow.spec.ts
  • app/test/e2e/specs/harness-search-tool-flow.spec.ts
  • app/test/e2e/specs/insights-dashboard.spec.ts
  • app/test/e2e/specs/navigation-settings-panels.spec.ts
  • app/test/e2e/specs/navigation-smoothness.spec.ts
  • app/test/e2e/specs/onboarding-modes.spec.ts
  • app/test/e2e/specs/ptt-flow.spec.ts
  • app/test/e2e/specs/runtime-picker-login.spec.ts
  • app/test/e2e/specs/settings-account-preferences.spec.ts
  • app/test/e2e/specs/settings-advanced-config.spec.ts
  • app/test/e2e/specs/settings-channels-permissions.spec.ts
  • app/test/e2e/specs/settings-feature-preferences.spec.ts
  • app/test/e2e/specs/user-journey-full-task.spec.ts
  • app/test/e2e/specs/webhooks-tunnel-flow.spec.ts
✅ Files skipped from review due to trivial changes (1)
  • app/src/pages/Skills.tsx
🚧 Files skipped from review as they are similar to previous changes (27)
  • app/test/e2e/specs/harness-search-tool-flow.spec.ts
  • app/test/e2e/specs/chat-harness-subagent-continue.spec.ts
  • app/test/e2e/specs/chat-multi-tool-round.spec.ts
  • app/test/e2e/specs/command-palette.spec.ts
  • app/test/e2e/specs/chat-harness-wallet-flow.spec.ts
  • app/src/components/channels/ChannelSelector.tsx
  • app/test/e2e/specs/chat-tool-call-flow.spec.ts
  • app/test/e2e/specs/chat-tool-error-recovery.spec.ts
  • app/test/e2e/helpers/reset-app.ts
  • app/test/e2e/specs/settings-account-preferences.spec.ts
  • app/test/e2e/specs/chat-harness-scroll-render.spec.ts
  • app/test/e2e/specs/user-journey-full-task.spec.ts
  • app/test/e2e/specs/settings-advanced-config.spec.ts
  • app/test/e2e/specs/navigation-settings-panels.spec.ts
  • app/test/e2e/specs/harness-cron-prompt-flow.spec.ts
  • app/test/e2e/specs/chat-harness-cancel.spec.ts
  • app/test/e2e/specs/webhooks-tunnel-flow.spec.ts
  • app/test/e2e/specs/settings-channels-permissions.spec.ts
  • app/test/e2e/specs/conversations-web-channel-flow.spec.ts
  • app/test/e2e/specs/chat-harness-subagent.spec.ts
  • .github/workflows/e2e.yml
  • app/test/e2e/specs/chat-harness-send-stream.spec.ts
  • app/test/e2e/specs/navigation-smoothness.spec.ts
  • app/test/e2e/specs/onboarding-modes.spec.ts
  • app/test/e2e/specs/runtime-picker-login.spec.ts
  • app/test/e2e/specs/insights-dashboard.spec.ts
  • app/test/e2e/specs/settings-feature-preferences.spec.ts

📝 Walkthrough

Walkthrough

Adds workflow_dispatch inputs, stable channel testids, a chat-harness mount helper, optional session clearing for test isolation, redirect-aware hash navigation, and updates many E2E specs to use new helpers and revised routes/labels.

Changes

E2E Testing Infrastructure & Spec Updates

Layer / File(s) Summary
Workflow dispatch and component test selectors
.github/workflows/e2e.yml, app/src/components/channels/ChannelSelector.tsx, app/src/pages/Skills.tsx
Adds workflow_dispatch boolean inputs (run_linux, run_macos, run_windows, full) and adds data-testid="channel-select-${channelId}" to channel selection buttons.
Chat harness helpers refactoring
app/test/e2e/helpers/chat-harness.ts
clickByTitle now prefers stable data-testid="new-thread-button" for New thread and tolerates title suffixes; adds exported chatMounted() helper that polls for chat mount readiness via testid or composer textarea.
Reset app with optional session clearing
app/test/e2e/helpers/reset-app.ts
Adds clearAuthSession?: boolean to ResetAppOptions; when enabled calls openhuman.auth_clear_session after test_reset (errors logged non-fatally) to remove on-disk auth session.
Navigation routing helpers rewrite
app/test/e2e/helpers/shared-flows.ts
Introduce HASH_REDIRECTS/resolveRedirect; remove root innerText heuristic; waitForHashRouteReady uses document.readyState, route-specific readySelector, or hash stabilization as readiness.
Chat specs & broad e2e updates
app/test/e2e/specs/*, app/test/e2e/helpers/*
~30+ specs import and use chatMounted() instead of waiting for “Threads”; many specs update routes, deep-links, and UI text assertions; some suites call resetApp(..., { clearAuthSession: true }).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • M3gA-Mind

"🐰 Chat mounts now wait with care,
No 'Threads' text hides anywhere,
Routes redirect, sessions clear,
Tests click steady, selectors near,
E2E hops along — a rabbit’s cheer! 🥕✨"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test(e2e): repair desktop Appium suite after IA refactors' clearly and specifically summarizes the main change: fixing E2E tests following information architecture refactors.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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


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.

@coderabbitai coderabbitai Bot added the working A PR that is being worked on by the team. label Jun 13, 2026

@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: 3330cee6fc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread app/test/e2e/helpers/shared-flows.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
app/test/e2e/specs/runtime-picker-login.spec.ts (1)

208-223: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the stale timeout comment to match the new deadline.

Line 208 still says “Polling up to 20s,” but Line 222 now waits 45_000ms. Please align the comment to avoid confusion during triage.

✏️ Proposed fix
-    // Polling up to 20s for the connection result + potential accessibility tree dump.
+    // Polling up to 45s for the connection result + potential accessibility tree dump.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/test/e2e/specs/runtime-picker-login.spec.ts` around lines 208 - 223,
Update the stale explanatory comment that currently reads "Polling up to 20s for
the connection result + potential accessibility tree dump." to reflect the
actual wait time used: replace it with a comment indicating the 45s deadline
(e.g. "Polling up to 45s for the connection result + potential accessibility
tree dump.") so it matches the Deadline/timeout logic (see this.timeout(60_000)
and the deadline = Date.now() + 45_000 in runtime-picker-login.spec.ts).
🧹 Nitpick comments (1)
app/src/pages/Skills.tsx (1)

1-1176: ⚖️ Poor tradeoff

Consider breaking this 1176-line file into smaller modules.

The coding guidelines recommend keeping frontend files to ≤ ~500 lines. This file exceeds that by more than 2×. Consider extracting the tab-specific rendering logic (composio grid, channels section, MCP, meetings, skills explorer) and the various tile/card components into separate focused modules.

Since this PR is test-infrastructure-focused, this refactor can be deferred to a future PR.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/pages/Skills.tsx` around lines 1 - 1176, The file is too large (>1k
LOC); extract tab-specific UI and tile components into smaller modules: move
ComposioConnectorTile, ChannelTile, ComposioApiKeyEmptyState, BUILT_IN_SKILLS,
renderGroup (or its JSX into a SkillsGroup component), and the
composio/channels/mcp/meetings/skills explorer render blocks into their own
files and import them from Skills (so Skills only orchestrates state and chooses
which subcomponent to render); if you prefer to defer refactoring now, create a
tracked issue and add a top-of-file TODO comment pointing to that issue and
briefly listing the symbols to extract (ComposioConnectorTile, ChannelTile,
ComposioApiKeyEmptyState, BUILT_IN_SKILLS, renderGroup, and the
composio/channels/mcp/meetings/skills tab renderers) so future PRs can pick up
the work.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/test/e2e/helpers/shared-flows.ts`:
- Around line 214-224: The current settle check returns true for any non-empty
stabilized hash, causing false positives; update the logic in the block that
reads cur, expected, lastHash, and stableCount so that it only returns true when
the current hash equals the expected resolved target, or when there is no
expected target (e.g., expected is null/undefined) and the hash has stabilized
(cur && cur === lastHash && stableCount >= 2); remove the unconditional
"stableCount >= 2" return for non-matching hashes and ensure the initial
exact-match short-circuit (if (cur === expected) return true) remains.

In `@app/test/e2e/specs/conversations-web-channel-flow.spec.ts`:
- Around line 87-90: The timeout message is stale: update the timeoutMsg in the
browser.waitUntil call that uses chatMounted() to reflect the new mount
detection (replace "Conversations did not mount (Threads heading missing)" with
a message referencing the chat mount check, e.g. "Conversations did not mount
(chat component missing)"), so the error matches the chatMounted() logic.

---

Outside diff comments:
In `@app/test/e2e/specs/runtime-picker-login.spec.ts`:
- Around line 208-223: Update the stale explanatory comment that currently reads
"Polling up to 20s for the connection result + potential accessibility tree
dump." to reflect the actual wait time used: replace it with a comment
indicating the 45s deadline (e.g. "Polling up to 45s for the connection result +
potential accessibility tree dump.") so it matches the Deadline/timeout logic
(see this.timeout(60_000) and the deadline = Date.now() + 45_000 in
runtime-picker-login.spec.ts).

---

Nitpick comments:
In `@app/src/pages/Skills.tsx`:
- Around line 1-1176: The file is too large (>1k LOC); extract tab-specific UI
and tile components into smaller modules: move ComposioConnectorTile,
ChannelTile, ComposioApiKeyEmptyState, BUILT_IN_SKILLS, renderGroup (or its JSX
into a SkillsGroup component), and the composio/channels/mcp/meetings/skills
explorer render blocks into their own files and import them from Skills (so
Skills only orchestrates state and chooses which subcomponent to render); if you
prefer to defer refactoring now, create a tracked issue and add a top-of-file
TODO comment pointing to that issue and briefly listing the symbols to extract
(ComposioConnectorTile, ChannelTile, ComposioApiKeyEmptyState, BUILT_IN_SKILLS,
renderGroup, and the composio/channels/mcp/meetings/skills tab renderers) so
future PRs can pick up the work.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7a74bcfc-a6f7-42f0-a238-ccb17008e26e

📥 Commits

Reviewing files that changed from the base of the PR and between 58f210e and 3330cee.

📒 Files selected for processing (33)
  • .github/workflows/e2e.yml
  • app/src/components/channels/ChannelSelector.tsx
  • app/src/pages/Skills.tsx
  • app/test/e2e/helpers/chat-harness.ts
  • app/test/e2e/helpers/reset-app.ts
  • app/test/e2e/helpers/shared-flows.ts
  • app/test/e2e/specs/chat-conversation-history.spec.ts
  • app/test/e2e/specs/chat-harness-cancel.spec.ts
  • app/test/e2e/specs/chat-harness-scroll-render.spec.ts
  • app/test/e2e/specs/chat-harness-send-stream.spec.ts
  • app/test/e2e/specs/chat-harness-subagent-continue.spec.ts
  • app/test/e2e/specs/chat-harness-subagent.spec.ts
  • app/test/e2e/specs/chat-harness-wallet-flow.spec.ts
  • app/test/e2e/specs/chat-multi-tool-round.spec.ts
  • app/test/e2e/specs/chat-tool-call-flow.spec.ts
  • app/test/e2e/specs/chat-tool-error-recovery.spec.ts
  • app/test/e2e/specs/command-palette.spec.ts
  • app/test/e2e/specs/conversations-web-channel-flow.spec.ts
  • app/test/e2e/specs/harness-channel-bridge-flow.spec.ts
  • app/test/e2e/specs/harness-cron-prompt-flow.spec.ts
  • app/test/e2e/specs/harness-search-tool-flow.spec.ts
  • app/test/e2e/specs/insights-dashboard.spec.ts
  • app/test/e2e/specs/navigation-settings-panels.spec.ts
  • app/test/e2e/specs/navigation-smoothness.spec.ts
  • app/test/e2e/specs/onboarding-modes.spec.ts
  • app/test/e2e/specs/ptt-flow.spec.ts
  • app/test/e2e/specs/runtime-picker-login.spec.ts
  • app/test/e2e/specs/settings-account-preferences.spec.ts
  • app/test/e2e/specs/settings-advanced-config.spec.ts
  • app/test/e2e/specs/settings-channels-permissions.spec.ts
  • app/test/e2e/specs/settings-feature-preferences.spec.ts
  • app/test/e2e/specs/user-journey-full-task.spec.ts
  • app/test/e2e/specs/webhooks-tunnel-flow.spec.ts

Comment thread app/test/e2e/helpers/shared-flows.ts
Comment thread app/test/e2e/specs/conversations-web-channel-flow.spec.ts
@senamakel-droid senamakel-droid force-pushed the e2e-suite-fixes branch 2 times, most recently from 091b69f to e2caef8 Compare June 13, 2026 19:13
…ai#3611/tinyhumansai#3632/tinyhumansai#3643/tinyhumansai#3646)

Frontend IA refactors broke the WDIO/Appium E2E suite (baseline 83 failing
specs). Test-only changes plus two one-line data-testid additions. Validated
by running the full Linux E2E suite to green on a fork (see PR for RCAs).
@senamakel senamakel merged commit 6ceee18 into tinyhumansai:main Jun 13, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants