Commit 0bd467a
* feat(alarms): add SmartAlarm entity, EF config, and SmartAlarms migration
* feat(alarms): add IAlarmStore + AlarmStore with toggle + record-fired
* fix(alarms): register IAlarmStore in DI
* refactor(alarms): revise SmartAlarm to socket-state model (LastIsActive/LastTriggeredUtc; UpdateStateAsync)
* feat(alarms): add AlarmPairedEvent
* feat(alarms): route alarm pairings to AlarmPairedEvent + prime alarms on connect
* feat(alarms): provision #alarms channel + AlarmChannelLocator
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(alarms): scaffold Features.Alarms (component ids + localization catalog)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(alarms): add AlarmEmbedRenderer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(alarms): extract IAlarmLocalizer + fix stale catalog doc
Fix 1: Update stale XML comment on AlarmLocalizationCatalog.Default to reference the actual per-slice AlarmLocalizer constructor instead of non-existent shared ILocalizer type.
Fix 2: Extract IAlarmLocalizer interface (matching ISwitchLocalizer pattern) with Get(key, culture) and Get(key, culture, params args) methods. Make AlarmLocalizer implement it with <inheritdoc /> on public methods. Update AlarmEmbedRenderer ctor to accept IAlarmLocalizer instead of concrete AlarmLocalizer.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(alarms): add AlarmChannelPoster + AlarmRefresher + AlarmPairingCoordinator
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor(alarms): reuse open scope for coordinator culture read + assert prompt replacement
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(alarms): add AlarmStateRelay (state update, active-edge ping/relay, unreachable)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(alarms): add AlarmComponentModule + rename modal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(alarms): add AlarmsHostedService, AddAlarms DI, and Host wiring
Wire the smart-alarms slice live: AlarmsHostedService drives three
consume loops (AlarmPairedEvent → coordinator, SmartDeviceTriggeredEvent
→ relay, ConnectionStatusChangedEvent → relay); AddAlarms registers all
slice singletons and the hosted service; Host references the Alarms
project and calls AddAlarms() after AddSwitches(). AlarmRegistrationTests
covers both descriptor presence and captive-dependency-free resolution.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style: apply jb cleanupcode ReformatAndReorder to alarm-slice files
Whitespace-only line-wrap reformats produced by dotnet jb cleanupcode
--profile=ReformatAndReorder. No semantic changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* perf(alarms): reuse loaded alarms on reconnect refresh to avoid N+1 re-fetch
Add an IAlarmRefresher.RefreshAsync(SmartAlarm, ...) overload that renders an
already-loaded alarm, skipping the per-alarm store.GetAsync. The id-based method
now fetches-then-delegates via a shared RenderAndPostAsync helper.
HandleConnectionStatusAsync passes the alarms it already listed instead of
re-querying each by id.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9bf6c36 commit 0bd467a
52 files changed
Lines changed: 4344 additions & 10 deletions
File tree
- src
- RustPlusBot.Abstractions/Events
- RustPlusBot.Domain/Alarms
- RustPlusBot.Features.Alarms
- Hosting
- Modules
- Pairing
- Posting
- Relaying
- Rendering
- RustPlusBot.Features.Connections/Supervisor
- RustPlusBot.Features.Pairing
- Listening
- Pairing
- RustPlusBot.Features.Workspace
- Localization
- Locating
- Specs
- RustPlusBot.Host
- RustPlusBot.Persistence
- Alarms
- Configurations
- Migrations
- tests
- RustPlusBot.Abstractions.Tests
- RustPlusBot.Features.Alarms.Tests
- RustPlusBot.Features.Connections.Tests
- RustPlusBot.Features.Pairing.Tests
- RustPlusBot.Features.Workspace.Tests/Locating
- RustPlusBot.Persistence.Tests/Alarms
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Lines changed: 133 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
0 commit comments