Skip to content

Conversation

@limichange
Copy link
Contributor

@limichange limichange commented Dec 27, 2025

Summary by CodeRabbit

Release Notes

  • Improvements
    • Prime action now consistently displays in the general actions grid for all users and environments.
    • Update reminders and OneKey ID management features are now available across all supported platforms and configurations.
    • Enhanced consistency ensures uniform feature visibility and functionality regardless of platform type or environment.

✏️ Tip: You can customize this high-level summary in your review settings.

  • Restore OneKey ID section visibility in webdapp mode
  • Restore Prime menu item in webdapp mode General section

These features were previously hidden in commit 02c3b86 for webdapp mode and are now restored.

Changes

  • Remove platformEnv.isWebDappMode condition for MoreActionOneKeyId component in BaseMoreActionContent and MoreActionContent
  • Remove !platformEnv.isWebDappMode condition for Prime menu item in MoreActionGeneralGrid

Test plan

  • Verify OneKey ID section appears in webdapp more menu
  • Verify Prime menu item appears in webdapp more menu General section
  • Verify other platforms (desktop, mobile, extension) are not affected

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 27, 2025

Walkthrough

Conditional rendering logic based on platform environment (isWebDappMode, platformWebDappMode) has been removed from MoreActionButton. Prime action, UpdateReminders, and MoreActionOneKeyId components now render consistently across all platforms rather than being conditionally excluded.

Changes

Cohort / File(s) Summary
Platform-gated UI removal
packages/kit/src/components/MoreActionButton/index.tsx
Removed platform environment conditionals; Prime action now always included in general actions grid; UpdateReminders and MoreActionOneKeyId no longer gated by platformWebDappMode

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: restoring OneKey ID and Prime visibility in the webdapp more menu, matching the PR objectives.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/restore-onekeyid-prime-in-webdapp

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2ef68b0 and 50d9eb9.

📒 Files selected for processing (1)
  • packages/kit/src/components/MoreActionButton/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: unittest (20.x)
  • GitHub Check: lint (20.x)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
packages/kit/src/components/MoreActionButton/index.tsx (4)

1336-1336: Consistent change across render paths.

Good - both BaseMoreActionContent and MoreActionContent now render MoreActionOneKeyId consistently. This ensures the feature appears regardless of which component is used.


1299-1299: AI summary inconsistency detected.

The AI summary states "gating for UpdateReminders and MoreActionOneKeyId based on platformWebDappMode has been removed," but UpdateReminders is still conditionally hidden in webdapp mode at lines 1299 and 1335. Only MoreActionOneKeyId had its gating removed. The PR objectives don't mention UpdateReminders, so this is likely intentional.

Also applies to: 1335-1335


955-960: Prime action is now properly exposed in webdapp.

The change correctly includes the Prime action without webdapp exclusion. The isPrimeAvailable hook has no webdapp blocking—it only gates on MAS platform subscriptions and dev settings. Individual Prime features (dashboard, benefits, transfers) handle webdapp UI adaptations where needed. Navigation through pushFullModal works across all platforms. This change is sound.


1300-1300: Component safely renders unconditionally—internal auth handling works correctly.

MoreActionOneKeyId now renders without webdapp gating. The component handles logged-in/logged-out states internally and uses standard auth flows. No webdapp-specific issues found in the OneKeyAuth implementation.


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

@revan-zhang
Copy link
Contributor

revan-zhang commented Dec 27, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@originalix originalix marked this pull request as draft December 28, 2025 01:30
auto-merge was automatically disabled December 28, 2025 01:30

Pull request was converted to draft

@limichange limichange closed this Jan 4, 2026
@limichange limichange deleted the fix/restore-onekeyid-prime-in-webdapp branch January 4, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants