fix: resolve double scrollbar in edit mode of conversation detail dialog by Rain-0x01-39 · Pull Request #9752 · AstrBotDevs/AstrBot · GitHub
Skip to content

fix: resolve double scrollbar in edit mode of conversation detail dialog - #9752

Merged
RC-CHN merged 4 commits into
AstrBotDevs:masterfrom
Rain-0x01-39:fix/9361
Aug 24, 2026
Merged

RC-CHN merged 4 commits into
AstrBotDevs:masterfrom
Rain-0x01-39:fix/9361

Conversation

@Rain-0x01-39

@Rain-0x01-39 Rain-0x01-39 commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Modifications / 改动点

ConversationPage.vue — 对话详情弹窗:

  • 编辑模式下卡片固定为 90vh(.conversation-detail-card--edit,通过 flex: 0 0 90vh 覆盖 Vuetify 的 flex: 1 1 100%,否则 flex-basis 会吞掉高度)
  • .monaco-editor-container 去掉固定 height: 500px,改为 flex: 1; min-height: 0,随弹窗剩余空间自适应伸缩
  • 编辑模式下 v-card-text 变为 flex 布局(flex: 1; min-height: 0)撑满卡片

这样 Monaco 填满弹窗剩余高度,外层滚动条永不触发,滚动收敛为 Monaco 自身单层。预览模式布局不受影响。

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

本地 pnpm dev 已验证:编辑模式仅剩 Monaco 已有的滚动条,窗口缩放自适应

image

Checklist / 检查清单

  • 😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
    / 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。

  • 👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
    / 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。

  • 🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
    / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txt 和 pyproject.toml 文件相应位置。

  • 😮 My changes do not introduce malicious code.
    / 我的更改没有引入恶意代码。

Summary by Sourcery

Fix edit-mode conversation detail layout so the Monaco editor fills the available dialog space without triggering an outer scrollbar.

Bug Fixes:

  • Prevent double scrollbars in the conversation detail dialog's edit mode by consolidating scrolling within the Monaco editor.

Enhancements:

  • Make the edit dialog and editor adapt to the available viewport height while preserving the preview layout.

Tests:

  • Verify edit mode locally across window sizes and confirm that only the Monaco editor scrollbar is displayed.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. area:webui The bug / feature is about webui(dashboard) of astrbot. labels Aug 20, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider making the 90vh edit-mode card height configurable or tied to Vuetify breakpoints, as the fixed value may behave poorly on very small or very tall viewports.
  • The selector .v-dialog > .v-overlay__content > .conversation-detail-card--edit is quite specific; you may want to simplify it or rely on Vuetify classes to reduce brittleness if the dialog structure changes.
  • Since .monaco-editor-container is now flex-driven, double-check that its parent containers always participate in a flex layout in edit mode to avoid layout regressions when the dialog structure is reused or extended.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider making the `90vh` edit-mode card height configurable or tied to Vuetify breakpoints, as the fixed value may behave poorly on very small or very tall viewports.
- The selector `.v-dialog > .v-overlay__content > .conversation-detail-card--edit` is quite specific; you may want to simplify it or rely on Vuetify classes to reduce brittleness if the dialog structure changes.
- Since `.monaco-editor-container` is now flex-driven, double-check that its parent containers always participate in a flex layout in edit mode to avoid layout regressions when the dialog structure is reused or extended.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 24, 2026
@RC-CHN
RC-CHN merged commit c6a14e0 into AstrBotDevs:master Aug 24, 2026
21 checks passed
BegoniaHe pushed a commit to Xero-Team/AstrBot that referenced this pull request Aug 24, 2026
…log (AstrBotDevs#9752)

Upstream-Commit: c6a14e0
Upstream-Author: Rain-0x01_ <83620631+Rain-0x01-39@users.noreply.github.com>
Upstream-PR: AstrBotDevs#9752
Sync-Disposition: adapt
Fork-Adaptation: Keep the composition-based ConversationPage and app-dialog card, then lock edit-mode height so Monaco fills the remaining flex space instead of stacking a second scrollbar.
Tested: cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/viewDialogLayouts.vitest.ts
BegoniaHe added a commit to Xero-Team/AstrBot that referenced this pull request Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webui The bug / feature is about webui(dashboard) of astrbot. lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants