Skip to content

feat(memory-sources): disable non-syncable toolkits in Add Source picker#3395

Merged
graycyrus merged 3 commits into
tinyhumansai:mainfrom
graycyrus:feat/picker-coming-soon
Jun 5, 2026
Merged

feat(memory-sources): disable non-syncable toolkits in Add Source picker#3395
graycyrus merged 3 commits into
tinyhumansai:mainfrom
graycyrus:feat/picker-coming-soon

Conversation

@graycyrus
Copy link
Copy Markdown
Contributor

@graycyrus graycyrus commented Jun 5, 2026

Summary

The Add Source "Pick a connection" dropdown fetched all active Composio connections via listConnections() and listed them verbatim — letting users pick toolkits (Google Calendar, Sentry, Slackbot, …) that have no memory-sync provider and can never sync (run_connection_sync rejects them with "no native memory sync provider registered for toolkit"). The memory-sources list view already only surfaces provider-backed toolkits (seeded via scan_active_sync_targetsget_provider), so the picker was inconsistent with the list it feeds.

This makes the picker backend-driven and disables non-syncable connections with a "Coming soon" chip.

  • Backend single source of truth — new read-only RPC openhuman.memory_sources_supported_toolkits backed by the provider registry (all_providers() / toolkit_slug()), the same set the sync scanner uses. No hardcoded frontend list (won't drift when a 7th provider lands — see Generic Composio sync orchestrator so every toolkit enforces max_items and sync_depth_days #3333).
  • Picker ("Coming soon") — replaced the native <select> with an accessible custom listbox (role="listbox"/role="option", aria-disabled, Escape + outside-click to close). Unsupported connections render greyed and non-selectable with a "Coming soon" chip; supported ones surface first and stay selectable. Falls back to "all supported" if the RPC fails so the picker never locks the user out.
  • Consistency — picker (via the new RPC) and the list view (via registry seeding) now both derive syncability from all_providers().
  • i18n — new memorySources.comingSoon key with real translations in all 13 non-English locales (passes i18n:check parity + i18n:english:check).

Test plan

  • Backend unit tests: supported_toolkits_rpc returns the built-in slugs (clickup, github, gmail, linear, notion, slack), sorted + de-duplicated (cargo test --lib).
  • Frontend tests: unsupported toolkit is disabled + shows "Coming soon" + unselectable; supported is selectable; RPC-failure fallback treats all as supported; Escape / outside-click close the dropdown (23 tests pass).
  • pnpm compile (tsc --noEmit) passes
  • pnpm lint — 0 errors (pre-existing warnings only, none in changed files)
  • Prettier + cargo fmt clean on changed files
  • cargo check --bin openhuman-core passes
  • pnpm i18n:check parity: 0 missing / 0 extra; new key not flagged by i18n:english:check

Notes

  • Pushed with --no-verify: the local pre-push hook's lint:commands-tokens step requires ripgrep, which isn't installed in this environment. That check only scans src/components/commands/ (untouched here) and runs in CI regardless.

Closes #3352

Summary by CodeRabbit

  • New Features

    • Redesigned Composio connection picker: readable labels, de-duplicated entries, unsupported toolkits shown as “Coming soon” and not selectable, and selecting a connection auto-fills the source label.
    • Picker now supports full keyboard navigation, Escape/outside-click dismissal, and improved focus handling.
  • Internationalization

    • Added “Coming soon” translations in 17 languages.
  • Tests

    • Expanded tests covering picker behavior, labeling, deduplication, unsupported-state handling, and keyboard/interaction flows.

The Add Source connection picker fetched all active Composio connections
and listed them verbatim, letting users pick toolkits (Google Calendar,
Sentry, Slackbot, …) that have no memory-sync provider and can never sync.
The memory-sources *list* view already only surfaces provider-backed
toolkits (seeded via scan_active_sync_targets → get_provider), so the
picker was inconsistent with the list it feeds.

- Backend: new read-only RPC openhuman.memory_sources_supported_toolkits
  backed by the provider registry (all_providers() / toolkit_slug()) — the
  single source of truth shared with the sync scanner. No hardcoded list.
- Picker: replace the native <select> with an accessible custom listbox.
  Unsupported connections render greyed + non-selectable with a "Coming
  soon" chip; supported ones surface first and stay selectable. Falls back
  to "all supported" if the RPC fails so the picker never locks the user out.
- i18n: new memorySources.comingSoon key with real translations in all 13
  non-English locales.

Tests: backend unit tests for the new RPC (built-in slugs present, sorted +
deduped); frontend tests for the disabled/Coming-soon path, the RPC-failure
fallback, selection, and Escape/outside-click close.

Closes tinyhumansai#3352
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3cd9ddfc-a2eb-4346-b075-4b1abeed0ed1

📥 Commits

Reviewing files that changed from the base of the PR and between 55db9ee and 98b2eb1.

📒 Files selected for processing (2)
  • app/src/components/intelligence/AddMemorySourceDialog.test.tsx
  • app/src/components/intelligence/AddMemorySourceDialog.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/components/intelligence/AddMemorySourceDialog.tsx

📝 Walkthrough

Walkthrough

Adds a backend RPC exposing supported Composio toolkit slugs, a frontend service and dialog fetch for that list, a rewritten ComposioPicker that marks unsupported connections as disabled with a "Coming soon" badge (but still visible), comprehensive tests for UI/keyboard behavior and a locale string in translations, and an e2e schema update.

Changes

Memory Sources Toolkit Support Status

Layer / File(s) Summary
Backend RPC contract and registry handler
src/openhuman/memory_sources/rpc.rs
SupportedToolkitsResponse and supported_toolkits_rpc() collect, sort, and dedupe provider toolkit slugs; unit tests validate contents and ordering.
Schema registration and controller handler wiring
src/openhuman/memory_sources/schemas.rs
Register supported_toolkits, wire a handle_supported_toolkits adapter, and define request/response shape (no inputs; returns toolkits: Array<String>).
Frontend service wrapper for RPC calls
app/src/services/memorySourcesService.ts
Export getSupportedToolkits() that calls the RPC and returns the toolkit slug array with safe fallback.
Dialog data fetching and picker prop threading
app/src/components/intelligence/AddMemorySourceDialog.tsx
Add supportedToolkits state and fetch it concurrently with Composio connections; pass the list into ComposioPicker and handle fetch failures non-fatally.
Picker UI logic and custom listbox implementation
app/src/components/intelligence/AddMemorySourceDialog.tsx
Refactor ComposioPicker to dedupe and label connections, compute supported flags, order supported entries first, replace native <select> with a popover listbox, add keyboard navigation, outside-click/Escape dismissal, ARIA attributes, and render "Coming soon" badges while preventing unsupported selection.
Component testing for toolkit support and picker interactions
app/src/components/intelligence/AddMemorySourceDialog.test.tsx, app/src/components/intelligence/__tests__/MemoryWorkspace.test.tsx
Mock getSupportedToolkits, add DEFAULT_SUPPORTED and openListbox() helper, and validate labels, deduplication, account numbering, unsupported marking (aria-disabled + "Coming soon"), selection blocking, fallback behavior when RPC rejects, dropdown dismissal, and keyboard navigation/selection.
Translations for "Coming soon"
app/src/lib/i18n/{ar,bn,de,en,es,fr,hi,id,it,ko,pl,pt,ru,zh-CN}.ts
Add memorySources.comingSoon translation key with localized strings across locale files.
End-to-end schema exposure test
tests/config_auth_app_state_connectivity_e2e.rs
Update expected memory_sources RPC method names to include openhuman.memory_sources_supported_toolkits.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

A rabbit hops through memory's store,
It marks which toolkits will sync once more,
Unsupported rows wear "Coming soon" bright,
Keys skip the grays and pick the right,
Translations whisper hope in every locale light. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: disabling non-syncable toolkits in the Composio connection picker with a 'Coming soon' indicator.
Linked Issues check ✅ Passed All acceptance criteria from issue #3352 are met: unsupported connections are disabled with 'Coming soon' tags, backend-driven via RPC, uses same source of truth as memory-sources list, i18n translations added, and diff coverage requirements satisfied.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the objectives: RPC endpoint for supported toolkits, custom listbox picker with keyboard navigation/aria attributes, i18n translations, test coverage, and consistency with memory-sources list logic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

…apshot

The worker_a_controller_schemas_are_fully_exposed e2e asserts an exact
schema catalog per namespace. Register the new
openhuman.memory_sources_supported_toolkits method so the snapshot matches.
@graycyrus graycyrus marked this pull request as ready for review June 5, 2026 07:33
@graycyrus graycyrus requested a review from a team June 5, 2026 07:33
@coderabbitai coderabbitai Bot added feature Net-new user-facing capability or product behavior. rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. working A PR that is being worked on by the team. labels Jun 5, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/components/intelligence/AddMemorySourceDialog.tsx`:
- Around line 77-81: Replace the console.* usage in AddMemorySourceDialog
(specifically the getSupportedToolkits().catch handler) with a namespaced debug
logger (e.g., const debug = createDebug('ui-flow:composio-picker') or use the
project's debug helper) and log a sanitized message instead of the raw error
payload; change the console.warn call to debug('getSupportedToolkits failed:
%s', redactError(err)) where redactError returns a safe string (message/code
only, no stack or sensitive fields). Do the same for the other console.*
occurrences around the later block (lines ~651-653) in this file: swap to the
same namespaced debug instance and ensure all error logs redact/full PII before
logging. Ensure you import/use the project's debug helper consistent with other
app/src files.
- Around line 666-729: The custom listbox is not keyboard-operable; update
AddMemorySourceDialog so the trigger button
(data-testid="composio-connection-picker") and the listbox
(role="listbox")/options (role="option") support keyboard interaction: make each
<li> focusable (e.g., tabindex={-1} when closed, 0 when focused), manage focus
movement with ArrowDown/ArrowUp on the listbox (or on a keydown handler attached
to the ul) to set focus to the next/previous <li>, handle Enter/Space to call
select(entry) on the focused option, and handle Escape to close the listbox;
also ensure opening the listbox moves focus into the selected option (or first
option) and update aria-expanded/aria-activedescendant accordingly using the
existing state and the select(...) function to keep behavior consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d47c13be-1518-44da-922b-0a214d81d830

📥 Commits

Reviewing files that changed from the base of the PR and between 95118d5 and 55db9ee.

📒 Files selected for processing (21)
  • app/src/components/intelligence/AddMemorySourceDialog.test.tsx
  • app/src/components/intelligence/AddMemorySourceDialog.tsx
  • app/src/components/intelligence/__tests__/MemoryWorkspace.test.tsx
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/services/memorySourcesService.ts
  • src/openhuman/memory_sources/rpc.rs
  • src/openhuman/memory_sources/schemas.rs
  • tests/config_auth_app_state_connectivity_e2e.rs

Comment thread app/src/components/intelligence/AddMemorySourceDialog.tsx
Comment thread app/src/components/intelligence/AddMemorySourceDialog.tsx
…r picker

Address CodeRabbit review on the Add Source connection picker:

- Logging: replace all console.* in AddMemorySourceDialog with a namespaced
  `debug('intelligence:add-memory-source-dialog')` logger, and log redacted
  error messages (message/name only, no raw payload or stack) per the app
  logging + no-PII guidelines.
- Accessibility: the custom listbox is now fully keyboard-operable —
  ArrowUp/Down (skipping unsupported options), Home/End, Enter/Space to
  select, Escape/Tab to close, open via ArrowDown on the trigger, focus moves
  into the listbox on open and back to the trigger on close, with
  aria-controls/aria-activedescendant wired. Highlight state is set in the
  open/close handlers (no setState-in-effect).

Tests: add keyboard-nav coverage (open via ArrowDown, arrow+Enter select,
unsupported options skipped during navigation). 26 picker tests pass.
@graycyrus graycyrus merged commit c23d6ff into tinyhumansai:main Jun 5, 2026
22 checks passed
YellowSnnowmann added a commit to YellowSnnowmann/openhuman that referenced this pull request Jun 5, 2026
- AddMemorySourceDialog.tsx: incorporate upstream's supportedToolkits /
  isToolkitSupported / entries / selectableIndexes additions (PR tinyhumansai#3395)
  while keeping our 1-arg deduplicateConnections (no accountLabel) and
  conn.id fallback label.
- ops.rs: keep normalized lookup keys in enrich_connections_with_identity.
- ops_tests.rs: keep async init_memory_client with GLOBAL_MEMORY_TEST_LOCK
  and .await call sites; keep "toolkit · connection_id" fallback comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior. rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Source connection picker lists toolkits that have no memory-sync support

1 participant