[ROLLBACK] feat(audit): 重构审核标签页支持双视图与批量操作 (#146)#148
Merged
Conversation
- 新增功能: 待审核与已审核历史双标签页视图 * 引入 `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.
Owner
Author
中文本 PR 对应的分支及以下提交存在严重 Bug,不可使用:
此 PR 已关闭,请勿基于上述提交继续开发或合并。 请勿使用这些提交。 EnglishThe branch associated with this PR and the following commits contain critical bugs and must NOT be used:
This PR is already closed. Please do not base any work on or merge the above commits. These commits are unusable. |
Owner
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TabbedContent和TabPane组件,分离“待审核的更改”与“已审核历史”逻辑ConfirmScreen模态确认对话框,用于批量操作的二次确认_batch_all方法,支持一键同意/拒绝所有待审核更改_batch_file方法,支持针对单个文件内的多个快照进行批量处理history-filter-all,history-filter-approved,history-filter-rejected)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 的映射关系,支持按文件索引快速定位