Skip to content

[ROLLBACK] feat(audit): 重构审核标签页支持双视图与批量操作 (#146)#148

Merged
SunYanbox merged 2 commits into
developfrom
feat/audit-tab-batch-and-history
May 5, 2026
Merged

[ROLLBACK] feat(audit): 重构审核标签页支持双视图与批量操作 (#146)#148
SunYanbox merged 2 commits into
developfrom
feat/audit-tab-batch-and-history

Conversation

@SunYanbox
Copy link
Copy Markdown
Owner

  • 新增功能: 待审核与已审核历史双标签页视图
    • 引入 TabbedContentTabPane 组件,分离“待审核的更改”与“已审核历史”逻辑
    • 新增 ConfirmScreen 模态确认对话框,用于批量操作的二次确认
    • 实现 _batch_all 方法,支持一键同意/拒绝所有待审核更改
    • 实现 _batch_file 方法,支持针对单个文件内的多个快照进行批量处理
    • 在历史标签页增加过滤按钮 (history-filter-all, history-filter-approved, history-filter-rejected)
  • 修复问题: 优化列表刷新与状态反馈机制
    • 将 UI 重建逻辑从 on_mount 移至异步方法 _refresh_pending_refresh_history
    • 使用 #pending-list#history-list 容器动态挂载子组件,替代直接 mount 到父级
    • 结果日志区域 #audit-result-log 现通过 _append_result 统一追加消息并自动滚动
  • 重构优化: 核心业务逻辑解耦与扩展
    • AuditCommitter 中新增 batch_commit 方法,返回 (snapshot_id, result_message) 列表
    • 更新 AuditTab.on_button_pressed 事件分发逻辑,区分全局批量、文件级批量及单条操作
    • 引入 _file_batch_map 字典维护文件索引与快照 ID 的映射关系,支持按文件索引快速定位

- 新增功能: 待审核与已审核历史双标签页视图
  * 引入 `TabbedContent` 和 `TabPane` 组件,分离“待审核的更改”与“已审核历史”逻辑
  * 新增 `ConfirmScreen` 模态确认对话框,用于批量操作的二次确认
  * 实现 `_batch_all` 方法,支持一键同意/拒绝所有待审核更改
  * 实现 `_batch_file` 方法,支持针对单个文件内的多个快照进行批量处理
  * 在历史标签页增加过滤按钮 (`history-filter-all`, `history-filter-approved`, `history-filter-rejected`)
- 修复问题: 优化列表刷新与状态反馈机制
  * 将 UI 重建逻辑从 `on_mount` 移至异步方法 `_refresh_pending` 和 `_refresh_history`
  * 使用 `#pending-list` 和 `#history-list` 容器动态挂载子组件,替代直接 `mount` 到父级
  * 结果日志区域 `#audit-result-log` 现通过 `_append_result` 统一追加消息并自动滚动
- 重构优化: 核心业务逻辑解耦与扩展
  * 在 `AuditCommitter` 中新增 `batch_commit` 方法,返回 `(snapshot_id, result_message)` 列表
  * 更新 `AuditTab.on_button_pressed` 事件分发逻辑,区分全局批量、文件级批量及单条操作
  * 引入 `_file_batch_map` 字典维护文件索引与快照 ID 的映射关系,支持按文件索引快速定位
Change file iteration to use enumerate for indexing.
@SunYanbox SunYanbox merged commit e16b727 into develop May 5, 2026
3 checks passed
@SunYanbox SunYanbox deleted the feat/audit-tab-batch-and-history branch May 5, 2026 09:33
@SunYanbox SunYanbox restored the feat/audit-tab-batch-and-history branch May 5, 2026 09:38
@SunYanbox SunYanbox deleted the feat/audit-tab-batch-and-history branch May 5, 2026 10:28
@SunYanbox SunYanbox restored the feat/audit-tab-batch-and-history branch May 5, 2026 11:15
@SunYanbox
Copy link
Copy Markdown
Owner Author

中文

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

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

  • ddfff2e8266d01a9a92134e8254b87eda0725f5e
  • 1bc112c2b8c40af21a9c2347a4bb18b669be9636

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

请勿使用这些提交。


English

⚠️ Retroactive Warning (PR Closed)

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

  • ddfff2e8266d01a9a92134e8254b87eda0725f5e
  • 1bc112c2b8c40af21a9c2347a4bb18b669be9636

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/audit-tab-batch-and-history branch May 5, 2026 11:26
@SunYanbox SunYanbox changed the title feat(audit): 重构审核标签页支持双视图与批量操作 (#146) [ROLLBACK] feat(audit): 重构审核标签页支持双视图与批量操作 (#146) 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