Skip to content

fix: surface expired Composio auth state#1893

Merged
senamakel merged 2 commits into
tinyhumansai:mainfrom
honor2030:fix/composio-expired-auth-reconnect-ui
May 17, 2026
Merged

fix: surface expired Composio auth state#1893
senamakel merged 2 commits into
tinyhumansai:mainfrom
honor2030:fix/composio-expired-auth-reconnect-ui

Conversation

@honor2030
Copy link
Copy Markdown
Contributor

@honor2030 honor2030 commented May 16, 2026

Summary

  • add an explicit expired Composio auth state when backend/toolkit status reports expired auth
  • surface auth-expired copy and reconnect CTA across Skills catalog, onboarding Skills step, and the connect modal
  • add focused coverage for status derivation, catalog rendering, and reconnect modal behavior

Closes #1883

Verification

  • pnpm debug unit src/lib/composio/types.test.ts src/components/composio/ComposioConnectModal.test.tsx src/pages/__tests__/Skills.composio-catalog.test.tsx --verbose
  • pnpm --filter openhuman-app compile
  • pnpm --filter openhuman-app lint (passes with pre-existing warnings outside this change)
  • git diff --check
  • git submodule update --init --recursive app/src-tauri/vendor/tauri-cef app/src-tauri/vendor/tauri-plugin-notification
  • RUSTC=/Users/lee/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin/rustc GGML_NATIVE=OFF pnpm rust:check (passes with pre-existing Rust warnings)
  • pre-push hook passed after initializing vendored Tauri submodules and using Rust 1.93 for dependency MSRV

Summary by CodeRabbit

  • New Features

    • Added explicit "expired" authorization state for Composio integrations.
    • UI now shows "Auth expired" messaging with a "Reconnect" call-to-action across modals, tiles, onboarding, and the Skills page.
    • Styling and sort order updated so expired connections are highlighted and prioritized appropriately.
  • Tests

    • Added tests covering expired connection display and the reconnection flow.
  • Documentation

    • Added English and Chinese translation strings for expired/reconnect messages.

Review Change Stack

@honor2030 honor2030 requested a review from a team May 16, 2026 06:04
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

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: e2e46c71-4d6e-48fa-a1f8-b999a24bef30

📥 Commits

Reviewing files that changed from the base of the PR and between ce6b787 and 7569f3a.

📒 Files selected for processing (2)
  • app/src/pages/Skills.tsx
  • app/src/pages/__tests__/Skills.composio-catalog.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/pages/Skills.tsx

📝 Walkthrough

Walkthrough

Introduces a first-class expired Composio connection state: types and derive logic updated, modal detects and renders an expired reconnect UI, Skills page and onboarding surfaces show expired badges/CTAs, i18n keys added, and tests cover mapping and UI rendering.

Changes

Composio Auth Expiry State Support

Layer / File(s) Summary
Type System and State Derivation
app/src/lib/composio/types.ts, app/src/lib/composio/types.test.ts
ComposioConnectionState now includes 'expired'. JSDoc mentions EXPIRED. deriveComposioState maps backend EXPIRED'expired'. Unit tests verify expired/error/active mappings.
Connect Modal Expired State Handling
app/src/components/composio/ComposioConnectModal.tsx, app/src/components/composio/ComposioConnectModal.test.tsx
Phase adds 'expired'. Initial phase derives from connection state. Polling stops when EXPIRED is observed and sets phase to 'expired'. Header/title and Dismiss behavior updated. New expired UI renders auth-expired message and reconnect button; test asserts expired UI and absence of raw connection ID.
Internationalization Strings
app/src/lib/i18n/en.ts, app/src/lib/i18n/zh-CN.ts
Added composio.authExpired ("Auth expired") and composio.reconnect ("Reconnect") translations for English and Simplified Chinese.
Skills Page Integration UI
app/src/pages/Skills.tsx, app/src/pages/__tests__/Skills.composio-catalog.test.tsx
composioStatusLabel returns auth-expired label for expired. composioStatusColor maps expired → coral. composioSortRank places expired between pending and error. ComposioConnectorTile shows reconnect CTA and applies coral styling for expired; page test covers expired Gmail tile and modal flow.
Onboarding Skills Step UI
app/src/pages/onboarding/steps/SkillsStep.tsx
statusDotClass, statusLabel, and statusColor handle expired with coral indicators. Gmail connection button applies coral styling and shows reconnect label for expired connections.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

working

Poem

🐰 Auth expired? A coral sign to see—
Click reconnect, and reconnect you'll be.
Tokens refreshed, the tools awake,
Gentle hops bring fixes in their wake. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: surface expired Composio auth state' directly and clearly describes the main change: introducing and surfacing the expired authentication state for Composio integrations across the UI.
Linked Issues check ✅ Passed The pull request comprehensively addresses all coding objectives from issue #1883: introduces an explicit expired state in types and modal, surfaces 'auth expired' messaging across Skills UI and onboarding, adds reconnect CTA, disables expired integrations, and includes focused test coverage for status derivation and UI rendering.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the objectives: type system updates for expired state, modal and Skills UI rendering for expired connections, i18n translations for expired-auth messaging, and test coverage for the new functionality. No unrelated changes detected.

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot added the working A PR that is being worked on by the team. label May 16, 2026
@senamakel senamakel self-assigned this May 17, 2026
@senamakel senamakel merged commit 9400f77 into tinyhumansai:main May 17, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Composio auth expiry is not surfaced clearly in the UI when integration tools become unavailable

2 participants