Skip to content

Comments

chore: merge dev to main#182

Merged
ding113 merged 4 commits intomainfrom
dev
Nov 22, 2025
Merged

chore: merge dev to main#182
ding113 merged 4 commits intomainfrom
dev

Conversation

@ding113
Copy link
Owner

@ding113 ding113 commented Nov 22, 2025

Summary

Merge development branch to main, bringing internationalization improvements and UI enhancements for the daily limit feature.

Changes

Internationalization

  • Japanese (ja): Added translations for daily limit settings
    • Daily spend limit fields
    • Daily reset mode options (fixed/rolling)
    • Daily reset time configuration
  • Russian (ru): Complete translation set for daily quota management
  • Traditional Chinese (zh-TW): Full localization support for daily limits

UI/UX Improvements

  • Dialog Overflow Fix: Added proper overflow handling to user dialogs
    • Add User Dialog: max-h-[85vh] with overflow-hidden class
    • Edit Key Dialog: max-h-[80vh] with flex layout
    • Delete Key Dialog: Consistent height constraints
  • Form Layout Enhancement: Daily reset mode fields now use 2-column grid layout for better space utilization
  • Empty State Handling: Fixed user list rendering when no users exist

Technical Details

Files Modified:

  • messages/ja/dashboard.json - Japanese translations
  • messages/ru/dashboard.json - Russian translations
  • messages/zh-TW/dashboard.json - Traditional Chinese translations
  • src/app/[locale]/dashboard/_components/user/add-user-dialog.tsx - Dialog overflow fix
  • src/app/[locale]/dashboard/_components/user/key-actions.tsx - Edit/delete dialog improvements
  • src/app/[locale]/dashboard/_components/user/forms/add-key-form.tsx - Layout optimization
  • src/app/[locale]/dashboard/_components/user/forms/edit-key-form.tsx - Layout optimization
  • src/app/[locale]/dashboard/_components/user/user-list.tsx - Empty state handling

Testing

  • Translations verified for completeness across all languages
  • Dialog overflow behavior tested on different screen sizes
  • Form layout responsive design validated
  • Empty user list rendering confirmed
  • No breaking changes introduced

Impact

  • Users: Better internationalization support for non-English users
  • UX: Improved dialog usability on smaller screens
  • Maintainability: Consistent dialog styling patterns across components

ding113 and others added 2 commits November 22, 2025 17:34
- Fix empty state rendering in UserList component
- When users.length === 0, render null children to trigger ListContainer's emptyState
- Previously, empty <div> wrapper prevented empty state from showing
- Now correctly displays add user button in empty state for admin users

Closes: user list empty state issue
…layouts

- Add missing Japanese, Russian, and Traditional Chinese translations for:
  - dailyResetMode (fixed/rolling window options)
  - dailyResetTime (daily reset time configuration)
  - limitDailyUsd (daily spending limit)

- Optimize add-key-form and edit-key-form layouts:
  - Place dailyResetMode and dailyResetTime in 2-column FormGrid
  - Better horizontal space utilization
  - Consistent with other form sections
  - Responsive design (collapses to 1 column on mobile)

- Improve add-user-dialog scrolling behavior:
  - Increase max height from 80vh to 85vh
  - Add overflow-hidden to prevent horizontal scrolling
  - Vertical scrolling handled by DialogFormLayout

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ding113, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request merges the latest development changes from the dev branch into main for the v0.3.4 release. It encompasses a wide array of updates, including significant UI/UX enhancements, expanded internationalization capabilities, critical bug fixes, and important security improvements, aiming to deliver a more robust, user-friendly, and globally accessible application.

Highlights

  • UI/UX Enhancements: Introduced complete dark mode support with a theme switcher, redesigned provider quota management to a list layout with circular progress indicators, optimized the user management page, and migrated the key form to a two-column layout. The 'Add User' button now correctly displays even when the user list is empty, and a leaderboard entry point has been added to the provider page.
  • Internationalization: Achieved complete i18n coverage by adding missing translations for daily reset mode configurations, quota management UI, dashboard components, and settings pages. Multi-language support has been enhanced for English, Japanese, Russian, Simplified Chinese, and Traditional Chinese.
  • Bug Fixes: Resolved database migration enum type duplication errors, fixed an infinite loop issue in leaderboard tab switching, addressed Gemini provider request passthrough problems, and improved response handler error handling to use 502 Bad Gateway for upstream failures. Provider quota UI alignment issues were also corrected.
  • Security Enhancements: Implemented comprehensive SSRF prevention in the action adapter and enforced stricter authentication checks in API actions.
  • Other Improvements: Updated LiteLLM model pricing data, applied consistent code formatting across the codebase, synced the version to v0.3.4, and resolved CI/CD authentication and build check issues.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ding113 ding113 changed the title chore: merge dev to main - v0.3.4 release chore: merge dev to main Nov 22, 2025
