-
Notifications
You must be signed in to change notification settings - Fork 7
ENG-1656 Rename folder for imported vault #1130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
trangdoan982
wants to merge
13
commits into
main
Choose a base branch
from
eng-1656-rename-folder-for-imported-vault
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+213
−78
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1c3615e
ENG-1656: Rename imported vault folders to owner-username-spaceName
trangdoan982 2bd6a6d
Fix import folder rename edge cases and CI lint findings
trangdoan982 42425cf
remove tests
trangdoan982 aaf0cdf
cleanup
trangdoan982 7eb9501
simplify the flow
trangdoan982 159aaa8
bug fix
trangdoan982 72bf26d
remove auto-rename migration
trangdoan982 0803a25
address review: type guard, inline JSON.parse, explain trailing-comma…
trangdoan982 3ea5563
replace heuristic author resolution with Supabase space membership query
trangdoan982 598da9c
simplify owner name resolution: reuse fetchUserNames + authorId lookup
trangdoan982 7f76128
ENG-1656 Resolve import folder owner from space membership, not node …
trangdoan982 7b3ba96
Merge remote-tracking branch 'origin/main' into eng-1656-rename-folde…
trangdoan982 0f388d8
ENG-1656 Document import root rename limitation
trangdoan982 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's the right call, but flagging that means we're not resilient to the user renaming the folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth splitting into two cases, because the answer differs:
Renaming an individual import folder is handled. Folder identity is carried by
.dg.metadata(spaceUri), not by the basename.findImportFolderBySpaceUriscans every child ofimport/and matches onspaceUri, soimport/alice-vault→import/whateveris found again on the next import and reused rather than duplicated. That is the reason the auto-rename migration could be dropped in 72bf26d.Renaming or moving the
importroot is not handled — and I think that is the case you are pointing at, since the line is theif (!importExists) return null;guard.IMPORT_ROOTis the fixed string"import"andadapter.listis non-recursive, so renaming the root toimported/, moving it, or nesting import folders one level deeper makes existing imports invisible and the next import recreates them under a freshimport/. Same if.dg.metadatais deleted.Not fixing that here — making the root configurable or the scan recursive is a bigger change than this ticket — but I recorded it as a known limitation on
IMPORT_ROOTin 0f388d8 so it does not have to be rediscovered. Happy to file a follow-up if you think it is worth handling.