feat(onboarding): split location and work mode fields - #200
Merged
Conversation
The onboarding wizard conflated place and work arrangement: the location
placeholder read "ex: Paris ou remote" and handleComplete() hardcoded
remote: 'any', discarding any user intent.
- Add a dedicated "Mode de travail" segmented control (Indifférent /
Remote / Hybride / Présentiel) with vocabulary parity to ProfileSection
- Restrict the location field to place-only ("Paris, Lyon, Bordeaux…")
- Wire the new remote state through handleComplete so the selected work
mode flows into normalizeProfileDraft and the persisted profile
- Author the behavior model (states, events, invariants, UI mapping)
per the Model → Review → Implement → Verify workflow
Verified end-to-end: selecting Remote at onboarding persists remote: 'full'
and surfaces as "Remote" on the Profil page, with location decoupled.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Pull request overview
This PR updates the extension onboarding wizard to collect work mode (remote/hybrid/onsite) separately from location, aligning onboarding data entry with the existing profile settings and ensuring the remote preference is actually persisted into the UserProfile draft via normalizeProfileDraft.
Changes:
- Add a “Mode de travail” segmented control (Indifférent / Remote / Hybride / Présentiel) and store the selection in onboarding state.
- Update
handleComplete()to pass the selectedremotevalue instead of hardcoding'any'. - Add a behavior model doc (
onboarding-workmode-location.model.md) describing states/events/invariants and UI mapping.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/extension/src/ui/organisms/OnboardingWizard.svelte | Adds a dedicated work-mode control, updates location placeholder, and wires remote into the profile draft on submit. |
| apps/extension/src/models/onboarding-workmode-location.model.md | Documents the intended behavior/model for separating location vs work mode in onboarding. |
The work-mode options array was duplicated between OnboardingWizard and ProfileSection to keep labels/values in parity, but two copies risk drifting the next time options or wording change. Extract REMOTE_OPTIONS into src/ui/constants/remote-options.ts and import it in both surfaces so parity is enforced by construction. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The onboarding wizard now includes 4 focusable work mode buttons (Remote, Hybride, Présentiel, Indifférent) between the location field and the submit button. Increase the keyboard navigation loop from 8 to 12 iterations to accommodate the additional tab stops. Fixes the 'complete keyboard navigation flow' E2E test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
handleComplete()hardcodedremote: 'any', discarding any user intent for remote/hybrid/onsite work.ProfileSection.remoteOptions, restricts the location field to place-only ("Paris, Lyon, Bordeaux..."), and wires the newremotestate throughhandleCompleteso the selection flows intonormalizeProfileDraftand the persisted profile.apps/extension/src/models/onboarding-workmode-location.model.md) covering states, events, invariants, edge cases, and UI mapping, per the project's Model -> Review -> Implement -> Verify workflow. No core change was needed:normalizeProfileDraftalready accepts and defaultsremoteviawithProfileDefaults.Verification
pnpm format:checkpnpm lintpnpm typecheckpnpm test(1753/1753 passing)pnpm buildAll gates green via the pre-push
ci:checkhook. End-to-end verified in the dev panel: selecting Remote at onboarding persistsremote: 'full'and surfaces as "Remote" on the Profil page, with Paris stored independently under location.Checklist