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

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
AusAgentSmith pushed a commit to AusAgentSmith/openhuman that referenced this pull request May 23, 2026
* Refactor BillingPanel to use updated user usage structure

- Changed the usage data source in BillingPanel from activeTeam to user, aligning with the new IUserUsage interface.
- Updated the display of token usage percentage and progress bar to reflect the new usage metrics (spentThisCycleUsd and cycleBudgetUsd).
- Cleaned up commented-out code and improved layout for better readability and user experience.

* Add skill ping/health-check system for connection monitoring

Periodic (5-min) onPing() calls verify skill service connections are
healthy. Auth errors stop the skill; network errors update connection
status while keeping the skill running for retry. Skills without onPing
are treated as healthy (backward compatible).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Move skill ping/health-check from frontend to Rust backend

The frontend ping loop only runs while React is active, but the Rust
backend keeps skills running independently. This adds a PingScheduler
(modeled after CronScheduler) that pings all running skills every 5
minutes from a background Tokio task and acts on auth/network failures.
The redundant frontend ping loop is removed since SkillProvider already
listens for the Tauri events the Rust scheduler emits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor package-and-publish workflow for consistency

Updated formatting in the package-and-publish.yml file to use consistent quotation styles for strings. Removed unnecessary branch entry from the pull_request section to streamline the workflow configuration.

* Update logging configuration and adjust ping interval for improved performance

- Enhanced logging setup in `lib.rs` to allow customizable verbosity and color-coded output based on log levels and tags.
- Reduced ping interval in `ping_scheduler.rs` from 5 minutes to 1 minute for more frequent health checks on skills.
- Added functionality to suppress TDLib's native C++ logs based on environment variable settings in `manager.rs`.

* Update subproject commit reference in skills directory and remove logging from get_session_token function for improved security

* Enhance error handling in skill message processing

