pub fn startup_target(profiles: &[Profile], ask_on_start: bool) -> StartupTargetExpand description
Decide the startup target from the profiles present and the user’s setting.
Pure, because the rule is worth testing and the inputs are trivial to state:
- No profiles at all → picker (which renders as the first-run login).
- The last-used profile has a PIN → picker, regardless of the setting. A code that could be skipped by relaunching is not a code.
- More than one profile and “ask who’s watching” is on → picker.
- Otherwise → resume, exactly as the app behaved before profiles existed.
TRACES: UR-082 | DR-274