feat: cleanup on settings-general page#1572
Conversation
WalkthroughA new static mapping of locale codes to human-readable language names was introduced, and the language selection UI was updated to display these names instead of codes. Additional UI styling adjustments were made to dropdown components and labels, affecting presentation and interaction but not core logic. Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Deploying zero-staging with
|
| Latest commit: |
b669e2a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ea8f72a5.zero-staging-c02.pages.dev |
| Branch Preview URL: | https://07-01-feat-cleanup-on-settin.zero-staging-c02.pages.dev |
Deploying zero-prod with
|
| Latest commit: |
b669e2a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c4ab6061.zero-76h.pages.dev |
| Branch Preview URL: | https://07-01-feat-cleanup-on-settin.zero-76h.pages.dev |
There was a problem hiding this comment.
PR Summary
Enhanced settings page UI with improved language selection functionality and cleaner form design.
- Added
apps/mail/locales.tsproviding comprehensive BCP 47 language code mapping to human-readable names - Modified
apps/mail/app/(routes)/settings/general/page.tsxto display full language names instead of locale codes - Improved form controls with consistent height and hover states
- Removed redundant email alias tooltip and enhanced label alignment
- Streamlined form field organization for better visual hierarchy
2 files reviewed, 3 comments
Edit PR Review Bot Settings | Greptile
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/mail/app/(routes)/settings/general/page.tsx(4 hunks)apps/mail/locales.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
apps/mail/app/(routes)/settings/general/page.tsx (1)
Learnt from: retrogtx
PR: Mail-0/Zero#1468
File: apps/server/src/trpc/routes/mail.ts:331-331
Timestamp: 2025-06-28T03:56:09.351Z
Learning: In apps/server/src/trpc/routes/mail.ts, the user indicated they are not using ISO format for the scheduleAt parameter, despite the frontend code showing toISOString() usage in the ScheduleSendPicker component.
apps/mail/locales.ts (2)
Learnt from: retrogtx
PR: Mail-0/Zero#1468
File: apps/server/src/trpc/routes/mail.ts:331-331
Timestamp: 2025-06-28T03:56:09.351Z
Learning: In apps/server/src/trpc/routes/mail.ts, the user indicated they are not using ISO format for the scheduleAt parameter, despite the frontend code showing toISOString() usage in the ScheduleSendPicker component.
Learnt from: retrogtx
PR: Mail-0/Zero#1468
File: apps/server/src/trpc/routes/mail.ts:386-391
Timestamp: 2025-06-27T04:59:29.709Z
Learning: In apps/server/src/trpc/routes/mail.ts, the attachment processing logic conditionally handles mixed attachment types - it preserves existing File-like objects with arrayBuffer methods while only converting serialized attachments that need processing through toAttachmentFiles.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Cloudflare Pages: zero-prod
🔇 Additional comments (2)
apps/mail/app/(routes)/settings/general/page.tsx (2)
64-64: UI styling improvements look good.The consistent application of
hover:bg-transparentstyling and other UI refinements (explicit height, rounded corners, alignment) enhance the user experience and maintain visual consistency across the settings components.Also applies to: 71-71, 202-202, 239-239
234-234: Margin adjustment approved.The
!mb-1margin adjustment for the FormLabel improves the visual spacing and alignment in the form layout.
b669e2a to
ca609ed
Compare
Merge activity
|
There was a problem hiding this comment.
Bug: Locale Mapping Error Causes Undefined Options
The language dropdown in settings displays 'undefined' or empty options. This occurs when a locale from project.inlang/settings.json is not found in the localesData mapping, causing localesData[locale] to return undefined. The as keyof typeof localesData type assertion bypasses compile-time checks for this mismatch, and there is no fallback to display the locale code itself.
apps/mail/app/(routes)/settings/general/page.tsx#L209-L210
Zero/apps/mail/app/(routes)/settings/general/page.tsx
Lines 209 to 210 in a795cbd
Bug: Form Label Styling Breaks Icon Alignment
The FormLabel className change from "flex items-center gap-1" to "!mb-1" removes the flex layout, causing the InfoIcon to misalign with the label text and appear on a new line instead of being horizontally aligned.
apps/mail/app/(routes)/settings/general/page.tsx#L233-L234
Zero/apps/mail/app/(routes)/settings/general/page.tsx
Lines 233 to 234 in a795cbd
BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎

Enhanced Language Selection and UI Improvements in Settings
Description
This PR enhances the language selection in the settings page by displaying full language names instead of locale codes. It also improves the UI of select components and buttons with consistent styling and better alignment.
Summary by CodeRabbit