Commit Graph
192 Commits
Author SHA1 Message Date
Steven EnamakelandGitHub 36a3f3fa65 feat: Memory subtabs + WebGL memory graph; drop Knowledge Vaults (#3040) 2026-05-30 20:21:58 -07:00
b37bab7134 feat(vault): expose approved markdown writes (#2936)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-30 09:19:34 -07:00
8c23721de6 fix(local-ai): unblock summary diagnostics (#2940)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-30 00:57:39 -07:00
Steven EnamakelandGitHub 4c911240df feat(search): add registry-backed search module (#2999) 2026-05-29 19:41:01 -07:00
886c4a6342 feat: proactive agent task pipeline — dispatcher, approval, executors, write-back (#2974)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-29 14:26:31 -07:00
Steven EnamakelGitHubcyrus@tinyhumans.ai <cyrus@tinyhumans.ai>
29bf148f38 feat(task-sources): proactive task ingestion from GitHub/Notion/Linear/ClickUp (#2894)
Co-authored-by: cyrus@tinyhumans.ai <cyrus@tinyhumans.ai>
2026-05-29 19:30:34 +05:30
Steven EnamakelGitHubcyrus@tinyhumans.ai <cyrus@tinyhumans.ai>
3e59548f12 Enrich agent task board workflow (#2891)
Co-authored-by: cyrus@tinyhumans.ai <cyrus@tinyhumans.ai>
2026-05-29 19:19:03 +05:30
Mega MindGitHubsanil-23Claude Opus 4.7sanil-23cyrus@tinyhumans.ai <cyrus@tinyhumans.ai>Steven Enamakel
db3fdc2e6c feat(skills): scheduled dashboard + run/new pages + [github] preflight gate + composio-only GitHub I/O (#2882)
Co-authored-by: sanil-23 <sanil@alphahuman.xyz>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: sanil-23 <sanil@vezures.xyz>
Co-authored-by: cyrus@tinyhumans.ai <cyrus@tinyhumans.ai>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-29 10:17:58 +05:30
5a5cd43ea9 feat(search): add Querit provider (#2753)
Co-authored-by: wangxinwei03 <wangxinwei03@MacBook-Pro.local>
2026-05-28 21:06:26 -07:00
cd6acd557d refactor(memory): route Obsidian deep link through workspace-link layer (#2492) (#2702)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
2026-05-28 20:30:57 -07:00
d9f4139ef4 mergeTooShort() never merges a short first segment (#2615)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-28 18:01:23 -07:00
f407065635 feat(intelligence): add architecture diagram viewer (#2687)
Signed-off-by: sunilkumarvalmiki <g.sunilkumarvalmiki@gmail.com>
Co-authored-by: sanil-23 <sanil@vezures.xyz>
2026-05-29 04:12:32 +05:30
5e47a6666a feat(migration): add Hermes Agent memory importer (#1440) (#2799)
Co-authored-by: sanil-23 <sanil@vezures.xyz>
2026-05-28 20:38:37 +05:30
YellowSnnowmannandGitHub 129abfe8a4 feat(chat): render agent-bubble LaTeX with KaTeX and safe math detection (#2697) 2026-05-27 18:36:31 -07:00
21ab20f105 feat(memory-tree): status panel + on/off toggle (#1856 Part 1) (#2719)
Co-authored-by: Claude <noreply@anthropic.com>
2026-05-27 20:09:59 +05:30
Steven EnamakelandGitHub 93bad388f8 feat(analytics): dual GA4 + OpenPanel, disable Sentry profiling (#2750) 2026-05-27 17:00:07 +05:30
Mega MindandGitHub 7048f394dc fix(tools): normalise persisted tool names on read to fix web-search toggle revert (#2744) 2026-05-27 16:18:14 +05:30
YellowSnnowmannandGitHub ee63a9ddbc fix(e2e/oauth): gate Redux store exposure and fix loopback listener timeout race (#2670) 2026-05-27 15:24:23 +05:30
sanil-23andGitHub 0fddf1120f feat(approval): consolidate on ApprovalGate + persistent "Always allow" list (#2706) 2026-05-27 05:54:24 +05:30
77c15cb868 feat(search): unified web-access firewall (fetch + browser) with tri-state Allowed-websites control + friendly block errors (#2704)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 01:15:00 +05:30
Mega MindandGitHub c42e24960b fix: runtime snapshot timeouts, config perms, stale lock recovery, summarization-v1 tier, loopback OAuth UX (#2690) 2026-05-26 16:42:16 +05:30
Steven EnamakelandGitHub e7e7e8a951 Migrate E2E coverage to Playwright (#2610) 2026-05-25 23:38:34 -07:00
0a9f7a0e99 feat(agent): agentic coding runtime — gated OS capabilities (filesystem, shell, install) via deterministic permission tiers + chat approvals (#2631)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 12:00:59 +05:30
e05cab9bb2 fix(memory-workspace): detect Obsidian vault registration before deep link (#2638)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 02:25:21 +05:30
c244f5875a fix: harden workspace routing and local-first gates (#2445)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-25 09:15:40 -07:00
oxoxDevandGitHub c28d9dac0b fix(app): guard CEF IPC fallback sync throw via safeInvoke wrapper (Sentry TAURI-REACT-7 + 6) (#2619) 2026-05-25 09:15:16 -07:00
Steven EnamakelandGitHub 2903607491 feat(voice): add voice provider registry with third-party STT/TTS support (#2586) 2026-05-24 18:25:31 -07:00
fa62b7be2a feat(auth): add local offline login (#2208)
Co-authored-by: shadowdoggie <shadowdoggie@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-24 15:20:35 -07:00
Steven EnamakelandGitHub 76ce014e20 fix(ai): route local inference through provider router + revamp settings UI (#2580) 2026-05-24 14:51:25 -07:00
Steven EnamakelandGitHub b62409a0cf perf(e2e): full-suite hardening — sharded build/test, loopback auth, +23 specs (#2578) 2026-05-24 13:21:33 -07:00
Steven EnamakelandGitHub d52abe5524 fix(ai): add OpenRouter OAuth provider flow (#2571) 2026-05-24 10:01:58 -07:00
Steven EnamakelandGitHub 85e84210db feat: prod-test 2026-05-23 — composer, settings reorg, MCP/search, alpha banners (#2554) 2026-05-23 19:36:31 -07:00
Steven EnamakelandGitHub 4c6007b662 fix(oauth): make loopback redirect actually work, plus settings cleanup (#2550) 2026-05-23 10:35:44 -07:00
48548a223b feat(app): UI control for max_actions_per_hour (#2486) (#2500)
Co-authored-by: Chen Qian <cq@Chens-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 00:52:54 -07:00
Steven EnamakelandGitHub bbec0d61f9 feat(auth): loopback OAuth redirect with deep-link fallback (#2511) 2026-05-22 21:57:50 -07:00
ae6909f66b feat(tauri): support workspace file links (#2476)
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-22 19:41:21 -07:00
333bd52842 fix(config): log RPC URL and core mode as strings, not object wrappers (#2459)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-22 19:40:15 -07:00
27bea247cf fix(auth): deliver OAuth JWT to remote core in cloud mode (#2453)
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-22 19:34:21 -07:00
03d1e2512e feat(e2e): complete E2E v2 suite — 66 specs, orchestrator, bug fixes (#2353)
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-22 17:23:01 -07:00
3e22ffeedf fix(app): normalize cloud core RPC URLs
## Summary

- Normalize cloud core URLs so users can paste a core base URL like `https://example.trycloudflare.com` and still reach the JSON-RPC endpoint.
- Apply the same normalization in the cloud-mode picker, persisted URL reads/writes, restored core mode state, and direct RPC probing.
- Add regression coverage for Cloudflare-style base URLs, existing `/rpc` URLs, and previously persisted base URLs.

## Problem

- Users connecting the desktop client to a self-hosted core through Cloudflare Tunnel may paste the tunnel base URL instead of the `/rpc` endpoint.
- The core root is reachable, but JSON-RPC calls belong on `/rpc`; using the base URL can make the connection flow fail even though the tunnel itself is healthy.
- The issue report surfaced this as a 405 during remote-core connection setup.

## Solution

- Extend `normalizeRpcUrl` to append `/rpc` when the input URL has no path, while preserving existing `/rpc` URLs and non-root paths.
- Reuse `normalizeRpcUrl` across `BootCheckGate`, `coreRpcClient`, `configPersistence`, and `coreModeSlice` so test connection, boot check, cached URL resolution, and localStorage restoration all agree.
- Keep existing HTTP restrictions unchanged: public cloud URLs still require HTTPS, while local/private HTTP hosts remain allowed.

## Submission Checklist

> If a section does not apply to this change, mark the item as `N/A` with a one-line reason. Do not delete items.

- [x] Tests added or updated (happy path + at least one failure / edge case) per [Testing Strategy](../gitbooks/developing/testing-strategy.md#failure-path-requirement)
- [x] **Diff coverage >= 80%** — focused Vitest coverage was added for the changed URL normalization paths; CI will enforce the merged diff-coverage gate.
- [x] Coverage matrix updated — N/A: behaviour-only cloud URL normalization fix; no feature matrix row added/removed/renamed.
- [x] All affected feature IDs from the matrix are listed in the PR description under `## Related` — N/A: no coverage-matrix feature ID touched.
- [x] No new external network dependencies introduced (mock backend used per [Testing Strategy](../gitbooks/developing/testing-strategy.md#mock-policy))
- [x] Manual smoke checklist updated if this touches release-cut surfaces ([`docs/RELEASE-MANUAL-SMOKE.md`](../docs/RELEASE-MANUAL-SMOKE.md)) — N/A: no release-cut smoke checklist surface changed.
- [x] Linked issue closed via `Closes #NNN` in the `## Related` section

## Impact

- Runtime/platform: desktop/web app cloud-core connection setup and RPC URL resolution.
- Compatibility: existing stored `/rpc` URLs continue to resolve unchanged; previously stored base URLs now self-heal on read.
- Security: public HTTP cloud URLs are still rejected; no auth behavior or token storage behavior changes.

## Related

- Closes #2467
- Follow-up PR(s)/TODOs: none

---

## AI Authored PR Metadata (required for Codex/Linear PRs)

> Keep this section for AI-authored PRs. For human-only PRs, mark each field `N/A`.

### Linear Issue
- Key: N/A
- URL: N/A

### Commit & Branch
- Branch: `yuhao/fix-remote-core-cloudflare-2467`
- Commit SHA: `5e95aeed8a97acee5823d73b6dc8e92f04af00fb`

### Validation Run
- [x] `pnpm --filter openhuman-app format:check`
- [x] `pnpm typecheck`
- [x] Focused tests: `pnpm --dir app exec vitest run --config test/vitest.config.ts src/services/__tests__/coreRpcClient.test.ts src/utils/__tests__/configPersistence.test.ts src/store/coreModeSlice.test.ts src/components/BootCheckGate/__tests__/BootCheckGate.test.tsx` — 200 passed
- [x] Rust fmt/check (if changed): N/A: no Rust source changes; app format gate still ran Rust format checks.
- [x] Tauri fmt/check (if changed): N/A: no Tauri shell source changes; app format gate still ran Tauri Rust format checks.

### Validation Blocked
- `command:` N/A
- `error:` N/A
- `impact:` N/A

### Behavior Changes
- Intended behavior change: cloud core base URLs with no path are normalized to `/rpc`.
- User-visible effect: users can paste a Cloudflare Tunnel base URL into the cloud runtime picker without manually appending `/rpc`.

### Parity Contract
- Legacy behavior preserved: existing `/rpc` URLs, auth token handling, RPC POST envelopes, and public-HTTP rejection behavior are unchanged.
- Guard/fallback/dispatch parity checks: focused tests cover picker continuation, test connection, cached URL resolution, persisted URL reads/writes, and core-mode localStorage restoration.

### Duplicate / Superseded PR Handling
- Duplicate PR(s): none found for #2467 by current open issue/PR review.
- Canonical PR: this PR.
- Resolution (closed/superseded/updated): N/A.


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Bug Fixes**
  * Consistently normalize cloud RPC URLs: trims input, handles trailing slashes, and ensures the /rpc endpoint across input, storage, retrieval, and connection probes.
  * Safer RPC logging: credentials/query/hash are redacted for logged URLs.

* **Tests**
  * Expanded coverage for URL normalization across connection flows, storage/readback, and boot checks.

* **Localization**
  * Added German translations for subconscious and MCP server/settings UI strings.

<!-- review_stack_entry_start -->

[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/tinyhumansai/openhuman/pull/2480?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: YUHAO-corn <godcorn001@outlook.com>
Co-authored-by: M3gA-Mind <megamind@mahadao.com>
2026-05-22 18:52:13 +05:30
Aqil AzizandGitHub 203367cb45 fix(auth): refresh RPC cache before deep-link session store (#2384) 2026-05-22 16:30:38 +05:30
ca31ed1c55 fix(subconscious): pause when provider unavailable
## Summary
- Skip Subconscious ticks before writing per-task activity rows when no OpenHuman session/local provider path is available.
- Add provider availability fields to `subconscious_status` and show a paused/configuration banner in Intelligence > Subconscious.
- Route the tick evaluator through `subconscious_provider` while reusing the existing memory-tree chat provider plumbing.

Closes #1374

## Testing
- [x] `cargo fmt --all --check`
- [x] `pnpm --filter openhuman-app test -- src/components/intelligence/__tests__/IntelligenceSubconsciousTab.test.tsx`
- [x] `pnpm --filter openhuman-app compile`
- [x] `pnpm i18n:check`
- [x] `git diff --check`
- [x] `cargo test -p openhuman subconscious::engine::tests --lib` attempted locally, blocked before tests by `whisper-rs-sys` missing `libclang` (`LIBCLANG_PATH` unset).

## PR Checklist
- [x] I linked the relevant issue(s) above.
- [x] I added or updated tests for the changed behavior, or explained why this is not needed.
- [x] I ran the relevant local checks, or documented why they could not be run.
- [x] I kept the change scoped to the issue.


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Show an amber warning when the AI provider is unavailable, display the unavailable reason, provide a quick link to AI settings, disable the "Run Now" button, and show a translated tooltip explaining the unavailable status.

* **Internationalization**
  * Added provider-unavailable title and settings label translations across multiple languages.

* **Tests**
  * Added tests covering the provider-unavailable UI, disabled Run Now behavior, and settings navigation.

<!-- review_stack_entry_start -->

[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/tinyhumansai/openhuman/pull/2314?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: aqilaziz <gonzes7@gmail.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-20 16:57:21 -07:00
a472d6fd7d fix(memory-workspace): toast + Reveal Folder fallback for View Vault (#2281)
## Summary

- Wire a toast on every click of **View Vault** so users always see a result; surface the vault path in the toast.
- Add a **Reveal Folder** fallback action so users without Obsidian still have an OS-native escape hatch to inspect the vault.
- Add a `revealPath` helper (wraps `tauri-plugin-opener`'s `revealItemInDir`) + `opener:allow-reveal-item-in-dir` capability so the renderer can drive a Finder/Explorer reveal.
- 6 new Vitest cases cover the success-toast, reveal-fallback, error-toast, and reveal-error branches.

## Problem

`MemoryWorkspace.tsx` View Vault sent `obsidian://open?path=...` through `openUrl` and relied on the host OS to launch Obsidian. When Obsidian is not installed, the OS shell (LaunchServices on macOS, xdg-open on Linux, ShellExecute on Windows) accepts the URL handoff but launches nothing. No toast, no error, no fallback — the button looks broken to non-technical users.

## Solution

- New `revealPath(path)` helper in `app/src/utils/openUrl.ts` wraps `revealItemInDir` from `@tauri-apps/plugin-opener`. No-op outside Tauri.
- Capability `app/src-tauri/capabilities/default.json` adds `opener:allow-reveal-item-in-dir`.
- `MemoryWorkspace.tsx` replaces the silent module helper with a `handleViewVault` callback. On click:
  - Try `openUrl(obsidian://...)`.
  - On success: emit an `info` toast that names the vault path and exposes a **Reveal Folder** action.
  - On error: emit an `error` toast with the same **Reveal Folder** action.
  - **Reveal Folder** calls `revealPath(content_root_abs)`; if that fails too, surface a final error toast with the underlying message.
- New i18n keys (`workspace.openingVault*`, `workspace.openVaultFailed*`, `workspace.revealFolder`, `workspace.revealVaultFailed`) added to `en.ts` + `en-3.ts`, with English fallback into all 11 non-en `-3` chunks so `pnpm i18n:check` exits 0.

## Submission Checklist

- [x] Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy — 6 new Vitest cases across `MemoryWorkspace.test.tsx` and `openUrl.test.ts`.
- [x] **Diff coverage ≥ 80%** — every new branch in `handleViewVault` and `revealPath` has a dedicated test.
- [x] Coverage matrix updated — N/A: behaviour-only fix for an existing UI affordance; no new feature row needed.
- [x] All affected feature IDs from the matrix are listed in the PR description under `## Related` — N/A: no matrix row affected.
- [x] No new external network dependencies introduced — no network calls added.
- [x] Manual smoke checklist updated if this touches release-cut surfaces — N/A: not on the release-cut surface list.
- [x] Linked issue closed via `Closes #NNN` in the `## Related` section.

## Impact

- **Runtime/platform**: desktop (mac/win/linux). No mobile/web/CLI surfaces touched.
- **Performance**: zero — a single extra toast emit + (optional, user-driven) `revealItemInDir` IPC call.
- **Security**: new capability permission is read-only filesystem-reveal scoped to the host file manager; no path escape.
- **Migration / compatibility**: backward-compatible. Existing `obsidian://` deep-link behaviour preserved for users with Obsidian installed.

## Related

- Closes: #2281
- Follow-up PR(s)/TODOs: maintainer-side translations of the new keys (English fallback shipped so `i18n:check` passes).

---

## AI Authored PR Metadata (required for Codex/Linear PRs)

### Linear Issue
- Key: N/A
- URL: N/A

### Commit & Branch
- Branch: `fix/2281-view-vault-no-feedback`
- Commit SHA: 964c122b3b

### Validation Run
- [x] `pnpm --filter openhuman-app format:check`
- [x] `pnpm typecheck`
- [x] Focused tests: `pnpm test src/utils/openUrl.test.ts src/components/intelligence/__tests__/MemoryWorkspace.test.tsx` (23/23 pass); full `pnpm test` (2880 pass, 3 skipped).
- [x] Rust fmt/check (if changed): N/A — no Rust changes.
- [x] Tauri fmt/check (if changed): N/A — Tauri capability JSON only.

### Validation Blocked
- `command:` N/A
- `error:` N/A
- `impact:` N/A

### Behavior Changes
- Intended behavior change: Clicking **View Vault** now always emits a toast with the vault path and a **Reveal Folder** fallback, instead of silently no-op-ing when Obsidian is not installed.
- User-visible effect: visible toast + working fallback on every click.

### Parity Contract
- Legacy behavior preserved: `obsidian://` deep link still dispatched first; users with Obsidian installed see Obsidian launch as before.
- Guard/fallback/dispatch parity checks: `openUrl` reject path still propagates non-http scheme errors; new error branch in `handleViewVault` surfaces those as user-facing toasts.

### Duplicate / Superseded PR Handling
- Duplicate PR(s): None.
- Canonical PR: This PR.
- Resolution (closed/superseded/updated): N/A.


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Users can now open Obsidian vaults directly from the MemoryWorkspace with improved error handling.
  * Added "Reveal Folder" action to vault operations for quick file system access when issues occur.
  * Enhanced feedback with toast notifications for success and failure states.

* **Documentation**
  * Added translations for vault-opening workflows in 12+ languages.

<!-- review_stack_entry_start -->

[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/tinyhumansai/openhuman/pull/2289?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: obchain <riteshnikhoriya94@gmail.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-20 15:16:08 -07:00
d3a4ea3688 fix(oauth): stabilize first-launch OAuth CI readiness
## Summary

- Restores the first-launch desktop OAuth flow from #2247 while unblocking the failing CI surfaces.
- Keeps the runtime readiness gate before launching OAuth in Tauri so first-launch sign-in waits for core/auth readiness.
- Stabilizes legacy OAuth provider tests by mocking the new readiness preflight in Tauri-mode unit tests.
- Makes the E2E-only `window.__simulateDeepLink` helper fire-and-forget, matching production `onOpenUrl` behavior so WebDriver does not block on auth readiness.
- Keeps auth readiness focused on core-mode selection plus core RPC reachability, so first-login callbacks are not blocked by CoreStateProvider bootstrap.
- Adds regression coverage for the non-blocking deep-link helper path.

## Problem

- #2247 fixes first-launch OAuth readiness, but its PR branch is not writable from this maintainer account, and CI is currently red.
- Frontend unit and coverage jobs fail because legacy provider tests exercise Tauri mode without mocking the new readiness preflight.
- Linux E2E times out because `browser.execute(async () => await window.__simulateDeepLink(...))` waits on the full auth callback path, including readiness waits.
- The PR checklist also had the diff coverage item unchecked.

## Solution

- Mock `prepareOAuthLoginLaunch()` in the legacy Google/GitHub/Discord/Twitter OAuth tests, preserving their existing URL/openUrl assertions while isolating the readiness preflight.
- Change `__simulateDeepLink` to schedule `handleDeepLinkUrls()` without awaiting it, which matches the real desktop deep-link listener's fire-and-forget handler.
- Treat CoreStateProvider bootstrap as observational logging rather than a hard auth-readiness gate; core mode plus a successful core RPC ping are the required login preconditions.
- Dismiss the runtime picker before E2E auth deep-link simulation so raw mega-flow auth callbacks also commit a core mode before readiness checks.
- Treat the E2E default local core mode as an auth-readiness core mode when no explicit localStorage marker exists.
- Add a desktop deep-link listener unit test proving the E2E helper resolves immediately while the auth readiness path continues asynchronously.
- This PR supersedes #2247 because the original contributor fork rejected direct pushes from `YOMXXX` despite `maintainerCanModify=true`.

## Submission Checklist

> If a section does not apply to this change, mark the item as `N/A` with a one-line reason. Do not delete items.

- [x] Tests added or updated (happy path + at least one failure / edge case) per [Testing Strategy](../gitbooks/developing/testing-strategy.md#failure-path-requirement)
- [x] **Diff coverage ≥ 80%** — changed lines (Vitest + cargo-llvm-cov merged via `diff-cover`) meet the gate enforced by [`.github/workflows/coverage.yml`](../.github/workflows/coverage.yml). Run `pnpm test:coverage` and `pnpm test:rust` locally; PRs below 80% on changed lines will not merge.
- [x] Coverage matrix updated — N/A: behavior/test stabilization for existing OAuth sign-in flow; no feature row added/removed/renamed.
- [x] All affected feature IDs from the matrix are listed in the PR description under `## Related` — N/A: no matrix feature IDs changed.
- [x] No new external network dependencies introduced (mock backend used per [Testing Strategy](../gitbooks/developing/testing-strategy.md#mock-policy))
- [x] Manual smoke checklist updated if this touches release-cut surfaces ([`docs/RELEASE-MANUAL-SMOKE.md`](../docs/RELEASE-MANUAL-SMOKE.md)) — N/A: no release smoke procedure changed.
- [x] Linked issue closed via `Closes #NNN` in the `## Related` section

## Impact

- Desktop OAuth first-launch sign-in is more reliable because OAuth launch still waits for readiness before opening the external browser.
- E2E-only deep-link simulation no longer blocks WebDriver script execution on long auth readiness waits.
- No new runtime dependency, migration, storage, or security surface.
- Web OAuth behavior is unchanged.

## Related

- Closes: Closes #1689
- Follow-up PR(s)/TODOs: Supersedes #2247 because the original head branch is not writable from this fork.

---

## AI Authored PR Metadata (required for Codex/Linear PRs)

> Keep this section for AI-authored PRs. For human-only PRs, mark each field `N/A`.

### Linear Issue
- Key: N/A
- URL: N/A

### Commit & Branch
- Branch: `fix/2247-oauth-ci-readiness`
- Commit SHA: `3367058b145a37566dcd377198b2881a977ce3cd`

### Validation Run
- [x] `pnpm --filter openhuman-app format:check` (via pre-push hook)
- [x] `pnpm typecheck`
- [x] Focused tests:
  - `pnpm debug unit test/OAuthTwitter.test.tsx`
  - `pnpm debug unit src/utils/__tests__/desktopDeepLinkListener.test.ts`
  - `pnpm debug unit test/OAuthGitHub.test.tsx test/OAuthDiscord.test.tsx test/OAuthLoginSection.test.tsx`
  - `pnpm debug unit src/components/oauth/__tests__/OAuthProviderButton.test.tsx src/components/oauth/__tests__/oauthAuthReadiness.test.ts`
  - `pnpm debug unit src/components/oauth/__tests__/oauthAuthReadiness.test.ts src/utils/__tests__/desktopDeepLinkListener.test.ts src/components/oauth/__tests__/OAuthProviderButton.test.tsx test/OAuthTwitter.test.tsx`
  - `pnpm debug unit src/utils/__tests__/configPersistence.test.ts src/components/oauth/__tests__/oauthAuthReadiness.test.ts src/utils/__tests__/desktopDeepLinkListener.test.ts`
  - `pnpm debug unit`
  - `pnpm test:coverage`
  - `pnpm --dir app exec eslint src/utils/desktopDeepLinkListener.ts src/utils/__tests__/desktopDeepLinkListener.test.ts test/OAuthTwitter.test.tsx test/OAuthGitHub.test.tsx test/OAuthDiscord.test.tsx test/OAuthLoginSection.test.tsx --ext .ts,.tsx --max-warnings=0`
- [x] Rust fmt/check (if changed): `cargo fmt --manifest-path ../Cargo.toml --all --check`, `cargo fmt --manifest-path src-tauri/Cargo.toml --all --check`, and `GGML_NATIVE=OFF pnpm rust:check` via pre-push hook
- [x] Tauri fmt/check (if changed): `cargo fmt --manifest-path app/src-tauri/Cargo.toml --all --check` and `GGML_NATIVE=OFF pnpm rust:check` via pre-push hook

### Validation Blocked
- `command:` N/A
- `error:` N/A
- `impact:` N/A. Local macOS/Tahoe `rust:check` requires the documented `GGML_NATIVE=OFF` workaround for `whisper-rs-sys`/`-mcpu=native`; validation passed with that env var.

### Behavior Changes
- Intended behavior change: first-launch Tauri OAuth launch waits for runtime readiness, and E2E deep-link simulation no longer blocks the WebDriver script on asynchronous auth completion.
- User-visible effect: desktop first-launch sign-in should complete reliably instead of racing core/auth initialization.

### Parity Contract
- Legacy behavior preserved: web OAuth redirects and Tauri `openUrl()` URL construction remain unchanged.
- Guard/fallback/dispatch parity checks: existing provider tests still cover Google/GitHub/Discord/Twitter web and Tauri branches; deep-link listener test covers readiness failure and async helper behavior.

### Duplicate / Superseded PR Handling
- Duplicate PR(s): #2247
- Canonical PR: this PR
- Resolution (closed/superseded/updated): #2247 could not be updated directly because `git push git@github.com:CodeGhost21/openhuman.git HEAD:cursor/a02-1689-signin-failed-first-time` was rejected with `Permission denied to YOMXXX`.


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * OAuth sign-in adds a readiness gate that checks local runtime availability, surfaces clear user-facing messages when sign-in can’t proceed, and runs a short preflight on supported desktop builds before launching provider flows.
  * Deep-link sign-ins coordinate lifecycle steps for more reliable handling across environments; E2E helpers now treat auth deep links to bypass boot checks when appropriate.
  * Config lookup supports an E2E default core-mode fallback.

* **Tests**
  * Expanded tests for OAuth readiness, deep-link lifecycle, launch preparation, desktop flows, and config fallbacks.

<!-- review_stack_entry_start -->

[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/tinyhumansai/openhuman/pull/2267?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Ghost Scripter <ghostscripter@zerolend.xyz>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: 李冠辰 <liguanchen@xiaomi.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-20 15:05:26 -07:00
df01f083e1 Fix/vault sync timeout 2230
## Summary

- `vault_sync` RPC now returns immediately with `{ status: "started" }` instead of blocking the HTTP connection for up to 50+ seconds
- New `vault_sync_status` RPC endpoint lets the frontend poll for live progress (scanned / ingested / total)
- File ingestion is parallelised with `buffer_unordered(4)` — reduces sync time ~4× for large directories (100 files: ~50s → ~12s)
- `VaultPanel` shows a live `Syncing… N/M` counter in the Sync button during background sync
- Duplicate concurrent syncs on the same vault are rejected with a clear error

## Problem

On macOS Apple Silicon, syncing `~/Documents` (100+ files) reliably timed out with:

```
Core RPC openhuman.vault_sync timed out after 30000ms
```

Root causes:
1. `vault_sync` awaited the full `sync_vault()` call before returning an HTTP response — the 30 s frontend timeout fired before ingestion finished
2. Files were ingested sequentially; each cloud embedding API call adds ~500 ms → 100 files = 50 s minimum

## Solution

**Non-blocking dispatch** (ops.rs): `vault_sync` registers the sync in a global `parking_lot::RwLock` state map, spawns a `tokio::spawn` background task, and returns `{ status: "started" }` in < 1 ms. The background task writes live progress counters into the state map after each batch.

**Progress polling** (ops.rs + `schemas.rs`): New `openhuman.vault_sync_status` controller reads the in-memory state and returns a `VaultSyncState` struct (status, scanned, ingested, total, duration_ms, errors).

**Concurrent ingestion** (`sync.rs`): Two-phase approach — sequential directory walk with mtime fast-path dedup, then `futures::stream::iter().buffer_unordered(4)` for the embedding API calls. Concurrency of 4 was chosen to stay within typical API rate limits while giving ~4× throughput improvement.

**Polling UI** (VaultPanel.tsx): Replaces the old `await openhumanVaultSync()` blocking call with a start → poll loop. Timer refs are cleaned up on component unmount. Button label shows `Syncing… N/M` once total is known.

**Tradeoff**: Background state lives in process memory (not persisted). A crash during sync results in an `Idle` status on next query — acceptable since the user can simply retry.

## Submission Checklist

- [x] Tests added or updated (happy path + at least one failure / edge case) — `VaultPanel.test.tsx` updated for two-step async flow (start + poll-to-completion, failed-files branch, error-on-start branch); vault.test.ts updated for new `vault_sync` return type and new `openhumanVaultSyncStatus` function
- [x] **Diff coverage ≥ 80%** — all new functions in ops.rs, `state.rs`, `schemas.rs`, `vault.ts`, VaultPanel.tsx are covered by updated tests; `pnpm test:coverage` passes locally
- [x] Coverage matrix updated — N/A: vault sync is an existing feature row; behaviour change only (timeout fix), no new feature row needed
- [x] All affected feature IDs from the matrix are listed under `## Related`
- [x] No new external network dependencies introduced — mock backend used for all tests
- [x] Manual smoke checklist updated — N/A: vault sync already has a smoke entry; no new surface added
- [x] Linked issue closed via `Closes #2230`

## Impact

- **Desktop only** (macOS / Linux / Windows) — Tauri + Rust core change
- **Performance**: sync of 100-file directories drops from timeout (>30 s) to ~12 s background
- **Security**: no new surfaces; background task uses existing `Config` clone, no additional file permissions
- **Migration**: no schema or API changes; `vault_sync_status` is additive, old clients that ignore it still work
- **Compatibility**: `vault_sync` response shape changes from `VaultSyncReport` → `{ status, vault_id }` — frontend updated in the same PR

## Related

- Closes #2230
- Follow-up: consider persisting `VaultSyncState` to SQLite so a crash-restart can surface the last-known status

---

## AI Authored PR Metadata

### Linear Issue
- Key: N/A
- URL: N/A

### Commit & Branch
- Branch: `fix/vault-sync-timeout-2230`
- Commit SHA: `47a21be2457dc348b5be37718a62662ae4a7ee2d`

### Validation Run
- [x] `pnpm --filter openhuman-app format:check` — passed (Prettier + cargo fmt auto-fixes applied in `chore: apply auto-fixes` commit)
- [x] `pnpm typecheck` — passed (0 errors)
- [x] Focused tests: `pnpm debug unit VaultPanel`  · `pnpm debug unit tauriCommands/vault` 
- [x] Rust fmt/check: `GGML_NATIVE=OFF cargo check --manifest-path Cargo.toml` — passed (0 errors, 4 pre-existing warnings in unrelated modules)
- [x] Tauri fmt/check: **BLOCKED** (see below)

### Validation Blocked
- `command:` `pnpm rust:check` (Tauri shell `cargo check --manifest-path app/src-tauri/Cargo.toml`)
- `error:` `cef-dll-sys` build script fails — CMake cannot find Ninja (`CMAKE_MAKE_PROGRAM` not set). Pre-existing environment issue; not caused by this PR (no Tauri shell files changed).
- `impact:` Low — this PR touches only vault (core crate) and src (React); zero changes to src-tauri

### Behavior Changes
- Intended behavior change: `vault_sync` RPC returns immediately instead of blocking; callers must poll `vault_sync_status` to detect completion
- User-visible effect: Sync button shows live `Syncing… N/M` progress and no longer freezes / times out on large directories

### Parity Contract
- Legacy behavior preserved: sync logic (walk, hash dedup, doc_ingest, ledger writes, deletions) is unchanged in semantics; only execution model changed (background task + concurrency)
- Guard/fallback/dispatch parity: `vault_sync_status` registered in all.rs alongside existing vault controllers; no dispatch branches added to `cli.rs` or `jsonrpc.rs`

### Duplicate / Superseded PR Handling
- Duplicate PR(s): none
- Canonical PR: this PR
- Resolution: N/A

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Vault sync runs in background with live progress (ingested/total), duration, skipped/failed counts, and richer error details; sync button shows progress and final toasts report results.
  * Added a live status endpoint so the UI can poll ongoing syncs.

* **Refactor**
  * Sync flow converted from blocking report to asynchronous start + polling workflow.

* **Tests**
  * Updated and added tests for polling, progress updates, error/toast handling, and timer cleanup.

<!-- review_stack_entry_start -->

[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/tinyhumansai/openhuman/pull/2243?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: MootSeeker <mootseeker98@gmail.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-05-20 14:46:20 -07:00
Mega MindandGitHub cc00f91574 feat(local-ai): add editable Ollama server URL with connection test (#2210) 2026-05-21 00:36:11 +05:30
ee34387f2e feat(providers): add OrcaRouter as built-in cloud provider (#2187)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 20:19:28 -07:00
Aqil AzizandGitHub d28c054c29 fix(auth): point welcome legal links to docs (#2253) 2026-05-19 16:51:13 -07:00
oxoxDevandGitHub 272a6b063c fix(core,app): authenticate /events/webhooks SSE with per-launch core RPC bearer (#1922) (#2114) 2026-05-19 16:43:53 -07:00
1f98614869 feat(inference): gate local Ollama models by memory-layer context-window minimum (#2122)
Co-authored-by: Cyrus Gray <cyrus@tinyhumans.ai>
2026-05-19 19:40:06 +05:30