Skip to content

Conversation

@mineralsfree
Copy link
Contributor

Ticket: MEN-8583

Ticket: MEN-8583

Signed-off-by: Mikita Pilinka <[email protected]>
@mineralsfree mineralsfree marked this pull request as ready for review November 26, 2025 11:34
@mineralsfree mineralsfree requested a review from a team as a code owner November 26, 2025 11:34
export const sliceName = 'onboarding';

export type OnboardingApproach = 'virtual' | 'physical';
export type OnboardingApproach = 'virtual' | 'physical' | 'mcu' | '';
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason to have the ''? if a user selects one that should be set, otherwise the slice already gets a OnboardingApproach | null in the type definition - so an empty state would be covered by this already...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

null will work; I didn't notice it in the slice definition. 🤦 Thanks for catching it. The problem was that in some cases a wrongly deducted approach was saved to the user settings. I will update

let approach = '';
if (deviceType.some(type => type.startsWith('qemu'))){
approach = 'virtual'
} else if (deviceType.some(type => type === 'esp32-s3')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

considering the instructions in the dialog, I would assume the type selection might be too narrow (e.g. they use some other mcu that's zephyr compatible...) - is there something else available to identify mcus?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've recently noticed that there is a tier in the device object now, which looks like a better candidate for approach deduction. I'll take a closer look and update accordingly. Otherwise I don't see other options

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.

3 participants