refactor(auth): gate LoginScreen/SetupWizard behind legacy-auth-ui (#36) #54
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_os!54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "36-gate-legacy-auth-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second slice on #36.
LoginScreen(654 LOC) andSetupWizard(312 LOC) are dead in the default build (hero_os boots in guest mode), but potentially useful as a styling/layout reference for future local-auth fallbacks. Rather than delete them outright, gate them behind an off-by-default feature so the source survives without compiling into the shipping binary.Changes
Cargo.toml— new featurelegacy-auth-ui = [](off by default). Not in theweborcorebundles.components/mod.rs—mod login_screen,mod setup_wizard, and bothpub uses gated on#[cfg(feature = "legacy-auth-ui")].main.rs—use components::{LoginScreen, SetupWizard}gated.rsx! {}when the feature is off. Conditions are intentionally left as-is — guest-mode boot leavesauthenticated = true, so the branches never match in default builds anyway.desktop_visible.set(false)+authenticated.set(false)fade-to-login flow gated. With no login screen to fall back to, default-build logout becomes a token-clear chime that stays on the desktop.--features legacy-auth-uirestores the original logout→login behavior.Verification
Test plan
--features legacy-auth-ui: Logout fades desktop, LoginScreen re-renders.LoginScreen/SetupWizardin the default-build binary (confirmed by compile-time gating).Refs #36.
🤖 Generated with Claude Code
hero_os boots in guest mode and these components are never rendered in the default build. Keep the source as a styling/layout reference for future local-auth fallbacks or native builds, but compile them out by default. - Cargo.toml: add `legacy-auth-ui` feature (off by default) - components/mod.rs: gate `login_screen` / `setup_wizard` module decls and re-exports on the feature - main.rs: - gate the `LoginScreen` / `SetupWizard` import - gate both rsx branches (wrapped so `rsx!{}` is used when feature is off; conditions still trigger only when the feature is on because guest-mode boot leaves `authenticated = true`) - gate the logout flow's `authenticated.set(false)` + `desktop_visible` fade — with no login screen to fall back to, logout becomes a token-clear chime and stays on the desktop. `legacy-auth-ui` restores the original logout→login behavior. Refs #36. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>