@ding113 ding113 added enhancement New feature or request size/S Small PR (< 200 lines) labels Nov 22, 2025
@ding113
Copy link
Owner Author

ding113 commented Nov 22, 2025

🔒 Security Scan Results

No security vulnerabilities detected

This PR has been scanned against OWASP Top 10, CWE Top 25, and common security anti-patterns. No security issues were identified in the code changes.

Scanned Categories

  • ✅ Injection attacks (SQL, NoSQL, Command, LDAP, etc.)
  • ✅ Authentication and session management
  • ✅ Sensitive data exposure
  • ✅ XML External Entities (XXE)
  • ✅ Access control and authorization
  • ✅ Security misconfiguration
  • ✅ Cross-site scripting (XSS)
  • ✅ Insecure deserialization
  • ✅ SSRF and path traversal
  • ✅ Cryptographic weaknesses
  • ✅ Input validation
  • ✅ Information disclosure

Change Summary

This PR contains UI/UX improvements and localization updates:

  • Localization: Added Japanese, Russian, and Traditional Chinese translations for daily reset mode fields
  • UI Fixes: Improved dialog overflow handling with proper CSS constraints
  • Layout: Reorganized form grids for better visual consistency
  • Null Safety: Added conditional rendering for empty user lists

Security Posture

Strong - No security-relevant code changes detected. All modifications are limited to presentation layer (UI components and static translations).


🤖 Automated security scan by Claude AI - OWASP Top 10 & CWE coverage

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request merges a significant number of features and fixes from the dev branch to main for the v0.3.4 release. The changes include UI enhancements, internationalization updates for several languages, and form layout refactoring. My review of the provided patches focuses on the frontend components. I've suggested a few improvements for UI consistency in dialog components by ensuring proper overflow handling, and a small refactoring in the user list component for better code clarity and robustness. Overall, the changes look good and align with the goals described in the pull request.

ding113 and others added 2 commits November 22, 2025 18:09
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ding113 ding113 merged commit 3ce38b2 into main Nov 22, 2025
7 checks passed
@ding113 ding113 added the size/M Medium PR (< 500 lines) label Nov 22, 2025
: t("dailyResetMode.desc.rolling")}
</p>
</div>
<FormGrid columns={2}>
Copy link
Owner Author

Choose a reason for hiding this comment

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

🟡 Medium: Empty column in 2-column grid when dailyResetMode is "rolling"

Why this is a problem: When the dailyResetMode is set to "rolling", the dailyResetTime field is not rendered, leaving the second column of the FormGrid empty. This creates an unbalanced layout with visible empty space on the right side.

Suggested fix:

<FormGrid columns={form.values.dailyResetMode === "fixed" ? 2 : 1}>
  <div className="space-y-2">
    <Label htmlFor="daily-reset-mode">{t("dailyResetMode.label")}</Label>
    <Select
      value={form.values.dailyResetMode}
      onValueChange={(value: "fixed" | "rolling") => form.setValue("dailyResetMode", value)}
      disabled={isPending}
    >
      <SelectTrigger id="daily-reset-mode">
        <SelectValue />
      </SelectTrigger>
      <SelectContent>
        <SelectItem value="fixed">{t("dailyResetMode.options.fixed")}</SelectItem>
        <SelectItem value="rolling">{t("dailyResetMode.options.rolling")}</SelectItem>
      </SelectContent>
    </Select>
    <p className="text-xs text-muted-foreground">
      {form.values.dailyResetMode === "fixed"
        ? t("dailyResetMode.desc.fixed")
        : t("dailyResetMode.desc.rolling")}
    </p>
  </div>

  {form.values.dailyResetMode === "fixed" && (
    <TextField
      label={t("dailyResetTime.label")}
      placeholder={t("dailyResetTime.placeholder")}
      description={t("dailyResetTime.description")}
      type="time"
      step={60}
      {...form.getFieldProps("dailyResetTime")}
    />
  )}
