Skip to content

feat(e2e): file-based auth injection and deep link delivery for E2E tests#85

Merged
senamakel merged 3 commits into
tinyhumansai:mainfrom
senamakel:fix/cleanup-tauri
Mar 30, 2026
Merged

feat(e2e): file-based auth injection and deep link delivery for E2E tests#85
senamakel merged 3 commits into
tinyhumansai:mainfrom
senamakel:fix/cleanup-tauri

Conversation

@senamakel
Copy link
Copy Markdown
Member

Summary

  • Rust E2E bridge (e2e_bridge.rs): reads .e2e_auth file at startup and polls .e2e_pending_deep_link for runtime deep links, all guarded by OPENHUMAN_WORKSPACE env var — inert in production
  • Frontend E2E bridge (e2eBridge.ts): invokes the Rust command to inject auth token into Redux on startup
  • Deep link event listener: frontend listens for e2e:deep-link Tauri events emitted by the Rust poller
  • E2E helpers: seedAuthForE2e() pre-seeds auth state before app launch; triggerDeepLink() uses file-based delivery as primary path
  • Workspace sentinel files: e2e-run-spec.sh writes workspace path to /tmp and $HOME sentinel files for discovery when env vars can't be forwarded (XCUITest/Appium mac2)
  • Tauri shell cleanup: removes unused commands, simplifies lib.rs to sidecar lifecycle + deep-link focus

Known Issues

  • XCUITest (Appium mac2) does not reliably forward environment variables or allow reading sentinel files from the launched app process. The file-based deep link mechanism works correctly outside of XCUITest (direct launch, open -a). Further work needed to resolve the XCUITest sandbox restrictions — potential approaches include defaults write (NSUserDefaults) or embedding workspace config in the app bundle.

Test plan

  • cargo check — Rust compiles with all changes
  • tsc --noEmit — TypeScript compiles
  • Smoke E2E test passes (3/3) via e2e-run-spec.sh
  • Login flow E2E test — blocked by XCUITest env var forwarding (see known issues)
  • Full E2E suite — pending login flow fix

🤖 Generated with Claude Code

…arding flow

- Added DEV_FORCE_ONBOARDING configuration to bypass onboarding checks during development.
- Updated onboarding logic in AppRoutes to respect the new flag, ensuring onboarding is always shown when enabled.
- Introduced new utility functions for managing onboarding state based on the flag.
- Updated Cargo.lock and Cargo.toml to reflect dependency changes and version updates.
- Removed deprecated openhuman command module and refactored related functionalities into daemon_host module for better organization.
- Updated DaemonHealthService to use polling via `openhuman.health_snapshot` instead of event listening for health updates.
- Introduced a new focusMainWindow function to centralize window focus logic across deep link handling and Tauri commands.
- Replaced `invoke` calls with direct window management methods for showing, hiding, and toggling the main window.
- Removed deprecated core_rpc module and related commands for improved organization and clarity.
- Updated Cargo.toml and Cargo.lock to reflect dependency changes.
…bject structure

- Moved the import of `callCoreRpc` to a more appropriate location in DaemonHealthService.
- Simplified the structure of the tools object in the aiGetConfig function for better readability.
- Ensured consistency in Tauri command invocations by removing unnecessary line breaks.
@senamakel senamakel merged commit 24fc777 into tinyhumansai:main Mar 30, 2026
6 of 10 checks passed
@senamakel senamakel deleted the fix/cleanup-tauri branch March 31, 2026 00:55
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