Skip to content

fixes#1360

Merged
Zishan-7 merged 1 commit intopeanut-wallet-devfrom
fix/lightfix-kycdatefix
Oct 27, 2025
Merged

fixes#1360
Zishan-7 merged 1 commit intopeanut-wallet-devfrom
fix/lightfix-kycdatefix

Conversation

@Hugo0
Copy link
Contributor

@Hugo0 Hugo0 commented Oct 23, 2025

No description provided.

@vercel
Copy link

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Ready Ready Preview Comment Oct 23, 2025 9:35pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Walkthrough

The PR adds camera permissions to the Permissions-Policy header, enforces light color scheme throughout the application via layout, styles, and iframe configurations, broadens iframe permissions and sandbox attributes, updates KYC history timestamp fallback logic in two components, and updates documentation URL from peanut.to to peanut.me.

Changes

Cohort / File(s) Summary
Permissions & Security Policy
next.config.js, src/components/Global/IframeWrapper/index.tsx
Added camera=(self) to Permissions-Policy header; expanded iframe allow attribute from camera; to camera *; fullscreen * and added allow-media-devices to sandbox attribute.
Color Scheme Configuration
src/app/layout.tsx, src/styles/globals.css
Explicitly enforced light color scheme via viewport metadata, HTML style attribute, meta tag, and CSS rule (color-scheme: light only;).
KYC History Timestamp Fallbacks
src/app/(mobile-ui)/history/page.tsx, src/components/Home/HomeHistory.tsx
Updated KYC entry timestamp resolution to use more permissive fallback chains: bridgeKycStartedAt ?? user.createdAt ?? current time and approvedAt ?? updatedAt ?? createdAt instead of defaulting to epoch or current time.
Documentation Navigation
src/components/Global/WalletNavigation/index.tsx
Updated Docs link from https://docs.peanut.to/ to https://docs.peanut.me/.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • jjramirezn
  • nezz0746

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 inconclusive)
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.
Title Check ❓ Inconclusive The pull request title "fixes" is vague and generic, using a non-descriptive term that fails to convey meaningful information about the changeset. While the branch name suggests the changes relate to light mode and KYC date fixes, the title itself is too broad and could apply to any bug fix. The title does not clearly summarize the main changes, which include light color scheme adjustments, KYC timestamp fallbacks, iframe permission updates, and a documentation link change. Consider updating the title to be more specific and descriptive. For example, "Add light color scheme and fix KYC date fallbacks" or break this into multiple PRs with targeted titles like "Force light color scheme across UI" and "Improve KYC timestamp fallback logic" would better communicate the intent to reviewers scanning the commit history.
Description Check ❓ Inconclusive No pull request description was provided by the author. Without a description, it is impossible to verify whether the PR communicates the rationale, scope, or context of the changes to reviewers. This creates insufficient information to conclusively determine whether a description would be related to the changeset. Add a pull request description that explains the purpose and rationale for these changes. Even a brief description covering the main objectives—such as enforcing light color scheme compliance, improving KYC timestamp handling, and adjusting iframe permissions—would help reviewers understand the intent and context.
✨ 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/lightfix-kycdatefix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1693121 and 2af186f.

📒 Files selected for processing (7)
  • next.config.js (1 hunks)
  • src/app/(mobile-ui)/history/page.tsx (1 hunks)
  • src/app/layout.tsx (1 hunks)
  • src/components/Global/IframeWrapper/index.tsx (1 hunks)
  • src/components/Global/WalletNavigation/index.tsx (1 hunks)
  • src/components/Home/HomeHistory.tsx (1 hunks)
  • src/styles/globals.css (1 hunks)
⏰ 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). (1)
  • GitHub Check: Deploy-Preview
🔇 Additional comments (9)
src/components/Global/WalletNavigation/index.tsx (1)

26-26: LGTM - Documentation URL updated.

The documentation link has been correctly updated to the new domain.

next.config.js (1)

144-144: LGTM - Camera permissions added to align with iframe requirements.

The addition of camera=(self) to the Permissions-Policy header properly complements the iframe permission changes in IframeWrapper, ensuring camera access is allowed at both the HTTP header and iframe levels.

src/components/Home/HomeHistory.tsx (2)

154-154: LGTM - Improved timestamp fallback logic.

The fallback chain now uses user.user.createdAt before defaulting to the current time, ensuring KYC entries display with a more accurate timestamp when bridgeKycStartedAt is unavailable.


162-162: LGTM - Enhanced timestamp resolution for KYC verifications.

The cascading fallback (approvedAt ?? updatedAt ?? createdAt) ensures KYC verification entries always have a meaningful timestamp instead of falling back to epoch time (1970-01-01).

src/styles/globals.css (1)

6-9: Light-only mode enforced - consider user experience impact.

The color-scheme: light only rule prevents the browser from applying dark mode, even if users have dark mode preferences set at the OS/browser level. This provides consistent styling but removes user choice.

Consider whether this is the intended UX:

  • If intentional: Ensure this aligns with product decisions around theme support
  • If dark mode support is planned: Consider using just color-scheme: light (without only) to allow future dark mode implementation
src/app/layout.tsx (1)

64-71: LGTM - Comprehensive light mode enforcement.

The changes enforce light mode at multiple levels:

  • Viewport configuration (line 64)
  • HTML element inline style (line 69)
  • Meta tag for browser hint (line 71)

This multi-layered approach ensures consistent light mode rendering across different browsers and contexts, complementing the CSS changes in globals.css.

src/app/(mobile-ui)/history/page.tsx (2)

164-164: LGTM - Consistent with HomeHistory timestamp improvements.

The fallback now uses user.user.createdAt before defaulting to the current time, matching the logic implemented in HomeHistory.tsx and ensuring consistency across views.


172-172: LGTM - Consistent timestamp resolution for KYC verifications.

The cascading fallback (approvedAt ?? updatedAt ?? createdAt) mirrors the implementation in HomeHistory.tsx, ensuring KYC entries display meaningful timestamps across both mobile and home views.

src/components/Global/IframeWrapper/index.tsx (1)

142-145: The iframe src is controlled by backend APIs and is not user-input dependent.

The IframeWrapper component receives the src prop from backend API responses in useBridgeKycFlow and useMantecaKycFlow. The URLs originate exclusively from trusted KYC service providers (Persona and Manteca) via the backend—never from user input or dynamic frontend sources. The wildcard permissions (camera *, fullscreen *, allow-media-devices) are intentional and necessary for identity verification workflows where users must provide video/biometric verification. The security model is sound: the backend controls which URLs are loaded into the iframe, making origin validation at the component level unnecessary.

Likely an incorrect or invalid review comment.


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

@notion-workspace
Copy link

@Zishan-7 Zishan-7 merged commit b3ed0f6 into peanut-wallet-dev Oct 27, 2025
5 checks passed
@notion-workspace
Copy link

@notion-workspace
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants