Skip to content

fix(wallet): 修复计费历史弹窗分页与列表重叠 (#5624) - #5627

Merged
Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
feitianbubu:fix/billing-history-pagination-overlap
Jun 20, 2026
Merged

fix(wallet): 修复计费历史弹窗分页与列表重叠 (#5624)#5627
Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
feitianbubu:fix/billing-history-pagination-overlap

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Jun 20, 2026

Copy link
Copy Markdown
Member

本 PR 由 AI 辅助生成并经人工整理、本地验证。

📝 变更描述 / Description

钱包「订单历史 / 计费历史」弹窗在记录较多时,记录列表会溢出并盖住底部分页,导致「显示第 X-Y 条」统计文字与上一页/下一页控件重叠。

根因:列表用的是 base-ui 的 ScrollArea,但只在 Root 上设了 max-height。base-ui 的 Viewportheight:100%,而当 Root 只有 max-height、没有确定 height 时,按 CSS 规则 height:100% 会回退为 auto,于是 Viewport 撑满全部内容、不产生滚动,并溢出到 Root 之外(Root 不裁剪),盖在下方分页上。

修复:将该列表改用原生 max-h + overflow-y-autodiv。原生 max-height 配合 overflow-y-auto 能正确约束高度并内部滚动,分页作为同级元素干净地排在列表下方,不再重叠。项目里已有多处采用这种原生滚动写法,且全局 * { scrollbar-width: thin } 会自动套用细滚动条样式,视觉保持一致。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

  • 人工确认: 已整理撰写此描述。
  • 非重复提交: 已搜索现有 Issues 与 PRs,确认不重复。
  • Bug fix 说明: 已关联对应 Issue 【UI Bug】钱包 - 订单历史弹窗分页底部文字与分页按钮重叠溢出 #5624
  • 变更理解: 已理解更改原理及影响。
  • 范围聚焦: 本 PR 仅含该弹窗的布局修复。
  • 本地验证: 已用还原真实结构的最小页面在浏览器验证布局修复生效。
  • 安全合规: 无敏感凭据,符合代码规范。

📸 运行证明 / Proof of Work

用还原弹窗真实 class 结构的最小页面验证:列表在 max-height 处截断并内部滚动,分页带 border-top 干净地排在列表下方,无重叠。

修复前:
image

修复后:
image

Summary by CodeRabbit

  • Refactor
    • Updated the billing history dialog's scrolling implementation for improved performance.

base-ui 的 ScrollArea 仅靠 max-height 无法约束高度:其 Viewport 用
height:100%,当 Root 只有 max-height 而无确定高度时会回退为 auto,
内容撑满并溢出到 Root 之外,盖住下方分页。改用原生 max-h + overflow-y-auto
的 div,列表正确内部滚动,分页作为同级元素干净地排在下方。
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 9118ec36-e364-4254-8cfe-08b2873fdcc6

📥 Commits

Reviewing files that changed from the base of the PR and between 7409174 and fc1e015.

📒 Files selected for processing (1)
  • web/default/src/features/wallet/components/dialogs/billing-history-dialog.tsx

Walkthrough

In BillingHistoryDialog, the records list container's ScrollArea component is replaced with a plain div using overflow-y-auto and adjusted right-padding (pr-1). The ScrollArea import is removed. No logic, data fetching, or pagination changes are made.

Changes

Billing History Dialog scroll container fix

Layer / File(s) Summary
Replace ScrollArea with overflow-y-auto div
web/default/src/features/wallet/components/dialogs/billing-history-dialog.tsx
Removes the ScrollArea import and replaces the records list wrapper component with a plain div using overflow-y-auto h-full and pr-1 right padding, replacing the prior pr-3 sm:pr-4 from ScrollArea.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A ScrollArea once wrapped the list so tight,
Pagination text and buttons fought for light.
A humble div with overflow-y-auto now,
Keeps the rows from clashing — oh wow!
No overlaps, no squish, no UI plight. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. 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 accurately identifies the main change: fixing a pagination overlap bug in the wallet's billing history modal by replacing ScrollArea with a div using overflow-y-auto.
Linked Issues check ✅ Passed The code changes directly address the linked issue #5624: replacing ScrollArea with overflow-y-auto div to prevent pagination text and buttons from overlapping in the billing history dialog.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the UI layout bug in BillingHistoryDialog; no unrelated modifications to data fetching, logic, or other components are present.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Calcium-Ion
Calcium-Ion merged commit 0c6c1b3 into QuantumNous:main Jun 20, 2026
2 checks passed
ruanhangjian pushed a commit to ruanhangjian/new-api that referenced this pull request Jul 11, 2026
base-ui 的 ScrollArea 仅靠 max-height 无法约束高度:其 Viewport 用
height:100%,当 Root 只有 max-height 而无确定高度时会回退为 auto,
内容撑满并溢出到 Root 之外,盖住下方分页。改用原生 max-h + overflow-y-auto
的 div,列表正确内部滚动,分页作为同级元素干净地排在下方。
noah-wung pushed a commit to noah-wung/new-api that referenced this pull request Jul 17, 2026
base-ui 的 ScrollArea 仅靠 max-height 无法约束高度:其 Viewport 用
height:100%,当 Root 只有 max-height 而无确定高度时会回退为 auto,
内容撑满并溢出到 Root 之外,盖住下方分页。改用原生 max-h + overflow-y-auto
的 div,列表正确内部滚动,分页作为同级元素干净地排在下方。
zhaodechao2008 pushed a commit to zhaodechao2008/new-api that referenced this pull request Jul 27, 2026
base-ui 的 ScrollArea 仅靠 max-height 无法约束高度:其 Viewport 用
height:100%,当 Root 只有 max-height 而无确定高度时会回退为 auto,
内容撑满并溢出到 Root 之外,盖住下方分页。改用原生 max-h + overflow-y-auto
的 div,列表正确内部滚动,分页作为同级元素干净地排在下方。
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
base-ui 的 ScrollArea 仅靠 max-height 无法约束高度:其 Viewport 用
height:100%,当 Root 只有 max-height 而无确定高度时会回退为 auto,
内容撑满并溢出到 Root 之外,盖住下方分页。改用原生 max-h + overflow-y-auto
的 div,列表正确内部滚动,分页作为同级元素干净地排在下方。
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.

【UI Bug】钱包 - 订单历史弹窗分页底部文字与分页按钮重叠溢出

2 participants