# Changelog

## Unreleased (2026-04-21)
- Added optional sidebar groups for hosts, including group creation, editing, deletion, and host assignment.
- Added grouped host ordering, group reordering via drag and drop, and clearer visual feedback while moving groups.
- Improved group header styling to better distinguish groups and ungrouped hosts in the sidebar.
- Fixed a launch crash in grouped builds caused by async ping tasks writing back to stale array indexes after the server list changed.

## 26.1.9 (2026-04-19)
- Reduced idle CPU usage and energy impact by changing the interval indicator from a permanent 60 FPS timer to a 1-second update cadence.
- Reset the interval indicator cleanly when the refresh interval changes or when the indicator is hidden.

## 26.1.8 (2026-04-19)
- Fixed a crash in `PingService` caused by concurrent mutation of shared ping state from multiple async ping tasks.
- Moved ping state tracking and reboot suppression windows into an actor so ping success/failure handling is serialized safely.

## 26.1.7 (2026-04-19)
- Added remote reboot support for hosts running KeyHelp API 2.14 or newer.
- Added a dedicated `APIv2_14` client and mapped 2.14+ hosts to it instead of treating them as API 2.13.
- Fixed the reboot request to call `/api/v2/server/reboot` with the required JSON confirmation payload.
- Changed the reboot confirmation and result UI to non-blocking sheets/banner feedback so failures no longer trap the app in modal dialogs.
- Improved API error messages by surfacing the server response body instead of only generic HTTP status codes.
- Reduced expected reboot noise by suppressing ping checks for a short grace period after a reboot request.

## 26.1.6 (2026-04-19)
- Publish Gitea releases as stable by default instead of pre-releases.
- Update the Homebrew tap automatically after each successful release by rewriting the cask version and DMG checksum, then pushing the tap repo.
- Simplified the README for end users by adding clear install options and trimming internal release-engineering details.
- Ignore the local `homebrew-tap/` checkout in the main app repository.

## 26.1.3 (2026-01-03)
- Fixed version handling for changelogs.

## 26.1.2 (2026-01-03)
- Synced version.json to 26.1.2.

## 26.1.1 (2026-01-03)
- Fixed changelog extraction in publish script.

## 26.1.0 (2026-01-03)
- Auto-populate release description from CHANGELOG when publishing to Gitea.

## Prereleases

### Fixed
- Fixed excessive refresh timer resets by properly cancelling previous subscriptions and validating value changes before recreating timers.
- Fixed interval indicator to respect user's refresh interval setting instead of always assuming 60 seconds.

### Added
- Added status notifications for server monitoring in Preferences → Notifications:
  - "Status Notifications" toggle: alerts when servers go offline/online or services change status.
  - "Alert Notifications" toggle: (placeholder for future alert threshold configuration).
- Ping status changes now trigger notifications (Server Online/Offline).
- Service status monitoring tracks individual services (DNS, FTP, SSH, HTTP, HTTPS, etc.) and alerts when they go offline or come back online.
- Notification permissions are requested automatically when the app launches.

### Previous Changes
- Flattened the project structure so sources live at the repository root instead of the nested `iKeyMon/` folder and updated the Xcode project accordingly.
- Fixed build settings (entitlements, preview assets) and placeholder previews to work with the new layout.
- Migrated the updated API layer and unified `ServerInfo` model from the previous branch.
- Added verbose logging in `MainView` to trace server loading, selection, and fetch/ping activity when the list appears empty.
- Switched `MainView` and `ServerFormView` to the version-aware API client (`APIFactory`/`APIv2_12`) for server summaries and introduced a shared `PingService`.
- Detection now probes `meta.api_version` so future API versions are selected automatically, and the ping loop logs only failures to keep output quiet.
- Introduced repository-wide version management via `version.json` + `scripts/sync_version.sh`, ensuring Xcode targets and release artifacts stay aligned.
- Enhanced `scripts/build_release.sh` to timestamp/harden signatures, notarize DMGs, and optionally publish tagged releases (pre-release by default) with ZIP/DMG assets directly to Gitea when credentials are configured.
- Integrated Sparkle (via Swift Package Manager) to handle automatic update checks, downloads, signature verification, and relaunches, replacing the previous custom updater UI. Preferences now simply surface Sparkle's check/download toggles.
- `scripts/build_release.sh` can optionally run Sparkle's `generate_appcast` (when signing key and download prefix env vars are set), producing a ready-to-host `appcast.xml` alongside the ZIP/DMG artifacts.
- Further reduced MainView console noise by removing redundant refresh/onAppear logs.
