Onboard on first open and keep link state fresh - #45
Merged
Conversation
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.
Implements plan Step 5 (onboarding first-open and link state) from the Aether refresh.
Changes
UiSlicegains persistedonboarded,onboardingStep,onboardingWorkspace; completing the wizard or navigating away from it setsonboardedand clears the wizard state (navigating to onboarding while already there preserves state).hydrateroutes to onboarding iff!onboarded && hasLocal('link.status'); remote monitors are never redirected.RepoSteprenders the repo form without a selected workspace (server resolves the sole workspace);FirstRunStepshows a Back-to-Workspace fallback when the workspace is missing.LinkSteprenders three states (no server / server configured but no repo / both) and re-checkslink.statuson window focus in addition to Retry.internal/localgw:link.statusgainsserver_configured(cfg.Addr != "");snapshot()re-reads the config when its mtime changes so a CLIaether linkwhile the GUI is open shows up without a restart. Linking through the GUI refreshes the cached config and mtime together; if the active named profile disappears from the file, the cached config is retained and re-checked later.LinkCardreads the same three-state shape.docs/local-gateway.mdlink.statusrow,docs/dashboard-frontend.mdonboarding section.Verification (plan item 6)
Vitest proves
hydrateroutes to onboarding iff!onboarded && hasLocal('link.status')(RED first: expected onboarding, got board).Note: the full Go suite was run with isolated
HOME/XDG_DATA_HOME; on a host with~/.local/share/aether/desktopinstalled, two pre-existingupdate_applytests on main assert environment-dependent behavior unrelated to this PR.Adversarially reviewed; fixes for all findings are included (navigate-to-self state wipe, named-profile repo clobber after GUI link, RepoStep dead end, Windows test config-dir leak, missing-profile fallback).