Skip to content

feat(onboarding): split location and work mode fields - #200

Merged
guyghost merged 3 commits into
developfrom
guyghost-feat-onboarding-location-workmode
Jul 9, 2026
Merged

feat(onboarding): split location and work mode fields#200
guyghost merged 3 commits into
developfrom
guyghost-feat-onboarding-location-workmode

Conversation

@guyghost

@guyghost guyghost commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • 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 for remote/hybrid/onsite work.
  • Adds a dedicated Mode de travail segmented control (Indifférent / Remote / Hybride / Présentiel) with vocabulary parity to ProfileSection.remoteOptions, restricts the location field to place-only ("Paris, Lyon, Bordeaux..."), and wires the new remote state through handleComplete so the selection flows into normalizeProfileDraft and the persisted profile.
  • Authors the behavior model (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: normalizeProfileDraft already accepts and defaults remote via withProfileDefaults.

Verification

  • pnpm format:check
  • pnpm lint
  • pnpm typecheck
  • pnpm test (1753/1753 passing)
  • pnpm build

All gates green via the pre-push ci:check hook. End-to-end verified in the dev panel: selecting Remote at onboarding persists remote: 'full' and surfaces as "Remote" on the Profil page, with Paris stored independently under location.

Checklist

  • No secrets, cookies, session tokens, or generated release artifacts committed
  • Core code remains pure; I/O stays in shell modules
  • Svelte changes use Svelte 5 runes only
  • Documentation updated when behavior or setup changes

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>
Copilot AI review requested due to automatic review settings July 9, 2026 14:36
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pulse Ready Ready Preview, Comment Jul 9, 2026 3:43pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pulse-dashboard Skipped Skipped Jul 9, 2026 3:43pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 selected remote value 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.

Comment thread apps/extension/src/ui/organisms/OnboardingWizard.svelte Outdated
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>
@vercel
vercel Bot temporarily deployed to Preview – pulse-dashboard July 9, 2026 15:43 Inactive
@guyghost
guyghost merged commit c7eb0ce into develop Jul 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants