fix: 文件没了就从魏碑里拿掉,不再重新选择 - #226
Merged
Merged
Conversation
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
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.
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.
实际改动
用户纠正:磁盘上的文件没了,魏碑里对应那一条直接消失。不要「源文件缺失」顶栏,不要「重新选择文件」。
removeItemRegistration,不碰其他文件,不整门课清空。rebindMissingImportedItem入口。明确未做
/tmp源码残留登记(那些文件可能还在)。共享文件占用
WorkspaceStore.swift、ContentView.swift验证
prepare_pi_runtime+swift build -c debug+ SelfCheck + WebEditorCheck + PiCheck 通过check_file_growth.sh origin/main HEAD:WorkspaceStore -7