Repository navigation
feat(apple): Allow user-configurable account slug - #9119
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
Adds a new user-configurable “account slug” field across settings persistence, validation, and UI.
- Introduces
accountSlugin the view model with validation hooks and integrates it into apply/reset logic. - Persists the slug in the store during sign-in and exposes it in the WebAuthSession URL.
- Adds a new “General” tab to the Settings UI on both iOS and macOS for editing the slug.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| SettingsViewModel.swift | Added accountSlug property, validation methods, state logic |
| SettingsView.swift | New “General” tab with account slug fields and UI adjustments |
| Store.swift | Persists accountSlug during sign-in |
| WebAuthSession.swift | Appends slug to the auth URL used for web authentication |
Comments suppressed due to low confidence (1)
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/SettingsViewModel.swift:152
- The new
isAccountSlugValidmethod and slug persistence paths lack unit tests. Add tests to cover valid and invalid slug inputs and persistence behavior.
return true
….swift Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
thomaseizinger
left a comment
There was a problem hiding this comment.
Nice work! This is a small but good UX improvement. Excited to ship this on all clients.
I think this deserves a changelog entry.
|
|
||
| // This will save the account slug even if overridden from MDM. This is what we want - if the admin removes the | ||
| // override, this will take effect again. | ||
| try await setAccountSlug(authResponse.accountSlug) |
There was a problem hiding this comment.
So this effectively saves the last used one, right?
There was a problem hiding this comment.
Yeah. In most cases a nice little UX bump for nearly all users.
There was a problem hiding this comment.
For MSPs though, it could be a step backwards. Will tackle that later.
Now that configuration is persisted in a more reasonable fashion, we can expose a new
Generalsection to the Settings, allowing the user to configure an account slug.This field will automatically be populated upon the first sign in, so that subsequent sign-ins will take the user directly to the account sign in page.
Fixes #5119
Related #8919