Skip to content

Add fleet transition notifications - #268

Draft
Guffawaffle wants to merge 14 commits into
STFC-Mod:devfrom
Guffawaffle:feature/fleet-transition-notifications
Draft

Guffawaffle wants to merge 14 commits into
STFC-Mod:devfrom
Guffawaffle:feature/fleet-transition-notifications

Conversation

@Guffawaffle

@Guffawaffle Guffawaffle commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Adds opt-in fleet desktop notifications on Windows and macOS with independently selectable audio cues. [ui].notify_fleet_events accepts ArrivedInSystem, ArrivedAtDestination, StartedMining, NodeDepleted, Docked, RepairComplete, MinerOPC or All; [audio].alert_fleet_* selects individual cues. Case-insensitive fleet tokens use length-aware ASCII matching, including safe rejection of embedded-NUL suffixes and non-ASCII unknown values.

Following #313, default-enabled [patches].fleetnotificationhooks owns installation independently. Fleet Watch subscribes continuously and output reads current choices; disabled arrivals are consumed and MinerOPC crossings update quiet baselines, preventing replay after re-enable. Current enabled events control fast polling. NodeDepleted forwards native handling once and suppresses duplicate desktop forwarding only while the custom desktop alert is selected. macOS authorization is separately idempotent and can be requested when desktop alerts are enabled after audio-only/all-off startup; delivery still depends on OS permission.

Uses the existing Fleet Watch/shared screen dispatcher and the explicitly inherited audio-cue dependency #253. No second mining poll or notification delegate is added. The startup-only audio-mask cache is removed; callbacks derive enabled audio from current cue values.

Validation: exact Windows release build, arrival/MinerOPC cache fixtures, four constexpr parser boundary cases and all 11 example TOMLs pass. Three independent reviews cover the complete PR and final correction. Windows270 NodeDepleted static fit is a 25-byte overwrite within a 128-byte extent. Exact-artifact output/toggle/authorization/audio behavior, Mac native extents and inherited EventModel/audio-thread qualification remain open; current cargo metadata matches but existing property helpers retain future metadata-drift risk. CI starts on publication without waiting for results.

@Guffawaffle
Guffawaffle force-pushed the feature/fleet-transition-notifications branch from 25ac470 to 1151d28 Compare September 28, 2026 00:00
@Guffawaffle

Guffawaffle commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Hook/feature alignment follow-up for #313

Follow-up to #313: keep hook installation independent of feature enablement, with default-enabled compatibility switches under [patches] and feature checks inside the installed hooks.

installFleetNotificationHooks is currently derived from [ui].notify_fleet_events and configured [audio].alert_fleet_* cues. The node-depletion detour and observer subscription are also selected from startup masks. Add an independent hook switch; install supported detours independently of event selections, and read active feature selections in behavior callbacks. Preserve native callbacks and treat observer state/baselines separately from hook installation. Update this owning branch first, then propagate it to #294. Dependency chain: #253 → #268 → #294.

Published 4b0d57e: independent default-enabled fleetnotificationhooks, current desktop/audio choices, consumed disabled arrivals, quiet OPC baselines, current fast-poll demand and separately idempotent Mac authorization. Fixed length/NUL/UTF8 fleet token parsing and removed the stale startup audio mask cache. Exact Windows build, arrival/cache fixtures, parser constexpr cases and all 11 TOMLs pass; three lanes reviewed full PR plus correction. Windows270 static node fit is 25 within128 bytes. Native output/toggles/OS behavior and Mac extent/layout/audio-thread evidence remain unqualified. New CI is queued; proceeding without waiting.

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