Skip to content

feat: rename Startup Profiles to Loadout, with data migration - #10

Merged
lukr-99 merged 8 commits into
mainfrom
feat/rename-loadout
Nov 23, 2026
Merged

lukr-99 merged 8 commits into
mainfrom
feat/rename-loadout

Conversation

@lukr-99

@lukr-99 lukr-99 commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

GoalMaker: Startup Profiles #20

Renames the app from Startup Profiles to Loadout, with a safe migration for existing installs.

Commits (mechanical and behaviour are separate)

  1. refactor: rename projects, namespaces and solution to Loadout - mechanical only (folders, csproj, Loadout.slnx, namespaces, LoadoutPaths, MapLoadoutApi, assembly name so the exe is Loadout.exe). No behaviour change.
  2. feat(storage) - data moves to %APPDATA%\Loadout; endpoint.json written to both folders.
  3. feat - autostart entry, link schemes, single-instance name, updater prefix.
  4. feat - user-facing text says Loadout.
  5. feat(installer) - in-place upgrade, scripts, release workflow, skill rename.
  6. docs - docs, CHANGELOG (Unreleased), pitfall.
  7. feat(backup) - new backups are named loadout-backup-<date>.json (the format name is unchanged, so old backups restore).

Decisions kept from the brief

  • Name "Loadout" in windows, tray, About, installer, Start menu shortcut, README, docs. Exe Loadout.exe, folder %LOCALAPPDATA%\Programs\Loadout.
  • Inno AppId unchanged, so the new setup upgrades in place (UsePreviousAppDir=no, [InstallDelete] removes the old folder, shortcuts and skill, CloseApplicationsFilter closes the old exe).
  • Data: if %APPDATA%\Loadout has no profiles.json, library.json or base.json and %APPDATA%\StartupProfiles exists, copy to a staging folder, verify by SHA-256, rename into place, leave MOVED-TO-LOADOUT.txt in the old folder. The old data is never deleted. Stray files in the new folder (for example error.log) are moved to Loadout.before-migration, not deleted.
  • The copy runs under a named mutex, so two processes never migrate at once. It waits (the app runs from the old folder for that run) while the old Startup Profiles is running, and retries next start. If the copy fails, the same fallback applies. Files the old app writes to its folder after the copy are saved under recovered-from-startupprofiles in the new folder and logged to error.log; nothing is overwritten.
  • The installer stops StartupProfiles.exe in PrepareToInstall (taskkill, then confirms it exited) and aborts with a message if it cannot.
  • endpoint.json goes to both folders while the old one exists. docs/API.md marks the old path deprecated.
  • Skill renamed to skills/loadout, reads the new path first, then the old one.
  • Repository name is not changed.

Additions beyond the brief (please check)

  • Link scheme: loadout:// is new; startupprofiles:// is still registered and parsed, so links in other apps keep working (deprecated).
  • Login entry: Loadout replaces the StartupProfiles Run value, on app start and on --register-login. The new entry is written first, then the old one removed. If the user had switched the old one off, the new one is not turned on. A first install (no old entry) enables it.
  • endpoint.json discovery reads the new file first and skips a file whose process is gone; the registration client tries each candidate with a health check.
  • Updates: old installs look for StartupProfiles-Setup-*.exe, so the release workflow also attaches the installer under that name (with .sha256). New builds look for Loadout-Setup-*.exe.
  • The installer removes the old user-level skill folder .claude\skills\startup-profiles and installs loadout.

Tests

Release build 0 warnings; 338 tests pass (15 Windows, 123 Core, 200 App); dotnet format --verify-no-changes and tools/validate_repository.py pass; installer compiles with Inno Setup. New tests: DataMigrationTests (new user, migrating user, both folders present, empty new folder, stray files, concurrent runs, deferral while the old app runs, failure half way then retry, stale staging folder, late writes by the old app, rerun), LegacyAutostartTests (off choice kept, enable before remove), EndpointDiscoveryTests (dead entry skipped), old-scheme parsing.

Manual test list

  1. Upgrade: with the old Startup Profiles installed and running (tray), run Loadout-Setup-<v>.exe. Old app closes; only Programs\Loadout remains; one Start menu shortcut "Loadout".
  2. First start: profiles, library, base and settings all present; %APPDATA%\Loadout exists; %APPDATA%\StartupProfiles still has its files plus MOVED-TO-LOADOUT.txt.
  3. Autostart: Task Manager > Startup shows Loadout and no StartupProfiles; sign out and in, the launcher shows.
  4. Tray: tooltip and balloons say Loadout; About and window titles say Loadout.
  5. API discovery: endpoint.json exists in both %APPDATA%\Loadout and %APPDATA%\StartupProfiles; the loadout skill finds the app; an old skill reading the old path still connects.
  6. Links: start loadout://register?appId=t&name=T&target=C:\Windows\notepad.exe and the same with startupprofiles:// both open the confirmation window.
  7. Old-name update: from an old build, "check for updates" finds StartupProfiles-Setup-<v>.exe on the release.
  8. Uninstall from Windows Settings: data in %APPDATA%\Loadout is kept; taken-over startup apps are switched back on.

Not verified

No real upgrade on a machine, no autostart/sign-in, no tray check, no run of install.ps1/uninstall.ps1 (syntax-checked only), and PrepareToInstall compiles but was never run against a live old app, no signed release. The migration was tested through unit tests, not against the real AppData (this shell sees a redirected AppData).

The user-level skill at C:\Users\krejci\.claude\skills\startup-profiles is not edited here; the installer replaces it, or copy skills/loadout.

Mechanical rename only: folders, csproj files, the solution, namespaces, LoadoutPaths,
MapLoadoutApi and the assembly name (so the exe is Loadout.exe). No behaviour change; user-facing
text, data paths and the installer follow in later commits.
…nt.json

On the first start under the new name, copy %APPDATA%\StartupProfiles to a staging folder, verify it
file by file, then rename it into place. The old folder is kept and gets a MOVED-TO-LOADOUT.txt note.
A failed copy leaves no half-filled folder, falls back to the old folder for that run, and retries on
the next start. endpoint.json is written to both folders and read from the new one first.
…me the instance

- The Run value is now Loadout. Starting the app, or --register-login, removes the StartupProfiles
  value and keeps the new one off if the user had switched the old one off.
- loadout:// is the registration scheme. startupprofiles:// still parses and is still registered, so
  links in other apps keep working.
- The single-instance name, update user agent and installer asset prefix use the new name.
Keep the Inno AppId, install to Programs\Loadout and remove the old program folder, shortcuts and agent
skill. Close the old exe during setup. install.ps1 and uninstall.ps1 handle both names. The agent skill
is now skills/loadout and reads the new endpoint.json path first, then the old one. The release also
attaches the installer as StartupProfiles-Setup-<version>.exe so installs of the old name can update.
…k scheme

README, ARCHITECTURE, CONTEXT, HANDOFF, API, INTEGRATION and SECURITY use the new name. API.md marks
%APPDATA%\StartupProfiles\endpoint.json as deprecated. Adds the CHANGELOG entry and a pitfall about
creating the new data folder before the migration runs.
The file format name stays startup-profiles-backup, so older backups still restore.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 12:44

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

…art choice

- Setup stops StartupProfiles.exe in PrepareToInstall and aborts if it keeps running.
- DataMigration takes a named mutex, defers while the old app runs, counts only profiles, library and
  base as data, moves stray files aside instead of deleting them, saves files the old app wrote after
  the copy, and reports any exception as Failed.
- --register-login keeps an old 'off' choice and enables the new entry before removing the old one.
- endpoint.json discovery skips a file whose process is gone and tries the next candidate.
@lukr-99
lukr-99 merged commit e77a5da into main Nov 23, 2026
4 checks passed
@lukr-99
lukr-99 deleted the feat/rename-loadout branch November 23, 2026 13:11
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