feat(profiles): support Unicode profile names - #1
Open
Repulsor0915 wants to merge 1 commit into
Open
Conversation
Anong0u0
dismissed stale reviews from themself
July 22, 2026 09:03
Submitted without user authorization; dismissed to restore PR state.
Anong0u0
requested changes
Jul 22, 2026
Anong0u0
left a comment
Owner
There was a problem hiding this comment.
This PR moves Unicode profile naming in the right direction, but several correctness and scope issues need to be addressed before merging.
P2 blockers
- When Windows rejects
CON .txt,COM1 .txt, orLPT1 .txt, distinguish an existing destination from an unsupported filename instead of returningprofile_already_existsunconditionally - A rename that becomes a no-op after canonicalization must not migrate or delete the inactive profile's record-view preferences
- When a backup has an NFC profile path but an NFD
profile.jsonname, write the canonical name back toDiskProfile.namebefore restoring any files
P3 test fidelity
- Remove the mock's
toUpperCase()-based collision approximation; the mock must not be the source of truth for Windows filename validity or collision behavior
KISS design
- The backend only rejects empty names, trims and NFC-normalizes input, and enforces a single path component; Windows filesystem operations determine filename support and collisions
- Use actual filesystem resolution during backup merge instead of a custom Unicode case-insensitive key
- The frontend and mock do not reimplement Windows filename validity, reserved-name, or Unicode collision rules
YAGNI removals
- Remove the full Unicode case-fold uniqueness policy, the
unicode-casefolddependency, case folding fromprofile_name_key(), and tests assertingStraße == STRASSE - Remove bidi-control validation, the Rust bidi helper, and the mock bidi regex
- Keep backup schema version 1 because the format is unchanged, and remove version-2 manifest output, the version 1-or-2 reader branch, related assertions, and v2-specific naming
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.
Summary
This PR expands profile name support beyond ASCII letters and numbers.
Profile names can now contain Unicode characters, including Chinese characters, spaces, accented text, and Emoji,
while continuing to use the existing
data/profiles/<name>/directory structure.Changes
Examples
The following profile names are now supported:
玩家 一號✨旅行者 二號🌙CaféMy Profile 2026Unsafe Windows filenames such as
CON,LPT1,bad/name, and names ending in a dot remain rejected.The existing profile API and
Profilestructure remain unchanged. No internal profile ID was introduced.