</FormGrid>

: t("dailyResetMode.desc.rolling")}
</p>
</div>
<FormGrid columns={2}>
Copy link
Owner Author

Choose a reason for hiding this comment

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

🟡 Medium: Empty column in 2-column grid when dailyResetMode is "rolling"

Why this is a problem: Same issue as in add-key-form.tsx - when dailyResetMode is "rolling", the second column is empty, creating an unbalanced layout.

Suggested fix:

<FormGrid columns={form.values.dailyResetMode === "fixed" ? 2 : 1}>

Dynamically set the number of columns based on whether the time field will be shown.

@ding113
Copy link
Owner Author

ding113 commented Nov 22, 2025

🔒 Security Scan Results

No security vulnerabilities detected

This PR has been scanned against OWASP Top 10, CWE Top 25, and common security anti-patterns. No security issues were identified in the code changes.

PR Changes Summary

This PR contains UI/UX improvements and translation updates:

  • Translation files: Added Japanese, Russian, and Traditional Chinese translations for daily limit configuration fields
  • UI components: Fixed dialog overflow issues and improved form layouts
  • Code quality: Added null safety check for empty user lists

Scanned Categories

  • A01: Injection attacks - No SQL, NoSQL, Command, or other injection vectors found
  • A02: Authentication and session management - No authentication logic modified
  • A03: Sensitive data exposure - Only UI/translation changes, no data handling modified
  • A04: XML External Entities - N/A (no XML processing)
  • A05: Access control and authorization - No authorization logic modified
  • A06: Security misconfiguration - No configuration changes
  • A07: Cross-site scripting (XSS) - React components use safe rendering (no dangerouslySetInnerHTML)
  • A08: Insecure deserialization - N/A (no deserialization logic)
  • A09: Using components with known vulnerabilities - No dependency changes
  • A10: Insufficient logging & monitoring - N/A (UI-only changes)

Additional Security Checks

  • SSRF (Server-Side Request Forgery) - No HTTP requests or URL handling
  • Path Traversal - No file operations
  • Input Validation - Form inputs use existing validation schemas (no changes)
  • Information Disclosure - No verbose errors or debug info added
  • Cryptographic Issues - N/A (no cryptographic operations)

Security Posture: ✅ Clean

This PR is safe to merge from a security perspective. All changes are limited to:

  1. Static translation strings (JSON)
  2. React component layout/styling (CSS classes)
  3. Conditional rendering logic (null safety improvement)

No business logic, data processing, authentication, or authorization mechanisms were modified.


🤖 Automated security scan by Claude AI - OWASP Top 10 & CWE coverage
🔍 Scanned commit: 8c4619f

Copy link
Owner Author

@ding113 ding113 left a comment

Choose a reason for hiding this comment

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

📋 Code Review Summary

This PR merges internationalization improvements and UI enhancements for the daily limit feature. The translation additions are complete, but there is a layout issue with the new 2-column grid implementation for the daily reset mode fields.

🔍 Issues Found

  • Critical (🔴): 0 issues
  • High (🟠): 0 issues
  • Medium (🟡): 2 issues
  • Low (🟢): 0 issues

🎯 Priority Actions

  1. Fix grid layout in add-key-form.tsx: Make FormGrid columns dynamic (2 when "fixed" mode, 1 when "rolling" mode) to prevent empty column gap
  2. Fix grid layout in edit-key-form.tsx: Apply the same dynamic column fix as above to maintain consistent UX across both forms

💡 General Observations

The empty state handling in user-list.tsx returns null when there are no users, which is technically correct but provides no visual feedback. However, this may be intentional based on the existing design pattern, so it was not flagged as an issue.

The dialog overflow fixes and translation additions are well-implemented with no significant issues detected.


🤖 Automated review by Claude AI - focused on identifying issues for improvement

ding113 pushed a commit that referenced this pull request Nov 22, 2025
@ding113 ding113 mentioned this pull request Nov 25, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size/M Medium PR (< 500 lines) size/S Small PR (< 200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant