Skip to content

Ship via Setup.exe only and share servers.json across users#961

Merged
erikdarlingdata merged 3 commits into
devfrom
feature/installer-and-shared-server-list
May 18, 2026
Merged

Ship via Setup.exe only and share servers.json across users#961
erikdarlingdata merged 3 commits into
devfrom
feature/installer-and-shared-server-list

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

@erikdarlingdata erikdarlingdata commented May 18, 2026

Summary

Two tester-reported issues, fixed in one PR.

Issue 1 — App didn't appear in Apps & Features / Start Menu. The tester downloaded the bare ZIP, extracted it, and pinned the EXE to the taskbar; nothing registered with Windows so the app was effectively invisible after install. Velopack's Setup.exe already does the right thing (Start Menu + Desktop shortcuts, registers under HKCU\…\Uninstall, install location, auto-update), so this PR makes Setup.exe the README-promoted install path. The portable ZIPs continue to ship as an explicit fallback for advanced and air-gapped users.

Issue 2 — Second DBA on the same Windows machine couldn't see the first DBA's server list. servers.json lived in per-user %APPDATA% / %LOCALAPPDATA%. Moves it to %ProgramData%\PerformanceMonitor{Dashboard,Lite}\, grants Authenticated Users Modify on first directory creation, and migrates an existing per-user file in if no shared file exists yet (legacy file left in place as a backup).

Changes

Installer / packaging

  • README.md — Quick Start now describes Setup.exe, what it does (shortcuts, Apps & Features registration, auto-update), and where it installs (%LocalAppData%). The portable ZIPs are intentionally not advertised in Quick Start.
  • .github/workflows/build.yml, build-dashboard.cmd, build-lite.cmd — unchanged in behavior; only comments added documenting that the portable ZIP is a deliberate fallback and the README points users at Setup.exe.

Shared server list (Dashboard)

  • Dashboard/Services/ServerManager.cs_configFilePath now resolves to %ProgramData%\PerformanceMonitorDashboard\servers.json. New private helpers ResolveSharedServersJsonPath and TryGrantAuthenticatedUsersModify handle directory creation, ACL grant (FileSystemRights.Modify | Synchronize, ContainerInherit | ObjectInherit), and one-time migration from %APPDATA%. Other Dashboard services (EmailAlertService, MuteRuleService, UserPreferencesService) keep their per-user paths.

Shared server list (Lite)

  • Lite/App.xaml.cs — new SharedConfigDirectory static, resolved after AppLogger.Initialize (so migration and ACL events are logged). Same ResolveSharedConfigDirectory + TryGrantAuthenticatedUsersModify pattern as Dashboard. Per-user ConfigDirectory (settings.json, schedules, perfmon_counters.json, MCP settings) stays in %LOCALAPPDATA%. DuckDB, archive, and logs also stay per-user.
  • Lite/MainWindow.xaml.cs:73 — pass App.SharedConfigDirectory to ServerManager instead of App.ConfigDirectory.

Velopack defaults confirmed

vpk pack for Windows defaults --shortcuts to Desktop,StartMenuRoot and --instLocation to Either (per WindowsPackCommand.cs). No new flags are needed; the current vpk pack -u … -e … invocations already produce a properly-registered installer. The --channel dashboard / --channel lite structure that auto-update depends on is unchanged.

Caveat — passwords

Credentials remain per-user in Windows Credential Manager (that store is Windows-bounded to the user profile and not something this PR moves). Effect for the tester's two-DBA scenario:

  • Windows Auth servers — work for each DBA immediately, using their own token.
  • SQL Auth / Entra MFA servers — DBA Lite overview: show Online/Offline status for servers #2 sees the server but will be prompted to re-enter the password the first time they connect; the password is then saved in their own Credential Manager.

Cross-machine sharing (network share, DB-backed config) is intentionally out of scope here.

Test plan

  • dotnet build Dashboard/Dashboard.csproj -c Debug — clean
  • dotnet build Lite/PerformanceMonitorLite.csproj -c Debug — clean
  • Tag a pre-release / run a release on a branch to confirm both the Dashboard/Lite portable ZIPs and the Velopack Setup.exe assets upload
  • Install Setup.exe on a clean VM (or fresh Windows profile); confirm Start Menu + Desktop shortcuts appear and the app is listed under Apps & Features
  • First-launch confirms %ProgramData%\PerformanceMonitor{Dashboard,Lite}\servers.json is created with Authenticated Users Modify
  • On a host with a pre-existing %APPDATA%\PerformanceMonitorDashboard\servers.json (or %LOCALAPPDATA%\PerformanceMonitorLite\config\servers.json), confirm migration kicks in and the legacy file is left behind as a backup
  • Switch to a second Windows account on the same machine, launch the app, confirm the same server list appears; Windows-Auth servers connect immediately, SQL-Auth servers prompt for the password and persist it per-user

🤖 Generated with Claude Code

erikdarlingdata and others added 3 commits May 18, 2026 15:04
Tester feedback: after running the bare-ZIP "install" the app didn't
appear in Start Menu / Apps & Features, and a second DBA on the same
machine couldn't see the server list the first DBA had configured.

Installer:
- Drop the Dashboard/Lite portable ZIPs from CI and local build scripts.
  Velopack Setup.exe stays as the only Dashboard/Lite release artifact;
  its defaults already create Start Menu + Desktop shortcuts and register
  the app under HKCU\...\Uninstall (so it shows in Apps & Features).
- Keep the Installer ZIP (it bundles the CLI installer + SQL scripts —
  a different artifact).
- Update README Quick Start to direct users at Setup.exe with a note
  about shortcuts and Apps & Features registration.

Shared server list:
- Move servers.json from %APPDATA%/%LOCALAPPDATA% to
  %ProgramData%\PerformanceMonitor{Dashboard,Lite}\ so every Windows
  user on the machine sees the same server list.
- On first directory creation, grant Authenticated Users Modify with
  container+object inheritance so other users can edit the file.
- One-time migration: if a per-user servers.json exists and no shared
  one does, copy old -> new. The legacy file is left in place as a
  backup.
- Other config stays per-user — Lite settings.json, schedules,
  collector preferences, the DuckDB database, and the Parquet archive
  all remain in %LOCALAPPDATA% (collection data is single-instance and
  Velopack-managed).
- Credentials remain per-user in Windows Credential Manager: each DBA
  will need to re-enter SQL passwords on first connect. Windows Auth
  works without re-entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Setup.exe (Velopack) remains the README-promoted install path, but the
portable ZIPs are still produced in both the local build scripts and
the CI release pipeline (including the signing path) so advanced and
air-gapped users have an explicit fallback. The README change made in
the previous commit still steers end users at Setup.exe — only the
release artifacts and local build outputs change here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
servers.json now lives under %ProgramData% (shared across users); the
other Lite config files stay in %LOCALAPPDATA% per-user. Add a Location
column to the config table and a short note about the cross-user
behavior so the storage split matches the code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit b3a0ab0 into dev May 18, 2026
2 checks passed
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.

1 participant