Skip to content

[ROLLBACK] feat(console): 重构统计面板为标签页布局 (#145)#147

Merged
SunYanbox merged 1 commit into
developfrom
feat/stats-tab-tab-view
May 5, 2026
Merged

[ROLLBACK] feat(console): 重构统计面板为标签页布局 (#145)#147
SunYanbox merged 1 commit into
developfrom
feat/stats-tab-tab-view

Conversation

@SunYanbox
Copy link
Copy Markdown
Owner

  • 新增功能: 引入 TabbedContent 组件将原有垂直堆叠的统计信息拆分为独立标签页
    • 添加 TabbedContentTabPane 导入,创建 "Overview", "Session", "Tools", "Sessions" 四个标签
    • 将原有的 mount(Static)mount(Label)mount(DataTable) 调用迁移至对应的 TabPane 实例中
    • _build_content 末尾统一挂载包含所有分区的 TabbedContent 容器
  • 修复问题: 优化页面重建时的用户交互体验
    • on_mount 或重建逻辑前保存当前激活的标签页状态 (tc.active)
    • 内容重建完成后尝试恢复之前选中的标签页索引,防止切换后焦点丢失
  • 重构优化: 调整样式定义与代码结构
    • 新增针对 StatsTab TabbedContentStatsTab TabPane 的 CSS 样式,设置高度为 1fr 并启用 overflow-y: auto
    • 更新注释标识从 "Section" 改为 "Tab",明确各部分对应独立的标签页

- 新增功能: 引入 TabbedContent 组件将原有垂直堆叠的统计信息拆分为独立标签页
  * 添加 `TabbedContent` 和 `TabPane` 导入,创建 "Overview", "Session", "Tools", "Sessions" 四个标签
  * 将原有的 `mount(Static)`、`mount(Label)` 和 `mount(DataTable)` 调用迁移至对应的 `TabPane` 实例中
  * 在 `_build_content` 末尾统一挂载包含所有分区的 `TabbedContent` 容器
- 修复问题: 优化页面重建时的用户交互体验
  * 在 `on_mount` 或重建逻辑前保存当前激活的标签页状态 (`tc.active`)
  * 内容重建完成后尝试恢复之前选中的标签页索引,防止切换后焦点丢失
- 重构优化: 调整样式定义与代码结构
  * 新增针对 `StatsTab TabbedContent` 和 `StatsTab TabPane` 的 CSS 样式,设置高度为 `1fr` 并启用 `overflow-y: auto`
  * 更新注释标识从 "Section" 改为 "Tab",明确各部分对应独立的标签页
@SunYanbox SunYanbox added the enhancement New feature or request label May 5, 2026
@SunYanbox SunYanbox merged commit 3cdccec into develop May 5, 2026
3 checks passed
@SunYanbox SunYanbox deleted the feat/stats-tab-tab-view branch May 5, 2026 09:27
@SunYanbox SunYanbox restored the feat/stats-tab-tab-view branch May 5, 2026 09:39
@SunYanbox SunYanbox deleted the feat/stats-tab-tab-view branch May 5, 2026 10:28
@SunYanbox SunYanbox restored the feat/stats-tab-tab-view branch May 5, 2026 11:15
@SunYanbox
Copy link
Copy Markdown
Owner Author

中文

⚠️ 追溯警告(PR 已关闭)

本 PR 对应的分支及以下提交存在严重 Bug,不可使用:

  • 3e67c3e4bfa8f91cc676ce208dacb042f30f3f7f

此 PR 已关闭,请勿基于上述提交继续开发或合并。

请勿使用这些提交。


English

⚠️ Retroactive Warning (PR Closed)

The branch associated with this PR and the following commits contain critical bugs and must NOT be used:

  • 3e67c3e4bfa8f91cc676ce208dacb042f30f3f7f

This PR is already closed. Please do not base any work on or merge the above commits.

These commits are unusable.

@SunYanbox SunYanbox deleted the feat/stats-tab-tab-view branch May 5, 2026 11:26
@SunYanbox SunYanbox changed the title feat(console): 重构统计面板为标签页布局 (#145) [ROLLBACK] feat(console): 重构统计面板为标签页布局 (#145) May 5, 2026
@SunYanbox SunYanbox added the invalid This doesn't seem right label May 5, 2026
@SunYanbox
Copy link
Copy Markdown
Owner Author

⚠️ PR 已强制回滚。develop 分支不受影响,可继续开发。请勿使用上述提交。
⚠️ This PR has been force-reverted. The develop branch is unaffected and safe to use. Do not use the commits above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant