Commit Graph
1034 Commits
Author SHA1 Message Date
Cyrus GrayandGitHub 5dbf9d4661 fix(auth): unify OAuth button styles and disable email login (#456)
All three OAuth CTAs (Google, GitHub, Twitter) now share a consistent
white pill-button style with light border instead of individual brand
colors. Email login section commented out as the backend flow is not
yet implemented.
2026-04-09 18:14:51 +05:30
Cyrus GrayandGitHub 4f0513b23a fix(skills): per-card loading state on skill enable (#454)
* feat(settings,skills): reorganize settings and skills pages for consistency and usability

- Remove dead code: TauriCommandsPanel, useSettingsAnimation, SettingsPanelLayout,
  SettingsBackButton, ProfilePanel, AdvancedPanel, SkillsPanel, SkillsGrid (~1900 lines)
- Standardize settings panel padding to p-4 space-y-4 across all panels
- Add breadcrumb navigation to SettingsHeader with route-derived breadcrumbs
- Decompose oversized panels: LocalModelPanel, AutocompletePanel, CronJobsPanel,
  ScreenIntelligencePanel into sub-components in dedicated subdirectories
- Deduplicate skills management: move browser access toggle to Skills page,
  remove redundant /settings/skills route
- Unify skill card layout: UnifiedSkillCard component with overflow menu for
  secondary actions, consistent status/CTA patterns across all skill types
- Add skill search bar and category filter with grouped results

Closes #396

* fix(settings,skills): address CodeRabbit review feedback

- Use semantic nav/ol/li for breadcrumbs with aria-hidden separators
- Fix duplicate text-xs class in CompletionStyleSection
- Use interface instead of type for CronSkillConfig
- Disable cron option inputs when parent skill is disabled
- Deduplicate preset error rendering in DeviceCapabilitySection
- Fix low-contrast labels: text-stone-300 → text-stone-700, text-stone-200 → text-stone-600
- Disable "Set Path" button when input is empty
- Add aria-pressed to category filter buttons
- Convert SkillCategoryFilter to arrow function
- Use void operator for async onClick handler
- Simplify redundant conditional in ThirdPartySkillCard
- Use async/await instead of .then() in BrowserAccessToggle

* fix(tests): update Skills page tests for unified card layout

- Mock openhumanGetRuntimeFlags/openhumanSetBrowserAllowAll for BrowserAccessToggle
- Open overflow menu before clicking sync/debug buttons (now in secondary actions)
- Remove assertion for deleted "3rd Party Skills" heading

* fix(skills): show per-card loading state instead of hiding entire skill list on enable

When clicking Enable on a third-party skill (e.g. Gmail, Notion), the
entire skill list was replaced with a loading message. Now only the
clicked card's button shows "Enabling..." with a disabled state while
the install RPC runs, keeping all other cards visible and interactive.
2026-04-09 17:56:37 +05:30
Cyrus GrayandGitHub 886bbea368 feat(settings,skills): reorganize settings and skills pages (#453)
* feat(settings,skills): reorganize settings and skills pages for consistency and usability

- Remove dead code: TauriCommandsPanel, useSettingsAnimation, SettingsPanelLayout,
  SettingsBackButton, ProfilePanel, AdvancedPanel, SkillsPanel, SkillsGrid (~1900 lines)
- Standardize settings panel padding to p-4 space-y-4 across all panels
- Add breadcrumb navigation to SettingsHeader with route-derived breadcrumbs
- Decompose oversized panels: LocalModelPanel, AutocompletePanel, CronJobsPanel,
  ScreenIntelligencePanel into sub-components in dedicated subdirectories
- Deduplicate skills management: move browser access toggle to Skills page,
  remove redundant /settings/skills route
- Unify skill card layout: UnifiedSkillCard component with overflow menu for
  secondary actions, consistent status/CTA patterns across all skill types
- Add skill search bar and category filter with grouped results

Closes #396

* fix(settings,skills): address CodeRabbit review feedback

- Use semantic nav/ol/li for breadcrumbs with aria-hidden separators
- Fix duplicate text-xs class in CompletionStyleSection
- Use interface instead of type for CronSkillConfig
- Disable cron option inputs when parent skill is disabled
- Deduplicate preset error rendering in DeviceCapabilitySection
- Fix low-contrast labels: text-stone-300 → text-stone-700, text-stone-200 → text-stone-600
- Disable "Set Path" button when input is empty
- Add aria-pressed to category filter buttons
- Convert SkillCategoryFilter to arrow function
- Use void operator for async onClick handler
- Simplify redundant conditional in ThirdPartySkillCard
- Use async/await instead of .then() in BrowserAccessToggle

* fix(tests): update Skills page tests for unified card layout

- Mock openhumanGetRuntimeFlags/openhumanSetBrowserAllowAll for BrowserAccessToggle
- Open overflow menu before clicking sync/debug buttons (now in secondary actions)
- Remove assertion for deleted "3rd Party Skills" heading
2026-04-09 17:09:41 +05:30
github-actions[bot] c10f087d51 chore(release): v0.51.19 v0.51.19 2026-04-08 22:57:41 +00:00
fa5f822f95 feat(subconscious): stabilize heartbeat + subconscious loop (#392) (#437)
* feat(subconscious): stabilize heartbeat + subconscious loop (#392)

- Enable heartbeat by default (enabled=true, inference_enabled=true, 5min interval)
- Seed system tasks on engine init, not first tick
- SQLite-backed task/log/escalation persistence
- Overlap guard with generation counter — stale ticks are cancelled
- Single log entry per task per tick, updated in place (in_progress → act/noop/escalate/failed/cancelled)
- Rate-limit retry (429 only) for agentic-v1 cloud model calls
- Approval gate: unsolicited write actions on read-only tasks require user approval
- Analysis-only mode for agentic-v1 on read-only escalations
- Non-blocking status RPC — reads from DB, never blocks on engine mutex
- Frontend: system vs user task distinction, toggle switches, expandable activity log
- Frontend: 3s auto-poll on Subconscious tab, skill-related escalation navigation
- Consecutive failure counter in status (resets on success)
- last_tick_at only advances on successful evaluation
- Missing LLM evaluation fallback — unevaluated tasks default to noop
- Docs: subconscious.md architecture guide, memory-sync-functions.md reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: fix Prettier formatting for subconscious frontend files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ci: retrigger checks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(heartbeat): use disabled config in run_returns_immediately_when_disabled test

HeartbeatConfig::default() has enabled: true, so run() entered the infinite
loop and never returned — hanging the test (and CI) indefinitely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(subconscious): remove HEARTBEAT.md task import, use SQLite as sole task source

Tasks are now managed exclusively in SQLite via the Subconscious UI.
HEARTBEAT.md is retained for instructions/context only, not as a task list.
Situation report now reads pending tasks from SQLite instead of HEARTBEAT.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: cargo fmt on subconscious engine

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:03:05 -07:00
1ca4ea044a fix(chat): deduplicate assistant messages by subscribing to canonical events only (#432) (#439)
* fix(chat): deduplicate assistant messages by subscribing to canonical events only (#432)

The Rust core emits socket events with both snake_case and colon:case
aliases via emit_with_aliases(). The frontend was subscribing to both,
causing every chat event to fire twice and producing duplicate assistant
messages.

- Subscribe only to canonical snake_case events (tool_call, chat_segment,
  chat_done, chat_error) instead of both naming conventions
- Add safety-net dedup layer in Conversations.tsx using a seen-events map
  with TTL to guard against any remaining edge cases
- Add unit tests verifying only canonical events are processed

Closes #432

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

* style: apply prettier formatting to chatService test

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 02:57:25 +05:30
0f578382d1 fix(autocomplete): auto-start engine when config enabled (#412) (#442)
* fix(autocomplete): add start_if_enabled for engine auto-start at boot (#412)

The autocomplete engine was never started automatically when
config had autocomplete.enabled = true. Add start_if_enabled()
that checks config and starts the global engine singleton during
core process startup.

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

* fix(autocomplete): wire engine startup into core server init (#412)

Call start_if_enabled() after config load in the JSON-RPC server
so the autocomplete engine runs automatically when the core process
boots with autocomplete enabled. Remove stale E2E test assertions
that conflicted with the new startup path.

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

* fix(autocomplete): auto-start engine when enabled via set_style RPC (#412)

When the frontend enables autocomplete through set_style(enabled=true),
automatically start the engine so suggestions begin immediately without
requiring a separate start call or app restart.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 02:56:58 +05:30
Mega MindandGitHub 371bcd34ea Feat/chat issue (#441)
* feat: display app version in settings panel

* fix(onboarding): auto-refresh accessibility state after grant (#351)

* style(onboarding): apply formatter for issue #351 fix

* fix(onboarding): ESLint + typed mock for ScreenPermissionsStep; clear flag in handler

Consolidate tauriCommands imports and drop redundant mock cast.

Handle granted accessibility in focus/visibility callback instead of a follow-up effect.

Made-with: Cursor

* feat(env): add support for custom dotenv path and update dependencies

- Introduced an optional environment variable `OPENHUMAN_DOTENV_PATH` to specify a custom path for dotenv files, enhancing configuration flexibility.
- Updated `Cargo.toml` to include the `dotenvy` dependency for improved dotenv file handling.
- Enhanced the `.env.example` file with a new comment for the custom dotenv path.
- Added data-testid attributes and button types in `SkillDebugModal` and `Skills` components for better testability.
- Created new tests for Gmail and Notion third-party skills to ensure proper functionality of sync and debug tools.
- Added documentation for memory sync functions to clarify usage patterns and function details.

* fix: address CodeRabbit review on PR #441

- Dotenv: treat empty OPENHUMAN_DOTENV_PATH as unset; propagate from_path errors
- Document OPENHUMAN_DOTENV_PATH parent-env requirement in .env.example
- Memory docs: MD040 fence language; clarify skill namespace vs integration id
- QuickJS bootstrap: modern helpers, generic platform.notify log, template URLs
- Skills UI: type=button on close/settings; async waitFor in sync tests
- Gmail OAuth e2e: workspace env matches MemoryClient; env/engine drop guards;
  redact secrets from logs
- Add replace_global_engine for test teardown

Made-with: Cursor
2026-04-09 01:51:30 +05:30
Cyrus GrayandGitHub 320e31f4b3 feat(upsell): add usage-aware banners, rate-limit modal, and shared usage hook (#403) (#440)
Phase 1 of the upsell flow for free users:
- Shared `useUsageState` hook with module-level cache (60s TTL)
- Reusable `UpsellBanner` component (info/warning/upgrade variants)
- `UsageLimitModal` shown when user tries to send at hard limit
- `GlobalUpsellBanner` for app-level usage warnings
- Pre-limit warning banner in Conversations at 80%+ usage
- localStorage-based dismiss persistence with cooldown

Closes #403
2026-04-09 00:47:59 +05:30
YellowSnnowmannandGitHub 90fac95d7a Fix: telegram replies (#436)
* feat(config): enhance world-readable config warning mechanism

- Introduced a new static variable to track previously warned world-readable config files, preventing duplicate warnings.
- Updated the warning logic to only log a warning for each unique world-readable config file, improving log clarity and reducing noise.
- Added new `ChannelReactionReceived` and `ChannelReactionSent` events to the DomainEvent enum, expanding event handling capabilities in the event bus.
- Included tests for the new reaction events to ensure proper functionality and integration.

* feat(logging): add log file constraints and event filtering

- Introduced functions to parse log file constraints from environment variables and filter log events based on these constraints.
- Enhanced the `init_for_cli_run` function to apply the new filtering logic, improving log management and clarity.
- Updated the `conversation_history_key` function to include thread context for Telegram, ensuring accurate message targeting.
- Added a new trait method `supports_reactions` to the `Channel` trait, indicating support for emoji reactions.
- Implemented integration tests for Telegram channel features, including reaction handling and thread message forwarding.

* feat(telegram): enhance message handling with reactions and typing indicators

- Added support for emoji reactions in Telegram responses, allowing for contextual acknowledgment of user messages.
- Implemented a decision heuristic for when to use reactions, improving user interaction quality.
- Introduced a typing indicator that activates immediately upon receiving a message, providing instant feedback to users.
- Updated the channel delivery instructions to include new reaction syntax and guidelines for usage.
- Enhanced tests to cover new reaction handling and message acknowledgment features, ensuring robust functionality.

* fix(tests): update route key for Telegram message handling tests

- Changed the route key in tests from `telegram_alice` to `telegram_alice_chat-1` to match the updated `conversation_history_key` format for Telegram.
- This adjustment ensures accurate routing and consistency in message handling tests.

* refactor(tests): streamline message handling in runtime tool calls

- Refactored the message handling tests to utilize a `ChannelMessage` struct for improved clarity and maintainability.
- Updated the route key generation to use the `conversation_history_key` function, ensuring consistency in message routing.
- Simplified the invocation of `process_channel_message` by directly passing the constructed message, enhancing readability.

* fix(telegram): enhance finalize_draft method to support thread context

- Updated the `finalize_draft` method in the `Channel` trait and its implementation for `TelegramChannel` to accept an optional `thread_ts` parameter, allowing for message threading.
- Adjusted related message handling functions to utilize the new parameter, ensuring proper message context during sending.
- Modified tests to reflect changes in the `finalize_draft` method signature, enhancing the robustness of message handling in threaded conversations.

* refactor(tests): ran format
2026-04-08 11:52:38 -07:00
YellowSnnowmannandGitHub afa6ea96c7 feat(conversations): add bypassRateLimit flag to team usage and update UI logic (#438)
- Introduced a new optional `bypassRateLimit` field in the TeamUsage interface to manage rate limit enforcement for specific users.
- Updated Conversations component to conditionally render limit indicators and messages based on the `bypassRateLimit` status, enhancing user experience by providing clearer feedback on usage limits.
2026-04-08 22:43:33 +05:30
YellowSnnowmannandGitHub 45a821645a feat(refer) : Implement referral system with UI components and API integration (#430)
* Implement referral system with UI components and API integration

- Added  to document the referral system, including reward structure, rules, data model, migration, core services, and API endpoints.
- Created  component to display referral stats and allow users to apply referral codes.
- Integrated referral functionality into the onboarding process with  for applying referral codes.
- Updated  page to include the new .
- Implemented API calls in  for fetching referral stats and applying referral codes.
- Added tests for the referral API to ensure proper functionality and data normalization.
- Introduced device fingerprinting for referral code application to prevent abuse.

This commit establishes a comprehensive referral system, enhancing user engagement and incentivizing referrals.

* Update OLLAMA_BASE_URL to local development address

* Enhance referral system and onboarding process

- Added a new function to format reward rates from basis points to percentage for better display in the ReferralRewardsSection.
- Improved loading state management in the referral stats loading process to prevent race conditions.
- Updated the Onboarding component to handle referral step skipping more effectively, ensuring a smoother user experience.
- Fixed a typo in the WelcomeStep component's button label for clarity.
- Enhanced error handling in the referral API to provide clearer feedback on failures.

These changes improve the usability and reliability of the referral system and onboarding experience.
2026-04-08 20:16:46 +05:30
2e7d1946b0 fix(ui): state-aware bootstrap buttons with user feedback (#353) (#426)
* fix(ui): state-aware bootstrap buttons with user feedback (#353)

When local AI state is "ready", replace the Bootstrap button with a
"Running" badge so clicking it no longer appears to do nothing.
Show "Retry" label when state is degraded.  Add transient success/error
messages after manual bootstrap/re-bootstrap actions so the user always
gets clear feedback.

Closes #353

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

* test(ui): add unit tests for state-aware bootstrap buttons (#353)

Cover the four key rendering states of the Home local-AI card:
- "Running" badge when state is ready (Bootstrap button hidden)
- "Retry" label when state is degraded
- "Bootstrap" label when state is idle
- Transient "Re-bootstrap complete" message after successful re-bootstrap

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 20:03:48 +05:30
Cyrus GrayandGitHub e8d27a006f fix(settings): resolve blank state on first open (#429)
* fix(settings): resolve blank state on first open

Keep CoreStateProvider bootstrapping alive on initial RPC failure instead
of immediately giving up — lets the 3s poll retry until the sidecar
responds (up to 5 attempts). Add catch-all route in Settings to redirect
unmatched sub-paths, and show RouteLoadingScreen during PersistGate
rehydration instead of rendering nothing.

Closes #413

* refactor: use async/await in poll handler for consistency

Address CodeRabbit nitpick — replace .then()/.catch() chain with
async/await in the setInterval poll callback to match the rest of the
codebase style.
2026-04-08 20:02:22 +05:30
YellowSnnowmannandGitHub 8c52236737 refactor(billing): update terminology from "5-hour" to "10-hour" for consistency across billing components (#431)
- Updated comments and variable names in the billingHelpers, InferenceBudget, SubscriptionPlans, and Conversations components to reflect the new 10-hour rolling inference window.
- Adjusted UI labels and descriptions to ensure clarity regarding the 10-hour cap and its implications for users.
- Enhanced the TeamUsage interface documentation to accurately describe the rolling inference window and its associated limits.
2026-04-08 20:01:26 +05:30
Cyrus GrayandGitHub a8b9304098 feat(onboarding): redesign WelcomeStep as auto-advancing carousel (#427)
* feat(onboarding): redesign WelcomeStep as auto-advancing carousel

Replace the static welcome screen with a 3-slide auto-rotating carousel
(Welcome, Integrations, Automation) that cycles every 5 seconds. The
"Let Start" button advances to the next onboarding step as before.

- WelcomeStep now contains internal carousel with dot pagination
- ProgressIndicator changed from bar segments to dot indicators
- Removed top-level ProgressIndicator from Onboarding.tsx
- Slides 2 and 3 have image placeholders for future visuals

* style: fix prettier formatting in Onboarding.tsx

* feat(onboarding): add visuals for integration and automation slides

Replace placeholder divs with actual images for onboarding carousel
slides 2 (manage work / integrations) and 3 (automate it all / tasks).

* feat(onboarding): navigate to conversations page after completion

Redirect user to /conversations after onboarding completes or is
skipped, so they land directly on the chat page.

* fix(test): wrap OnboardingOverlay tests in MemoryRouter

The useNavigate hook added in the previous commit requires a Router
context. Wrap all test renders in MemoryRouter to fix the failures.

* style: fix prettier formatting in OnboardingOverlay test
2026-04-08 15:52:55 +05:30
Steven EnamakelandGitHub 4ee518cf31 feat(tree-summarizer): hierarchical summary tree module with CLI (#423)
* feat(tree-summarizer): implement hierarchical summarization engine and event handling

- Introduced a new `tree_summarizer` module to manage hierarchical time-based summaries, organizing data into a tree structure (root → year → month → day → hour).
- Added functionality to ingest raw content, summarize it into hour leaves, and propagate summaries upward through the tree.
- Implemented event handling for summarization completion and tree rebuild events, enhancing observability and modularity.
- Created RPC operations for ingesting content, triggering summarization, querying the tree, and retrieving tree status.
- Added comprehensive tests to ensure the reliability of the summarization process and event handling.

This update significantly enhances the summarization capabilities of the system, allowing for efficient data organization and retrieval.

* feat(tree-summarizer): add CLI support for tree summarization commands

- Introduced a new `tree-summarizer` command to the CLI, allowing users to ingest content, run summarization jobs, query the summary tree, check status, and rebuild the tree.
- Updated the CLI help documentation to include the new command and its subcommands.
- Added a new module `tree_summarizer_cli` to encapsulate the tree summarization functionality.

This enhancement improves the usability of the summarization features, providing a streamlined interface for managing hierarchical summaries directly from the command line.

* style: apply cargo fmt to tree_summarizer module

* feat(tree-summarizer): implement TreeSummarizerEventSubscriber for observability logging

- Added a new `TreeSummarizerEventSubscriber` to log events related to tree summarization, enhancing observability.
- Updated the `start_channels` function to register the new subscriber.
- Refactored the `run_summarization` function to group buffered entries by hour and publish events upon completion of summarization.
- Improved documentation and added tests for the new subscriber functionality.

This update aims to provide better insights into the summarization process and facilitate future cross-module workflows.

* refactor(tree_summarizer): streamline buffer backup and function signature

- Simplified the buffer backup process by consolidating the rename operation with context handling for better error reporting.
- Cleaned up the function signature of `derive_node_ids_from_hour_id` for improved readability.

These changes enhance code clarity and maintainability within the tree summarization engine.

* feat(tree_summarizer): enhance tree summarization with metadata support

- Updated the `tree_summarizer_ingest` function to accept an optional metadata parameter, allowing users to include additional context during content ingestion.
- Refactored related functions to validate and handle metadata, improving the overall robustness of the summarization process.
- Adjusted the buffer write functionality to store metadata alongside content, enhancing the data structure for future retrieval and processing.

These changes aim to enrich the summarization capabilities and provide more context for ingested content.

* refactor(tree_summarizer): improve error message formatting in node ID validation

- Enhanced the formatting of error messages in the `validate_node_id` function for better readability and consistency.
- Adjusted the string formatting to use multi-line syntax, improving clarity in error reporting.
- Minor formatting changes in the `strip_buffer_frontmatter` function to enhance code readability.

These changes aim to improve the maintainability and clarity of error handling within the tree summarization module.

* refactor(tree_summarizer): enhance buffer management and summarization process

- Replaced the buffer draining mechanism with a non-destructive read approach, allowing for safer data handling during summarization.
- Introduced a new `buffer_delete` function to explicitly manage the deletion of buffer entries after successful processing.
- Updated the `run_summarization` function to reflect these changes, ensuring that buffer entries are only deleted after durable writes are confirmed.
- Improved the backup process for the buffer directory during tree rebuilds, ensuring it is preserved outside the tree structure.

These modifications aim to improve data integrity and clarity in the summarization workflow.

* refactor(tree_summarizer): improve markdown parsing and timestamp handling

- Updated the `parse_node_markdown` function to trim trailing whitespace from the body after splitting frontmatter, enhancing data cleanliness.
- Modified test cases to use specific timestamps instead of the current time, ensuring consistent and predictable test results.
- Adjusted assertions in tests to reflect the new timestamp-based ordering of entries.

These changes aim to improve the robustness of markdown parsing and the reliability of test outcomes in the tree summarization module.
2026-04-08 01:56:25 -07:00
Steven EnamakelandGitHub 0609493e1a Add RAM-tiered local AI presets (#425) 2026-04-08 01:35:35 -07:00
Steven EnamakelandGitHub cd2a4a9a87 feat(screen-intelligence): OCR-only mode without vision model (#424)
* feat(settings): add 'Use Vision Model' option to Screen Intelligence Panel

- Introduced a new checkbox in the Screen Intelligence Panel to toggle the use of a vision model for richer context extraction from screenshots.
- Updated state management to handle the new option and integrated it into the configuration and processing logic.
- Adjusted related tests and configurations to support the new feature, ensuring compatibility across the application.

* feat(cli): add --no-vision-model option for screen intelligence

- Introduced a new command-line option `--no-vision-model` to allow users to skip the vision model and use OCR and text LLM only.
- Updated the CLI options parsing to handle the new flag and modified the bootstrap logic to respect this setting.
- Enhanced usage documentation to reflect the new option and its alias `--ocr-only` for clarity.

* fix(screen-intelligence): read use_vision_model from engine runtime config

The processing worker was reading use_vision_model from the persisted
config file (Config::load_or_init), so the CLI --no-vision-model flag
had no effect. Now reads from the engine's in-memory runtime config
which the CLI correctly overrides via apply_config(). Also moves image
compression before OCR pass.

* fix: add use_vision_model to test fixtures and fix rustfmt

Add the new use_vision_model field to all AccessibilityConfig test
fixtures so TypeScript compilation passes. Also includes rustfmt
auto-fix for screen_intelligence_cli.rs.
2026-04-08 01:27:59 -07:00
github-actions[bot] 3034ec1fa2 chore(release): v0.51.18 v0.51.18 2026-04-08 06:29:16 +00:00
94f7531d69 Make QuickJS runtime fully synchronous to fix async deadlock (#422)
* feat(sync): implement background sync handling in event loop

- Introduced a mechanism to track background sync status with a new `sync_in_flight` flag.
- Updated the event loop to check for sync completion and persist state to memory upon completion.
- Modified the `handle_sync` function to fire the `onSync` handler in the JS runtime asynchronously, allowing for immediate return while the sync process runs in the background.
- Enhanced logging to provide feedback on sync status and completion.

* fix(net): disable connection pooling in HTTP client to prevent hanging on POST requests through staging proxy

* Enhance promise handling in JS call processing

- Added logging to track promise resolution progress and timeout events.
- Implemented a polling mechanism to drive the QuickJS job queue until promises resolve or timeout occurs.
- Introduced debug information logging for stalled promises to aid in troubleshooting.
- Improved feedback during polling to indicate ongoing operations.

This update aims to improve the reliability and debuggability of asynchronous JavaScript calls within the application.

* Refactor JS fetch implementation for synchronous behavior

- Updated the `fetch` function in the QuickJS library to operate synchronously from the JavaScript perspective, blocking the thread until the HTTP request completes.
- Enhanced error handling and logging for HTTP requests, including timeouts and response details.
- Removed the previous asynchronous implementation to streamline the fetch operation.
- Cleaned up the code by removing unused comments and improving readability.

This change aims to improve the consistency and reliability of network operations within the application.

* Fix Rust formatting in ops_net.rs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:28:18 -07:00
Steven Enamakel 88eb5ac461 Merge remote-tracking branch 'origin/main' 2026-04-07 19:16:17 -07:00
Steven Enamakel ca4eb39e9b fix(oauth): enhance logging to include Notion-Version in fetch requests 2026-04-07 19:03:49 -07:00
Mega MindandGitHub 5551e1e0aa Fix/365 enforce latest oauth gate from 351 (#421)
* feat: display app version in settings panel

* fix(onboarding): auto-refresh accessibility state after grant (#351)

* style(onboarding): apply formatter for issue #351 fix

* fix(onboarding): ESLint + typed mock for ScreenPermissionsStep; clear flag in handler

Consolidate tauriCommands imports and drop redundant mock cast.

Handle granted accessibility in focus/visibility callback instead of a follow-up effect.

Made-with: Cursor

* fix(release): gate OAuth deep links on minimum app version (#365)

- Add semver helpers and VITE_MINIMUM_SUPPORTED_APP_VERSION / download URL in app config
- Block openhuman://oauth/success when desktop build is below minimum; enqueue error,
  open latest-release URL, dispatch oauth:stale-app
- Pass new Vite env vars through release.yml and build-windows.yml Build frontend
- Document policy in docs/RELEASE_POLICY.md; note vars in app/.env.example

Closes #365

Made-with: Cursor

* fix: import React in SkillSetupWizard component

* fix: address CodeRabbit review (OAuth gate, semver, logging)

- Anchor semver regex to full string; arrow-style exports; tests for bad inputs
- Never throw from evaluateOAuthAppVersionGate; try/catch in deep link + omit raw URL from error logs
- Document build-time vs runtime policy in config JSDoc and RELEASE_POLICY
- Remove unused React import in SkillSetupWizard (tsc)

Made-with: Cursor

* fix: CodeRabbit — fail-closed OAuth gate, tauri-action Vite env, runbook

- Block OAuth when minimum is set but getVersion fails or version is unparseable
- Pass VITE_MINIMUM_* through tauri-action env (release + Windows) so bundles match yarn build
- Expand RELEASE_POLICY: artifact retirement, dual workflow env note
- Friendlier copy when current version is unknown

Made-with: Cursor
2026-04-08 04:26:19 +05:30
Mega MindandGitHub eded18a703 fix: refresh accessibility onboarding state after macOS grant (#351) (#420)
* feat: display app version in settings panel

* fix(onboarding): auto-refresh accessibility state after grant (#351)

* style(onboarding): apply formatter for issue #351 fix

* fix(onboarding): ESLint + typed mock for ScreenPermissionsStep; clear flag in handler

Consolidate tauriCommands imports and drop redundant mock cast.

Handle granted accessibility in focus/visibility callback instead of a follow-up effect.

Made-with: Cursor
2026-04-08 03:37:07 +05:30
Cyrus GrayandGitHub 9faef5582b feat(welcome): redesign sign-in page to match Figma card layout (#417)
* feat(welcome): redesign sign-in page to match Figma card layout

Rebuild Welcome page using the same white-card design language as the
Home page — centered container with shadow, border, and consistent
spacing. Adds horizontal OAuth pill buttons (Google, GitHub, Twitter),
"Or" divider, email input field, and "Continue with email" CTA.

* fix(hooks): remove core crate from pre-push rust:check

The root Cargo.toml includes whisper-rs-sys which fails to build on
macOS due to -mcpu=native in its cmake/ggml layer. The Tauri shell
crate builds fine and is the only Rust target the app ships, so
scope rust:check to src-tauri only.
2026-04-07 22:32:01 +05:30
91996a1dd0 fix(voice): reduce dictation hallucinations and improve Fn/focus reliability (#385) (#409)
* fix(voice): add per-segment confidence validation in whisper engine (#385)

Reject whisper segments with avg token log-probability below -0.7 or
entropy above 2.4. Return TranscriptionResult with confidence metadata
instead of plain String. Update callers in speech.rs and streaming.rs.

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

* fix(voice): upgrade default STT model from tiny to base (#385)

Base model produces significantly fewer hallucinations than tiny,
especially in noisy/quiet conditions. User can still override via config.

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

* fix(voice): add real-time silence gating in audio capture (#385)

Gate sustained silence (>500ms) from being sent to whisper to prevent
hallucinations. Maintain 100ms look-ahead ring buffer so speech onset
after pauses is not clipped. Thresholds adapt to source sample rate.

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

* fix(voice): fix Fn key timing race condition in hotkey event loop (#385)

start_recording() blocks 1-7s on cpal device init but macOS fires Fn
Release almost immediately, causing skipped cycles. Move recording
start to spawn_blocking so the event loop stays responsive. Buffer
Release events during setup and ensure minimum 1.5s recording duration
when release arrives before recording handle is ready.

Also includes: capture focused app on hotkey press, pass through
pipeline for focus validation before paste.

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

* fix(voice): validate and restore focus before paste, attempt regardless (#385)

Add expected_app parameter to insert_text(). Before Cmd+V, validate
focus via accessibility API and restore via AppleScript if shifted.
Don't abort paste on focus validation failure — attempt insertion
regardless so text is never silently lost.

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

* fix(voice-ui): align voice server RPC response shape in settings panel (#385)

* style(voice): apply rustfmt formatting in text_input

* fix(voice): address CodeRabbit regressions in server, streaming, and settings polling

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 09:11:57 -07:00
YellowSnnowmannandGitHub fb8987bcad Improve inline autocomplete reliability, sanitization, and debug logging (#407)
* Enhance autocomplete functionality and logging. Increased debounce time for autocomplete suggestions and added minimum context character requirement. Improved inline suggestion handling with new cleanup logic for tab acceptance. Introduced a new logging option for autocomplete-only logs in CLI. Updated various components to support these changes, including sanitization and error handling in the autocomplete engine.

* Add autocomplete CLI adapter for improved argument handling

This commit introduces a new module, , which encapsulates the argument parsing and logging logic specific to the autocomplete namespace in the CLI. Key features include extraction of leading verbose flags, handling of the  flag, and improved help message printing. The existing CLI command handling has been refactored to utilize this new adapter, enhancing code organization and maintainability.

* Refactor inline completion sanitization and enhance context handling
2026-04-07 09:11:42 -07:00
000b40bf43 fix(local_ai): Windows Ollama discovery + DirectML GPU acceleration for GLiNER RelEx (#416)
Ollama was not found on Windows because find_system_ollama_binary lacked
common Windows install paths (%LOCALAPPDATA%\Programs\Ollama). The server
spawn also silently swallowed errors, and the NSIS installer fallback
didn't check system paths after install.

GLiNER RelEx ONNX sessions were CPU-only — no execution providers were
configured. Now offers DirectML (Windows), CoreML (macOS), and CUDA as
GPU backends with automatic fallback. Updated the release to v0.5-onnx.2
with a DirectML-enabled onnxruntime.dll. Bundle completeness now requires
the platform DLL and verifies checksums to trigger re-download on update.

Changes:
- Add Windows common paths to find_system_ollama_binary (install.rs)
- Log and return spawn errors in start_and_wait_for_server (ollama_admin.rs)
- Fall back to find_system_ollama_binary after Windows installer (ollama_admin.rs)
- Add platform_execution_providers() with DirectML/CoreML/CUDA (relex.rs)
- Require ORT DLL in bundle_complete check (relex.rs)
- Verify platform DLL checksums in managed_bundle_complete (relex.rs)
- Update release URL and SHA256 hashes for v0.5-onnx.2 (relex.rs)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 09:11:19 -07:00
Cyrus GrayandGitHub c3dd1370d7 update onboarding (#410)
* feat(onboarding): move Tools step from onboarding to Settings

Remove the Tools toggle step from onboarding (5 → 4 steps) and add it
as a dedicated Tools panel under Settings > AI & Skills. This reduces
onboarding friction while keeping tool configuration accessible.

* feat(onboarding): remove Local AI step from onboarding

Remove the Local AI download/consent step, reducing onboarding from
4 to 3 steps (Welcome → Screen Permissions → Skills). Local AI setup
is already accessible from Settings and auto-bootstraps from Home.
2026-04-07 18:31:17 +05:30
Cyrus GrayandGitHub db7eeee859 feat(onboarding): move Tools step from onboarding to Settings (#408)
Remove the Tools toggle step from onboarding (5 → 4 steps) and add it
as a dedicated Tools panel under Settings > AI & Skills. This reduces
onboarding friction while keeping tool configuration accessible.
2026-04-07 17:49:40 +05:30
github-actions[bot] 17c9b39f74 chore(release): v0.51.17 v0.51.17 2026-04-07 07:32:01 +00:00
Steven Enamakel 8b886df91b Merge remote-tracking branch 'upstream/main' 2026-04-07 00:31:17 -07:00
Steven Enamakel 7175a2ba9c update 2026-04-07 00:31:03 -07:00
github-actions[bot] 8d96f28f96 chore(release): v0.51.16 2026-04-07 07:30:34 +00:00
Steven Enamakel 97e0974c0c Merge remote-tracking branch 'upstream/main' 2026-04-07 00:29:55 -07:00
Steven Enamakel 6b1b2b9ba2 update 2026-04-07 00:29:41 -07:00
github-actions[bot] 3361ec040f chore(release): v0.51.15 2026-04-07 07:25:21 +00:00
github-actions[bot] 4dd9da88a9 chore(release): v0.51.14 2026-04-07 06:56:12 +00:00
github-actions[bot] 621f862095 chore(release): v0.51.13 2026-04-07 06:52:20 +00:00
Steven Enamakel d05b724fd3 Merge remote-tracking branch 'upstream/main' 2026-04-06 23:49:39 -07:00
github-actions[bot] 3ac6bc6a8a chore(release): v0.51.12 2026-04-07 06:37:11 +00:00
Steven Enamakel cb0cec0c70 fix 2026-04-06 23:32:13 -07:00
Steven Enamakel 39ce04a02d Merge remote-tracking branch 'upstream/main' 2026-04-06 23:31:19 -07:00
github-actions[bot] c8c0f8bb5d chore(release): v0.51.11 2026-04-07 06:31:17 +00:00
Steven Enamakel 8bda914576 ifix buils 2026-04-06 23:30:03 -07:00
github-actions[bot] fbbdc07062 chore(release): v0.51.10 2026-04-07 06:23:10 +00:00
github-actions[bot] 766ad5af48 chore(release): v0.51.9 2026-04-07 06:03:37 +00:00
Steven EnamakelandGitHub 4afa751024 feat(memory): global singleton, CLI, graph extraction fixes & light storage (#383)
* feat(memory): add CLI support for memory commands

- Introduced a new `memory` subcommand in the CLI for memory ingestion, graph inspection, and debugging.
- Implemented various subcommands including `ingest`, `docs`, `graph`, `query`, and `namespaces` for comprehensive memory management.
- Updated the CLI entry point to route the `memory` command appropriately, enhancing the command-line interface functionality.

* refactor(memory_cli): streamline memory command ingestion and improve error handling

- Simplified the ingestion process by removing unnecessary workspace directory creation and embedding logic.
- Updated the ingestion function to utilize the `create_memory_client` for better client management.
- Changed the limit parameter type from `usize` to `u32` for consistency and improved error handling in command arguments.
- Enhanced logging for ingestion start to focus on model name only, removing redundant extraction mode information.

* refactor(memory): implement global memory client singleton for improved resource management

- Introduced a new `global.rs` module to manage a process-global memory client singleton, ensuring consistent access across subsystems.
- Updated `create_memory_client` to utilize the global client, enhancing memory management and reducing resource contention.
- Refactored various modules to replace local memory client instances with the global singleton, improving performance and reliability.
- Adjusted CLI and screen intelligence components to leverage the global memory client for document persistence and ingestion operations.

This refactor enhances the architecture by centralizing memory client management, leading to better resource utilization and simplified code structure.

* feat(memory): add put_doc_light for screen-intelligence, skip vectors/graph

Screen-intelligence captures are too frequent and ephemeral to justify
vector embedding and GLiNER graph extraction per frame. Adds a lightweight
storage path (put_doc_light) that persists the document row and markdown
file without chunking, embedding, or graph extraction.

Three-tier storage:
- put_doc_light: DB + markdown only (screen-intelligence)
- put_doc: DB + markdown + vectors + background graph (skill sync)
- ingest_doc: full synchronous pipeline (CLI, debugging)

* style: apply cargo fmt formatting

* fix: add missing window_id field in AppContext test helper

* fix(test): fall back to per-call MemoryClient when global not initialized

In tests with isolated OPENHUMAN_WORKSPACE, the process-global singleton
may not be initialized or may point at the wrong directory. Fall back to
creating a client from Config (which respects env vars) when the global
is not ready.

* fix(test): use per-call MemoryClient for screen-intelligence persistence

put_doc_light does no background work (no vectors, no graph), so a
per-call client created from Config is safe and avoids the global
singleton which may point at a different workspace in test suites.
2026-04-06 22:45:08 -07:00
a98817917c feat(screen-intelligence): standalone server with OCR + vision pipeline (#382)
* feat(screen-intelligence): add new commands for diagnostics and vision processing

- Introduced `doctor` command for system readiness diagnostics, checking permissions and platform support.
- Added `vision` command to analyze frames and persist vision summaries.
- Updated CLI usage documentation to reflect new command options and improved verbosity handling.
- Enhanced the `run_server` function to provide detailed endpoint information for better user guidance.

This update improves the functionality and usability of the screen intelligence CLI, enabling better diagnostics and vision processing capabilities.

* feat(screen-intelligence): update CLI endpoints for status monitoring

- Added `tower-http` dependency for enhanced HTTP capabilities.
- Updated endpoint documentation in `run_server` to reflect changes from SSE to long-polling for status updates.
- Renamed `/events` endpoint to `/watch` with a query parameter for interval control, improving clarity and usability.

This update enhances the screen intelligence CLI by providing more flexible status monitoring options.

* feat(screen-intelligence): integrate standalone server for screen intelligence

- Added a new `server` module to handle the standalone screen intelligence server functionality.
- Updated CLI commands to include an `--auto-start` option for initiating capture sessions on server boot.
- Enhanced the `run_server` function to provide detailed endpoint information and improved logging for server status.
- Integrated the screen intelligence engine with JSON-RPC and REST endpoints for better debugging and usability.

This update significantly enhances the screen intelligence capabilities by allowing it to run independently and providing more flexible configuration options.

* refactor(screen-intelligence): simplify CLI options and server configuration

- Removed the `--port` and `--auto-start` options from the CLI for the `screen-intelligence run` command, streamlining the command usage.
- Updated the server configuration to focus on session duration and logging, enhancing clarity and usability.
- Adjusted the documentation to reflect the new command structure and improved logging details for the screen intelligence server.

This refactor improves the user experience by simplifying command options and enhancing the clarity of server operations.

* feat(screen-intelligence): enhance screenshot management and CLI options

- Updated the CLI usage documentation to include the new `--keep` option for retaining screenshots after processing.
- Modified the server configuration to support the `keep_screenshots` flag, allowing for immediate saving of screenshots to disk.
- Enhanced the `run_server` function to reflect the updated configuration and logging details regarding screenshot retention.
- Improved the capture logic to prioritize window ID for more reliable screenshot capturing on macOS.

These changes improve the usability and functionality of the screen intelligence feature by providing better control over screenshot management.

* refactor(accessibility): improve capture logic and window ID handling

- Updated the capture mode logic to prioritize reliable window ID capture on macOS, falling back to fullscreen capture to avoid issues with region-based capture.
- Refactored the method for resolving the frontmost window ID to utilize Swift for better performance and reliability, replacing the previous JavaScript-based approach.
- Enhanced the frame processing in the accessibility engine to track processed timestamps, preventing re-analysis of the same screenshot and improving efficiency.
- Adjusted the vision summary parsing to support both JSON and plain text formats, ensuring better compatibility and usability.

These changes enhance the reliability and performance of the accessibility features, particularly in macOS environments.

* feat(accessibility): integrate Apple Vision OCR and enhance LLM context analysis

- Implemented Apple Vision OCR for extracting text from screenshots, improving accuracy and reducing hallucination.
- Refactored the vision processing flow to include structured prompts for LLM context analysis, enhancing the quality of the output summary.
- Updated the vision summary structure to include detailed fields such as APP, DOING, FOCUS, and MOOD, providing clearer insights into the captured content.
- Improved error handling and logging for image processing and OCR operations, ensuring better reliability and debugging capabilities.

These changes significantly enhance the accessibility engine's ability to analyze and summarize screen content effectively.

* refactor(screen-intelligence): enhance capture logic and summary structure

- Improved capture mode handling to prioritize window ID availability, with a fallback to bounds-based capture before defaulting to fullscreen.
- Updated the vision summary structure to clearly separate synthesized summaries, visual context, and raw OCR text for better clarity and usability.
- Enhanced logging to provide more informative output during capture operations, aiding in debugging and performance monitoring.

These changes improve the reliability and clarity of the screen intelligence features, particularly in managing capture contexts and summarizing visual information.

* refactor(accessibility): enhance capture logic to reject fullscreen fallback

- Updated the screen capture logic to prevent falling back to fullscreen mode when no valid window ID or bounds are available, improving privacy and user intent.
- Added detailed logging for cases where fullscreen capture is refused, aiding in debugging and understanding capture decisions.
- Introduced tests to ensure that the new logic correctly rejects fullscreen capture under invalid conditions, enhancing reliability.

These changes improve the accessibility engine's handling of screen captures, ensuring that only relevant content is captured.

* feat(screen-intelligence): implement capture and processing workers for enhanced vision analysis

- Introduced a dedicated `capture_worker` to manage screenshot capturing from the foreground context, ensuring efficient frame handling and immediate saving of screenshots when configured.
- Added a `processing_worker` to analyze captured frames using Apple Vision OCR and LLM, synthesizing insights and persisting results to unified memory.
- Refactored the `AccessibilityEngine` to integrate these workers, improving the overall architecture and separation of concerns in the screen intelligence module.
- Enhanced logging throughout the capture and processing workflows for better debugging and performance monitoring.

These changes significantly improve the screen intelligence capabilities by enabling real-time capture and analysis of visual data, enhancing user experience and functionality.

* Merge remote-tracking branch 'upstream/main' into fix/screen-intgellignce-2

* refactor(screen-intelligence): improve type handling and visibility in capture and processing modules

- Updated the calculation of baseline milliseconds in `capture_worker` to ensure proper type handling with floating-point division.
- Made several fields in `SessionRuntime` and `EngineState` public for better accessibility within the crate.
- Changed the visibility of the `analyze_frame` function in `processing_worker` to public within the crate, allowing it to be called from `engine.rs`.

These changes enhance type safety and improve the modularity of the screen intelligence components, facilitating better integration and usage across the codebase.

* refactor(screen-intelligence): update visibility and helper function usage in engine and processing modules

- Changed the `SessionRuntime` struct to be public within the crate, enhancing accessibility.
- Updated the `analyze_frame` function parameter to use a reference instead of a direct reference to the `AccessibilityEngine`, improving clarity.
- Refactored calls to `persist_vision_summary` to utilize the helper function from the `super::helpers` module, promoting better organization and code reuse.

These changes streamline the code structure and improve the modularity of the screen intelligence components.

* feat(screen-intelligence): introduce input handling and autocomplete features

- Added a new `input.rs` module to manage input actions, including keyboard/mouse automation and predictive text functionalities.
- Implemented methods for handling input actions, generating autocomplete suggestions, and committing selected suggestions within the `AccessibilityEngine`.
- Created a `state.rs` module to encapsulate engine state management, including session runtime and engine state structures.
- Enhanced the `engine.rs` module to support session lifecycle management and integrate new input functionalities.
- Introduced a `vision.rs` module for vision-related query methods, improving the overall architecture and modularity of the screen intelligence components.

These changes significantly enhance user interaction capabilities and streamline the management of input actions and vision processing.

* fix(screen-intelligence): update worker imports to use state module

Workers imported AccessibilityEngine from engine.rs but it was moved
to state.rs during the refactor. Fix the import paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(screen-intelligence): clean up formatting and improve readability in various modules

- Reformatted print statements in `screen_intelligence_cli.rs` for better readability.
- Simplified assertions in tests within `capture.rs` to enhance clarity.
- Streamlined function definitions and calls in `focus.rs`, `engine.rs`, and `processing_worker.rs` for improved code organization.
- Updated import statements in `mod.rs` and `server.rs` to maintain consistency and clarity.

These changes enhance the overall readability and maintainability of the codebase, promoting better coding practices across the screen intelligence components.

* refactor(screen-intelligence): update import paths for AccessibilityEngine and EngineState

- Changed the import statements in `tests.rs` to source `AccessibilityEngine` and `EngineState` from the `state` module instead of the `engine` module.
- This adjustment aligns with recent refactoring efforts to improve module organization and maintainability.

These changes enhance code clarity and ensure consistency in module usage across the screen intelligence components.

* fix(screen-intelligence): fix test compilation and assertions

- Update test imports from engine to state module
- Add mock env var path to processing_worker::analyze_frame for test support
- Update parser tests for plain-text mode (non-JSON fallback)
- Handle missing window_id gracefully in capture_scheduler test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(screen-intelligence): enhance code clarity and performance in various modules

- Updated command-line usage documentation in `screen_intelligence_cli.rs` to reflect new options.
- Improved string handling for truncation in `run_start_session` and `run_vision` functions to use character counts instead of byte lengths, ensuring accurate truncation for multi-byte characters.
- Added intentional blocking sleep in `resolve_frontmost_window_id` to minimize impact on the Tokio runtime during app switches.
- Implemented a consistent default confidence score in vision processing and improved YAML escaping in `persist_vision_summary`.
- Refactored session management in `capture_worker` and `engine` modules to reduce lock contention and improve performance during I/O operations.

These changes enhance the overall performance, maintainability, and user experience of the screen intelligence components.

* fix(tests): update confidence assertion in vision summary test

- Adjusted the expected confidence value in the `parse_vision_missing_fields` test to reflect the new default confidence score of 0.8, ensuring consistency across JSON and plain-text branches.

This change improves the accuracy of the test and aligns it with recent updates in the vision processing logic.

* refactor(screen-intelligence): improve code formatting and readability in various modules

- Enhanced string formatting for truncation in `run_vision` to improve clarity.
- Reformatted variable declarations in `capture_worker` for better readability.
- Updated YAML escaping logic in `helpers.rs` for consistency and clarity.

These changes contribute to improved maintainability and readability of the codebase.

* refactor(screen-intelligence): reorganize analyze_frame function for improved flow

- Moved configuration validation to the beginning of the `analyze_frame` function to ensure proper setup before processing.
- Reintroduced the Apple Vision OCR and Vision LLM steps in the correct order, enhancing the logical flow of the analysis process.

These changes improve the readability and maintainability of the code, ensuring a clearer structure for future modifications.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:16:49 -07:00