fix: fix console log level alignment and mobile layout issue#7988
fix: fix console log level alignment and mobile layout issue#7988lingyun14beta wants to merge 2 commits intoAstrBotDevs:masterfrom
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Using
overflow-x: hiddenon.console-termmay hide long unbreakable content; consider adding more aggressive wrapping (e.g.,word-break: break-allor similar) in the log body instead of fully clipping horizontal overflow. - On the mobile
@mediarule, collapsing to a single1frcolumn may cause log level tags and messages to visually blend; consider adding vertical spacing or explicit row structure (e.g., row gaps or block display for the level tag) to keep the hierarchy clear on small screens.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Using `overflow-x: hidden` on `.console-term` may hide long unbreakable content; consider adding more aggressive wrapping (e.g., `word-break: break-all` or similar) in the log body instead of fully clipping horizontal overflow.
- On the mobile `@media` rule, collapsing to a single `1fr` column may cause log level tags and messages to visually blend; consider adding vertical spacing or explicit row structure (e.g., row gaps or block display for the level tag) to keep the hierarchy clear on small screens.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request updates the styling of the ConsoleDisplayer component by adding horizontal overflow control, adjusting grid column widths for log levels, and implementing a responsive single-column layout for mobile screens. Feedback suggests using overflow-x: auto instead of hidden to prevent clipping long lines, reverting the log level column to a fixed width to maintain vertical alignment and scannability, and hiding empty prefix or level elements in the mobile view to optimize vertical space.
|
等我重新build测试一下( |
|
@sourcery-ai review |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The description mentions adding
overflow-x: hidden, but the code usesoverflow-x: auto; double-check whether you want to hide overflow entirely or allow horizontal scrolling and update either the code or description for consistency. - The
@media (max-width: 768px)rule currently targets:deep(.console-log-line--structured)globally; consider scoping this media query under a more specific parent (e.g., the console container class) to avoid unintended layout changes if similar classes appear elsewhere.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The description mentions adding `overflow-x: hidden`, but the code uses `overflow-x: auto`; double-check whether you want to hide overflow entirely or allow horizontal scrolling and update either the code or description for consistency.
- The `@media (max-width: 768px)` rule currently targets `:deep(.console-log-line--structured)` globally; consider scoping this media query under a more specific parent (e.g., the console container class) to avoid unintended layout changes if similar classes appear elsewhere.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the ConsoleDisplayer component by adding horizontal scrolling and implementing a responsive mobile layout. The review feedback identifies that changing the second column to max-content disrupts the vertical alignment of log messages and introduces unwanted indentation for lines without prefixes. Additionally, it is recommended to add a row-gap to the mobile grid layout to improve readability when elements are stacked.
| grid-template-columns: max-content max-content minmax(0, 1fr); | ||
| column-gap: 8px; |
There was a problem hiding this comment.
Changing the second column to max-content removes the vertical alignment of log messages across different lines, which can make the console logs harder to scan. Additionally, the column-gap: 8px on line 384 causes an 8px indentation for log lines that do not have a prefix (e.g., logs starting directly with [INFO]), as the gap is still applied after the empty first column.

Fixes #7987
Modifications / 改动点
Modified
dashboard/src/components/shared/ConsoleDisplayer.vue:grid-template-columnssecond column from10chtomax-content, fixing the abnormal whitespace after[INFO]log level tagoverflow-xfromhiddentoautoon.console-termto allow horizontal scrolling for long log lines@media (max-width: 768px)responsive rule to switch to single-column layout on mobile, fixing vertical text display issueScreenshots or Test Results / 运行截图或测试结果
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.txtandpyproject.toml./ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到
requirements.txt和pyproject.toml文件相应位置。😮 My changes do not introduce malicious code.
/ 我的更改没有引入恶意代码。
Summary by Sourcery
Adjust console log layout for better alignment and mobile display.
Bug Fixes:
Enhancements: