移除敏感内容遮罩功能#2
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 将 DevClip 的“敏感内容检测/遮罩/内存分流”完整移除,调整采集、搜索与导入导出链路,使新采集内容按原文持久化、预览、索引并可加密导出,同时同步更新 UI 与测试/文档以匹配新的行为与安全边界。
Changes:
- 移除敏感内容检测与 secret 分流:删除 detector / classification / ephemeral store,并简化采集链路(SnapshotBuilder/Monitor/DI)。
- 搜索与 UI 清理:移除
is:sensitive/is:public过滤器与历史/设置页相关入口与徽标展示。 - 导出策略调整:AES-GCM 加密导出不再按“敏感标记”跳过记录,仅保留
shouldExport=false的跳过机制;同步更新测试与实施状态文档。
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/DevClipCoreTests/Phase8ExportSettingsPerformanceTests.swift | 更新导出/导入回归测试:导出包含 token 样式记录并可解密导入。 |
| Tests/DevClipCoreTests/Phase4ClassificationSecurityTests.swift | 移除敏感检测相关测试,新增“token 样式内容不遮罩且可持久化/索引”的行为验证。 |
| Tests/DevClipCoreTests/Phase3QuickPanelSearchTests.swift | 更新搜索解析测试:移除 is:sensitive 过滤器期望与相关构造参数。 |
| Sources/DevClipCore/Support/DependencyContainer.swift | DI 容器移除敏感检测与 ephemeral store 依赖。 |
| Sources/DevClipCore/Security/SensitiveEphemeralStore.swift | 删除 secret 内存分流存储实现。 |
| Sources/DevClipCore/Security/SensitiveContentDetector.swift | 删除敏感内容检测器与策略实现。 |
| Sources/DevClipCore/Search/SearchService.swift | 删除 .sensitive 过滤器的匹配逻辑。 |
| Sources/DevClipCore/Search/SearchQueryParser.swift | 停止解析 is:sensitive/is:public。 |
| Sources/DevClipCore/Search/SearchQuery.swift | 移除 SearchFilter.sensitive 枚举项。 |
| Sources/DevClipCore/Pasteboard/ClipboardSnapshotBuilder.swift | 构建条目时不再做敏感检测/遮罩/分流;按原文生成 searchable/preview,并固定为非敏感。 |
| Sources/DevClipCore/Pasteboard/ClipboardMonitor.swift | 移除 secret 分流与 protectedSecret 结果,仅保存正常 entries。 |
| Sources/DevClipCore/Models/SensitiveClassification.swift | 删除敏感等级模型。 |
| Sources/DevClipCore/Export/EncryptedClipboardArchiveService.swift | 导出汇总字段重命名,移除“敏感跳过”判定,保留 shouldExport=false。 |
| Sources/DevClip/Views/SettingsRootView.swift | 移除“隐私”Tab 与遮罩开关。 |
| Sources/DevClip/Views/HistoryListPaneView.swift | 历史列表行移除敏感高亮样式。 |
| Sources/DevClip/Views/HistoryDetailView.swift | 详情页移除“敏感”徽标。 |
| Sources/DevClip/Support/SettingsViewModel.swift | 导出状态文案调整(不再展示“跳过敏感条数”)。 |
| Sources/DevClip/Support/HistoryViewModel.swift | 移除“敏感”Scope 与计数/筛选逻辑。 |
| Sources/DevClip/Support/AppDependencyFactory.swift | App 侧依赖工厂移除敏感 detector 与 ephemeral store 组装。 |
| docs/IMPLEMENTATION_STATUS.md | 更新实施状态与验证记录,反映移除遮罩/分流/过滤器后的行为与测试变更。 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
41
to
46
| let encodedArchive = try JSONEncoder().encode(exportResult.archive) | ||
| let encodedArchiveText = String(data: encodedArchive, encoding: .utf8) ?? "" | ||
|
|
||
| #expect(exportResult.summary.exportedEntryCount == 1) | ||
| #expect(exportResult.summary.skippedSensitiveCount == 1) | ||
| #expect(exportResult.summary.exportedEntryCount == 2) | ||
| #expect(exportResult.summary.skippedEntryCount == 0) | ||
| #expect(!encodedArchiveText.contains("SECRET_TOKEN")) |
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.
变更
验证