♻️ 彻底移除分组层 — Tag 直接挂任务(含 SQLite 数据迁移) - #5
Merged
Merged
Conversation
下拉原绑 AvailableTaskIds(ULID 列表)。改为 AvailableTasks(TaskPick: Id+Display), 下拉显 DisplayName、按 Id 过滤(TaskFilter 仍是 id,RowsView 过滤不变)。名字载入后(LoadTaskNamesAsync) 回填下拉项显示名。接上次「任务列显名」,补齐筛选面。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
BrowseViewModel 加可选 onTagsAdded(taskId) 回调;批量加 Tag 成功后调用。组合根接线: TaskWorkspaceViewModel.RequestSelect(taskId) 设待选 + ShellViewModel 导航到工作台, LoadAsync 优先选中该任务 → 发现→配置→看数据 一条线。BrowseViewModel 不依赖具体 VM(回调解耦)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
对齐任务编辑器:无效时保存按钮禁用 + 底部内联红字提示首条错误,不再「点了才弹错」。 复用各自 Validate(),相关字段变化即 Revalidate(CanSave/ValidationError);TagEditor 含 公式输入行 SelectedTag 变化也触发(订阅行 PropertyChanged,重建时退订旧行)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
任务 0 Tag 时空状态原只给「新建 Tag」。改为双 CTA:主「浏览节点添加 Tag」→ 切到浏览页 (发现→批量加 Tag 主路径),次「手动新建」→ 原 NewCommand。EmptyState 控件加可选 SecondaryActionText/SecondaryActionCommand(幽灵按钮,空则不显);TagsViewModel 加可选 navigate 注入 + BrowseNodesCommand,组合根接 Shell 导航到 "browse"。 真机:新建 0-Tag 任务→Tag 页显双 CTA→点「浏览节点添加 Tag」跳到浏览页 ✓;App.Tests 142/142。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR #3/#4 用「默认分组隐藏」折中去掉分组 UX;本次物理删除分组层。Tag 早已带 TaskId(每条创建即写), Group 实质冗余,故迁移无需复杂回填。 领域:删 Group 实体、Tag.GroupId、CollectorTask.Groups。 持久化:DcDbContext 去 Group 映射,Tag 唯一索引 (item,task_id,group_id)→(item,task_id); DbSchemaInitializer 加旧库一次性迁移 MigrateDropGroupLayer——SQLite 不能 DROP 被外键引用的列, 故整表重建 dc_tags 去 group_id(连接保持打开 + PRAGMA foreign_keys=OFF 防孤儿行中断), 防御性回填空 task_id,重建 udx_name,删 dc_groups;TaskStore 级联只删 tags。 Excel 去 GroupName 列;Backup(BackupBundle/JsonConfigBackupService)去 Groups。 App:删 GroupsView/GroupsViewModel/GroupRow/GroupEditor*/IEmbeddableGroupPanel/DefaultTaskGroup; TagEditor 由「选分组」改为固定 taskId;TagsViewModel/Browse/工作台/TagRow/导入导出去分组; 导入落当前任务;工作台删除确认改「N 个 Tag」。 测试:更新 DcDbContext(+迁移测试,造带外键旧 schema 守护重建路径)/TaskStore/Excel/Backup/ TagEditor/TaskWorkspace 测试;删 GroupEditor 测试。 验证:Infra 140(含迁移)、App 136、Integration 32 全通过;Cli 跨平台构建 0 错; office 真机:旧库(1 任务/5 Tag/含 dc_groups)启动迁移→dc_groups 与 group_id 已删、 数据保留(WAL 校验)、任务订阅 5 Tag 采集、新增 Tag(原 NOT NULL group_id 会阻塞)成功。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
承接 PR #3/#4 的「默认分组隐藏」折中,本 PR 物理删除分组层。Tag 早已带
TaskId(每条创建即写),Group实质冗余,故迁移无需复杂回填。改动
Group实体、Tag.GroupId、CollectorTask.Groups(Domain 仍零依赖)。DcDbContext去 Group 映射,Tag 唯一索引(item,task_id,group_id)→(item,task_id);DbSchemaInitializer加旧库一次性迁移MigrateDropGroupLayer——SQLite 不能 DROP 被外键引用的列,故整表重建dc_tags去group_id(连接保持打开 +PRAGMA foreign_keys=OFF防孤儿行中断迁移),防御性回填空task_id,重建udx_name,删dc_groups;TaskStore级联只删 tags;Excel 去GroupName列;Backup 去Groups。GroupsView/GroupsViewModel/GroupRow/GroupEditor*/IEmbeddableGroupPanel/DefaultTaskGroup;TagEditor由「选分组」改为固定taskId;TagsViewModel/Browse/工作台/导入导出去分组;导入落当前任务;删除确认改「N 个 Tag」。验证
Dc.Cli跨平台构建 0 错。dc_groups+group_id)启动 →dc_groups与group_id已删、udx_name=(item,task_id)、5 Tag + 1 任务全保留、task_id 完整;group_id NOT NULL本会阻塞 EF 插入,迁移修好)。🤖 Generated with Claude Code