- Added a new `Error` variant to the `SkillMessage` enum to notify skills of errors from async operations, including error type, message, source, and recoverability.
- Updated the `handle_message` function to handle `SkillMessage::Error`, invoking the `onError` JavaScript handler and logging any failures in the handler execution.
- Updated subproject commit reference in the skills directory.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
AusAgentSmith pushed a commit to AusAgentSmith/openhuman that referenced this pull request May 23, 2026
…ests (tinyhumansai#85)

* feat(onboarding): introduce DEV_FORCE_ONBOARDING flag to control onboarding 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.

* feat(daemon): refactor daemon health monitoring and window management

- 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.

* refactor(daemonHealthService): streamline imports and simplify tool object 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.
YellowSnnowmann added a commit to YellowSnnowmann/openhuman that referenced this pull request Aug 24, 2026
tinymemory v1.3.0 is the first release carrying the four Maintenance members
this PR calls — store_stats, queue_stats and latest_queue_failure (tinyhumansai#85),
retry_failed (tinyhumansai#86) — plus backfill_in_progress (tinyhumansai#89). v1.2.0 was cut before
all three merged, so against it these calls answer UnknownMethod and
pipeline_status, backfill_status and the retry control break with them. That
is what the do-not-merge note on this PR was about; it no longer applies.

Digests are taken verbatim from the release's own checksum.toml, never
recomputed from a local build — a locally recomputed digest agrees with
itself no matter what was served. All eleven platform archives verified
against the published manifest.

Both lockfiles move, because the facade's version went 1.2.0 -> 1.3.0 and
`--locked` in CI reads the root while the shell lane reads its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
senamakel added a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
…llingPanel to use updated user usage structure\n\n- Changed the usage data source in BillingPanel from activeTeam to user, aligning with the new IUserUsage interface.\n- Updated the display of token usage percentage and progress bar to reflect the new usage metrics (spentThisCycleUsd and cycleBudgetUsd).\n- Cleaned up commented-out code and improved layout for better readability and user experience.\n\n* Add skill ping/health-check system for connection monitoring\n\nPeriodic (5-min) onPing() calls verify skill service connections are\nhealthy. Auth errors stop the skill; network errors update connection\nstatus while keeping the skill running for retry. Skills without onPing\nare treated as healthy (backward compatible).\n\n\n* Move skill ping/health-check from frontend to Rust backend\n\nThe frontend ping loop only runs while React is active, but the Rust\nbackend keeps skills running independently. This adds a PingScheduler\n(modeled after CronScheduler) that pings all running skills every 5\nminutes from a background Tokio task and acts on auth/network failures.\nThe redundant frontend ping loop is removed since SkillProvider already\nlistens for the Tauri events the Rust scheduler emits.\n\n\n* Refactor package-and-publish workflow for consistency\n\nUpdated formatting in the package-and-publish.yml file to use consistent quotation styles for strings. Removed unnecessary branch entry from the pull_request section to streamline the workflow configuration.\n\n* Update logging configuration and adjust ping interval for improved performance\n\n- Enhanced logging setup in `lib.rs` to allow customizable verbosity and color-coded output based on log levels and tags.\n- Reduced ping interval in `ping_scheduler.rs` from 5 minutes to 1 minute for more frequent health checks on skills.\n- Added functionality to suppress TDLib's native C++ logs based on environment variable settings in `manager.rs`.\n\n* Update subproject commit reference in skills directory and remove logging from get_session_token function for improved security\n\n* Enhance error handling in skill message processing\n\n- Added a new `Error` variant to the `SkillMessage` enum to notify skills of errors from async operations, including error type, message, source, and recoverability.\n- Updated the `handle_message` function to handle `SkillMessage::Error`, invoking the `onError` JavaScript handler and logging any failures in the handler execution.\n- Updated subproject commit reference in the skills directory.\n\n---------\n\n
senamakel added a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
…ests (tinyhumansai#85)\n\n* feat(onboarding): introduce DEV_FORCE_ONBOARDING flag to control onboarding flow\n\n- Added DEV_FORCE_ONBOARDING configuration to bypass onboarding checks during development.\n- Updated onboarding logic in AppRoutes to respect the new flag, ensuring onboarding is always shown when enabled.\n- Introduced new utility functions for managing onboarding state based on the flag.\n- Updated Cargo.lock and Cargo.toml to reflect dependency changes and version updates.\n- Removed deprecated openhuman command module and refactored related functionalities into daemon_host module for better organization.\n\n* feat(daemon): refactor daemon health monitoring and window management\n\n- Updated DaemonHealthService to use polling via `openhuman.health_snapshot` instead of event listening for health updates.\n- Introduced a new focusMainWindow function to centralize window focus logic across deep link handling and Tauri commands.\n- Replaced `invoke` calls with direct window management methods for showing, hiding, and toggling the main window.\n- Removed deprecated core_rpc module and related commands for improved organization and clarity.\n- Updated Cargo.toml and Cargo.lock to reflect dependency changes.\n\n* refactor(daemonHealthService): streamline imports and simplify tool object structure\n\n- Moved the import of `callCoreRpc` to a more appropriate location in DaemonHealthService.\n- Simplified the structure of the tools object in the aiGetConfig function for better readability.\n- Ensured consistency in Tauri command invocations by removing unnecessary line breaks.\n
senamakel pushed a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
…\ntinymemory v1.3.0 is the first release carrying the four Maintenance members\nthis PR calls — store_stats, queue_stats and latest_queue_failure (tinyhumansai#85),\nretry_failed (tinyhumansai#86) — plus backfill_in_progress (tinyhumansai#89). v1.2.0 was cut before\nall three merged, so against it these calls answer UnknownMethod and\npipeline_status, backfill_status and the retry control break with them. That\nis what the do-not-merge note on this PR was about; it no longer applies.\n\nDigests are taken verbatim from the release's own checksum.toml, never\nrecomputed from a local build — a locally recomputed digest agrees with\nitself no matter what was served. All eleven platform archives verified\nagainst the published manifest.\n\nBoth lockfiles move, because the facade's version went 1.2.0 -> 1.3.0 and\n`--locked` in CI reads the root while the shell lane reads its own.\n\n
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