refactor(tauri): reduce desktop host to sidecar lifecycle + deep-link#84
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/src-tauridown to a thin desktop host that only handles sidecar lifecycle and deep-link plumbing.reqwest) and updates capabilities accordingly.openhuman.service_*RPC so frontend can call through core directly.Problem
Solution
app/src-tauri/src/lib.rsto keep only:core_rpc_urlcommand for frontend base URL resolutionapp/src-tauri/src/commands,core_rpc.rs, andutils.tokio::net::TcpStream) instead of HTTPreqwestping.daemonHealthServicenow pollsopenhuman.health_snapshotviacallCoreRpcinstead of listening to Tauri-emittedopenhuman:healthevents.@tauri-apps/api/windowinstead of Rust invoke command.tauriCommands.tsnow use frontend APIs or direct core RPC.openhuman.service_daemon_host_get/openhuman.service_daemon_host_sethandlers in service schemas/ops.Submission Checklist
yarn typecheck,cargo checkroot +app/src-tauri)Impact
app/src-tauri.Related
invoke(...)paths in frontend (exchange_token,conscious_loop_run,runtime_*) with direct core RPC or frontend-native APIs where appropriate..husky/pre-pushto re-check after auto-fix (currently fails if initial format/lint fails even when fixed).