Skip to content

移除敏感内容遮罩功能#2

Merged
haotangyuan merged 1 commit into
mainfrom
codex/remove-sensitive-masking
Jun 13, 2026
Merged

移除敏感内容遮罩功能#2
haotangyuan merged 1 commit into
mainfrom
codex/remove-sensitive-masking

Conversation

@haotangyuan

Copy link
Copy Markdown
Owner

变更

  • 移除敏感内容检测、遮罩和 secret 内存分流逻辑
  • 新采集内容按原文持久化、预览、索引和加密导出
  • 清理历史窗口的敏感筛选/徽标、设置页的遮罩开关,以及搜索中的 is:sensitive/is:public 过滤器
  • 更新测试和实施状态文档,覆盖 token 样式内容不遮罩、可导出行为

验证

  • swift test
  • xcodebuild -scheme DevClip -destination 'platform=macOS' build
  • ./script/build_and_run.sh --verify
  • ./script/release_check.sh

@haotangyuan haotangyuan marked this pull request as ready for review June 13, 2026 04:49
Copilot AI review requested due to automatic review settings June 13, 2026 04:49
@haotangyuan haotangyuan merged commit d595191 into main Jun 13, 2026
1 check passed
@haotangyuan haotangyuan deleted the codex/remove-sensitive-masking branch June 13, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants