Skip to content

fix: 文件没了就从魏碑里拿掉,不再重新选择 - #226

Merged
taekchef merged 5 commits into
mainfrom
codex/drop-gone-files
Aug 16, 2026
Merged

fix: 文件没了就从魏碑里拿掉,不再重新选择#226
taekchef merged 5 commits into
mainfrom
codex/drop-gone-files

Conversation

@taekchef

Copy link
Copy Markdown
Collaborator

实际改动

用户纠正:磁盘上的文件没了,魏碑里对应那一条直接消失。不要「源文件缺失」顶栏,不要「重新选择文件」。

  • 父目录还在、文件确认没了:只调用 removeItemRegistration,不碰其他文件,不整门课清空。
  • 整门课或资料库文件夹找不到:条目留下,仍走「只从魏碑移除」。
  • 同路径还在另一份文件、iCloud 占位、对账读盘失败:不当成用户删了。
  • 拆掉缺失顶栏、侧栏重新选择、rebindMissingImportedItem 入口。

明确未做

共享文件占用

  • 占用:WorkspaceStore.swiftContentView.swift
  • 负责人任务:阶段 7 文件消失则条目消失
  • 预计释放:本 PR 合并

验证

  • 本地无 Xcode:prepare_pi_runtime + swift build -c debug + SelfCheck + WebEditorCheck + PiCheck 通过
  • check_file_growth.sh origin/main HEAD:WorkspaceStore -7
  • CI:合并前等完整 check 绿

If a tracked note or course file is no longer on disk and its parent
folder is still available, remove only that registration. Do not show a
missing banner or a choose-file-again action. An unavailable course or
library folder still keeps its items.
@taekchef
taekchef marked this pull request as ready for review August 16, 2026 06:10
Finder/user deletions drop the registration. A different file occupying
the same path still detaches the old URL instead of wiping the item, so
rename-generation safety stays intact.
Identity/stat injectors can return nil while the file is still on disk.
Those items must keep their ID. User deletion still drops the item.
If the file is still readable, keep the item and clear the live path so
note persistence cannot overwrite it. Drop only when the file is gone.
@taekchef
taekchef merged commit 64ce1a1 into main Aug 16, 2026
2 checks passed
@taekchef
taekchef deleted the codex/drop-gone-files branch August 16, 2026 06:35
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