fix: 大盘复盘结果区滚动锁定问题 (#1266) - #1270
Conversation
🤖 自动审查报告
📁 修改的文件
🧠 AI 代码审查意见结论Ready to Merge 结构化结果1. 必要性
2. 关联性
3. 类型
4. 描述完整性
5. 风险级别
必改项无。 建议项无。本次 PR 在代码质量、测试覆盖、文档同步和 PR 描述完整性方面都做得很好,没有发现需要改进的建议。
|
There was a problem hiding this comment.
Pull request overview
该 PR 修复 Web 首页“大盘复盘”从 loading 切换到长结果后,页面底部区域无法继续上滑的滚动容器锁定问题:将大盘复盘提示/错误/报告从外层静态区域迁入主内容滚动区,避免出现不可滚动的“被截断”区域。
Changes:
- 将大盘复盘 notice/error/report 渲染移动到主 dashboard 的可滚动
<section>内,并移除报告<pre>的内部纵向滚动限制(避免嵌套纵向滚动导致锁滚)。 - 为主滚动区与报告块补充
data-testid,新增/更新单测断言,确保报告位于主滚动容器内且不再使用max-h-64/overflow-y-auto。 - 更新
docs/CHANGELOG.md增加对应修复记录。
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/dsa-web/src/pages/HomePage.tsx | 将大盘复盘结果放入主内容滚动区,移除报告内部纵向滚动,修复长内容滚动锁定/截断 |
| apps/dsa-web/src/pages/tests/HomePage.test.tsx | 增加断言覆盖:报告渲染在主滚动区内且不再是内部滚动容器 |
| docs/CHANGELOG.md | 记录该用户可见修复项 |
| - [修复] Web 首页大盘复盘结果改由主内容滚动区承载,避免 loading 切换到长结果后下方报告区域被截断或无法继续滚动。 | ||
|
|
||
| - [新功能] Web 系统设置页开放 `.env` 配置备份导入/导出,复用键级覆盖、配置版本冲突保护和重载链路;Web 端在 `ADMIN_AUTH_ENABLED=false` 时该入口为禁用状态。 | ||
| - [chore] 精简仓库根目录:将文档图片资源迁入 `docs/assets/`,将东方财富请求补丁迁入 `src/patches/`,并下移 CI 专用依赖文件与技能适配服务。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a15ecdb90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {marketReviewReport ? ( | ||
| <div className="mb-3 rounded-xl border border-subtle bg-surface/70 px-3 py-3 text-xs text-secondary-text shadow-sm"> | ||
| <div className="mb-2 flex items-center justify-between gap-2"> | ||
| <p className="font-semibold text-foreground">大盘复盘报告</p> | ||
| <button | ||
| type="button" | ||
| className="home-surface-button h-7 rounded-md px-3 py-1 text-xs text-foreground" | ||
| disabled={marketReviewReportCopied} | ||
| onClick={() => void handleCopyMarketReviewReport()} | ||
| > | ||
| {marketReviewReportCopied ? '已复制' : '复制'} | ||
| </button> | ||
| </div> | ||
| <pre | ||
| data-testid="market-review-report" | ||
| className="overflow-x-auto whitespace-pre-wrap break-words rounded-lg bg-background px-3 py-2 leading-relaxed" |
There was a problem hiding this comment.
Keep market review feedback visible after toolbar clicks
When a user is scrolled down in the main dashboard (for example reading an existing stock report) and clicks the always-visible 大盘复盘 toolbar button, this block is inserted at the top of the same scroll container and no code resets scrollTop or scrolls the result into view. The browser will preserve the current scroll position, so the completion notice/report can appear above the viewport and the click appears to do nothing; before this change the market review feedback was outside the dashboard scroller and stayed visible below the header.
Useful? React with 👍 / 👎.
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过。该 PR 针对 #1266 中大盘复盘结果从 loading 切换后底部无法继续滚动的问题,改动方向与问题现象匹配。
- 是否有对应 issue:有,Closes #1266。
- PR 类型:fix。修复 Web 首页大盘复盘结果页滚动容器锁定问题,并补充对应单测与 changelog。
- description 完整性:完整。已说明背景、范围、验证、风险与回滚方案;但 changelog 条目位置仍需按仓库内注释和协作规范确认。
- 是否可直接合入:不可。当前 CI 通过,且
mergeable_state=blocked本身不构成阻断;主要阻断点是本次布局调整可能让大盘复盘反馈在已有滚动位置下不可见,属于当前 diff 新引入的用户可见行为风险。
主要问题
- [Correctness blocker]
apps/dsa-web/src/pages/HomePage.tsx:本 PR 将大盘复盘 notice/error/report 从外层区域移动到home-dashboard-scroll滚动容器顶部,但未看到触发大盘复盘或结果完成后重置/定位该滚动容器的逻辑。若用户已在主内容区向下滚动后点击固定工具栏里的“大盘复盘”,新插入的 loading/成功/错误/报告内容会出现在滚动容器顶部、当前视口之外,用户可能看不到任务反馈或结果。建议在触发或结果落地时显式滚动到大盘复盘块,或将反馈区放在可见位置,并补充覆盖“已有滚动位置下触发大盘复盘”的回归测试。 - [Nice to have]
docs/CHANGELOG.md:[Unreleased]段已保持扁平 bullet 格式,符合 AGENTS.md 的主要要求;但当前新增条目插入在列表中间,文件内注释要求新条目追加到本段末尾以降低并发 PR 冲突。建议移动到## [3.16.0]前的 Unreleased 列表末尾。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过。该 PR 针对 #1266 的大盘复盘结果区滚动锁定问题,改动方向与用户可见故障匹配。
- 是否有对应 issue:有,Closes #1266。
- PR 类型:fix,修复 Web 首页大盘复盘 loading 切换到长结果后的滚动容器问题,并补充回归测试与 changelog。
- description 完整性:完整。已说明背景、范围、验证、风险和回滚方案;
README.md未更新可接受,当前属于局部 Web 行为修复且已更新docs/CHANGELOG.md。 - 是否可直接合入:可。当前 CI 为 success,
mergeable_state=blocked不单独构成阻断;未发现当前 diff 引入的行为或兼容性阻断问题。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
* fix(issue-1266): [bug]-新版本大盘复盘后,下面的界面滑不上去了 * fix(review-feedback-1270): address latest review comments
* fix(issue-1266): [bug]-新版本大盘复盘后,下面的界面滑不上去了 * fix(review-feedback-1270): address latest review comments
* fix(issue-1266): [bug]-新版本大盘复盘后,下面的界面滑不上去了 * fix(review-feedback-1270): address latest review comments
* fix(issue-1266): [bug]-新版本大盘复盘后,下面的界面滑不上去了 * fix(review-feedback-1270): address latest review comments
PR Type
Background And Problem
+158 / -46。Scope Of Change
apps/dsa-web/src/pages/HomePage.tsxapps/dsa-web/src/pages/__tests__/HomePage.test.tsxdocs/CHANGELOG.mdDocumentation And Changelog
docs/CHANGELOG.md。README.md或专题文档;如用户可见行为发生变化,请补充文档落点。Issue Link
Closes #1266
Verification Commands And Results
关键输出/结论 / Key output & conclusion:
Compatibility And Risk
apps/dsa-web/src/pages/HomePage.tsx,apps/dsa-web/src/pages/__tests__/HomePage.test.tsx,docs/CHANGELOG.md,建议按文件范围复核。Rollback Plan
git revert <merge-commit>回滚本 PR 提交,重点确认apps/dsa-web/src/pages/HomePage.tsx,apps/dsa-web/src/pages/__tests__/HomePage.test.tsx,docs/CHANGELOG.md恢复正常。Acceptance Criteria
Checklist
docs/CHANGELOG.md同步仍需确认;如涉及用户可见变更,请在合并前补充原因与文档落点 / Documentation anddocs/CHANGELOG.mdsync still needs confirmation before merge when user-visible behavior changes