Skip to content

refactor: 清理体检确认的废弃设计 + 修复正式包 KaTeX 字体 404 - #338

Merged
taekchef merged 1 commit into
mainfrom
codex/vestigial-cleanup
Aug 22, 2026
Merged

taekchef merged 1 commit into
mainfrom
codex/vestigial-cleanup

Conversation

@taekchef

Copy link
Copy Markdown
Collaborator

背景

2026-08-22 废弃设计体检(五路审计交叉验证)确认的清理批次。净 -3082 行。

实际改动

  • 删旧分栏系统(~520行):ContentView 尾部 ResizableTwoPane/ThreePane、NativeSplitCoordinator、WeiBeiSplitView、EmptyWorkspaceView;thickness 常量迁为 estimatedDividerWidth(与 StableDocumentSplitCoordinator.dividerWidth 同值)
  • 删僵尸服务:DocumentTextExtractor(入口零调用→缓存永不写入→selectedContextText 恒空,取文已由 CourseDocumentSearchIndex/BoundedPDFTextExtractor 承担)+ selectedContextText + importAndLinkSourcesFromPanel(唯一调用方 LinkedSourcesView 一并删)
  • 删死视图群:LinkedSourcesView 整文件、CourseWorkspaceComponents 7 个零引用组件(保留共享 courseTitleDisplayFont 函数组)、2 个死枚举、Theme 3 个死类型、NotesAgentView 2 个死 chrome helper、SettingsView.segmented、Resources/Brand 2 张无引用图
  • 删死资源:rich_answer_worker.py(全仓零引用仍进包)、visualize/assets(CDN 模板与离线安全模型相悖)
  • 修 KaTeX 字体 404(正式包数学公式字体从未生效):build_editor.mjs 字体平铺输出,匹配 SPM .process 拍平布局;SelfCheck 新增两条防回归断言(Editor 无子目录 + css 相对 url 全部可达)
  • 文档纠偏:删 design-qa.md;pane-toggle-icons.md 加历史横幅;file-model-convergence 加回退横幅(设置新增资料库位置迁移入口 #277 revert,设置新增资料库位置迁移入口(重执行方案任务一) #293 重落地);新增 Docs/audit/README.md

未做(判定为活设计,体检报告中曾疑似死)

  • interactiveVisualizationsEnabled:extension.ts 有快照/系统提示/工具拦截三层消费,是缺 UI 入口的隐藏开关,删除需跨 Swift+TS 单独立项
  • TextScale 旧五档 case:存档解码兼容,有意保留
  • NativeAgentRuntime 4 个骨架死类型:仅存在于实验分支 codex/native-agent-runtime,main 无此代码,归该线处理
  • README 未加 Native 现状段:main 上本无 Native,README 描述准确;实验分支合并时自行更新

共享核心文件占用(AGENTS.md 声明)

  • ContentView.swift:本任务占用,合并即释放
  • WorkspaceStore.swift:本任务占用(纯删除 -12 行),合并即释放
  • script/build_editor.mjs:本任务占用(assetNames 一行),合并即释放
  • WeiBeiSelfCheck/main.swift:新增断言,合并即释放

验证

  • swift build 全包通过
  • swift run WeiBeiSelfCheck 通过(含新增 2 条字体断言)
  • npm run build:editor 重建产物,editor.css url 已平铺,git rename 检测 100% 匹配
  • CI 将补:XCTest、editor scope(WebEditorCheck)、file growth(WorskpaceStore 净减)

冒烟

轻量真实 App 冒烟待合并前完成(编辑器打开/公式渲染/课程页/设置页四处)。

- 删 ContentView 尾部旧分栏系统(ResizableTwoPane/ThreePane、NativeSplitCoordinator、WeiBeiSplitView、EmptyWorkspaceView,~520行),thickness 常量迁为 estimatedDividerWidth
- 删 LinkedSourcesView 整文件与 WorkspaceStore.importAndLinkSourcesFromPanel、selectedContextText(零调用方)
- 删 DocumentTextExtractor(取文已被 CourseDocumentSearchIndex/BoundedPDFTextExtractor 取代,缓存永不写入)
- 删 CourseWorkspaceComponents 7 个零引用旧组件(保留共享字体函数组)、CourseDocNotePresentation/CourseConversationSection 死枚举
- 删 Theme.WeiBeiTone/WeiBeiBrandMark/AppearanceThemePaletteButton、NotesAgentView 2 个死 chrome helper、SettingsView.segmented 死 helper、Resources/Brand 两张无引用图
- 删 AgentResources/python/rich_answer_worker.py 与 visualize/assets(CDN 模板,与离线安全模型相悖)
- 修复:build_editor.mjs 字体平铺输出,消除 SPM .process 拍平后 url(./fonts/…) 404(正式包数学公式字体从未生效);SelfCheck 新增 Editor 无子目录 + css 相对路径可达两条防回归断言
- 文档纠偏:删 design-qa.md;pane-toggle-icons.md 与 file-model-convergence 计划加历史/回退横幅;新增 Docs/audit/README.md 阅读规则

保留(体检后判定为活设计):interactiveVisualizationsEnabled(TS侧三层消费,是隐藏开关非死代码)、TextScale 旧五档(存档兼容)、全部迁移/兼容分支
@taekchef
taekchef marked this pull request as ready for review August 22, 2026 12:32
@taekchef
taekchef merged commit f766a78 into main Aug 22, 2026
2 checks passed
@taekchef
taekchef deleted the codex/vestigial-cleanup branch August 27, 2026 14:29
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.

1 participant