Commit d2d57a1
Subsystem 4c: Smart Storage Monitors (#storagemonitors channel, pair/validate, live contents embed + Refresh/Rename) (#27)
* feat(abstractions): storage-monitor contents DTOs + paired/triggered events
* feat(pairing): route storage-monitor FCM pairings to StorageMonitorPairedEvent
Add StorageMonitor switch arm in PairingHandler.HandleEntityAsync and
OnStorageMonitorPairing subscription in RustPlusFcmPairingSource,
mirroring the SmartAlarm pattern. Includes TDD test (30 total, +1).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(connections): storage-monitor read seam + trigger event + fake support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(domain): SmartStorageMonitor entity
* feat(persistence): add SmartStorageMonitor store, EF config, migration, and tests (Task 6)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(storage): item-name lookup (embedded items.json + resolver)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(storage): embed renderer, component ids, rename modal + i18n keys
Add StorageMonitorEmbedRenderer (pure), StorageMonitorComponentIds,
and StorageMonitorRenameModal; add 19 EN/FR localization keys (storage.*
+ channel.storagemonitors.name); bump parity test key count to 212.
Uses inline FormatRemaining helper — no Features.Commands reference.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(workspace): #storagemonitors channel spec + locator
Add ServerStorageMonitors channel key (order 6), ChannelSpec (Interactive/PerServer),
IStorageMonitorChannelLocator interface, StorageMonitorChannelLocator (CachingChannelLocator),
DI registration, and full xUnit test coverage (spec-provider + locator cache tests).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(storage): channel poster + pairing coordinator
Add IStorageMonitorChannelPoster, DiscordStorageMonitorChannelPoster (untested
integration shim delegating to DiscordChannelMessenger), and
StorageMonitorPairingCoordinator (mirrors SwitchPairingCoordinator: posts an
"Add it?" prompt on paired event, persists via IStorageMonitorStore.AddAsync on
accept with contents:null render, race-guarded TryAccept/TryDismiss).
Five new tests cover: prompt posted for new monitor, already-managed ignored,
accept persists and returns true, accept on race returns false, dismiss without
pending returns false.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(connections): supervisor primes/relays storage monitors + GetStorageContentsAsync
- Subscribe StorageMonitorTriggered in the connected window and fire-and-forget PublishStorageTriggerAsync
- Add PrimeDevicesAsync third arm: list IStorageMonitorStore, call PublishStoragePrimeAsync per entity (null → skip)
- Add IRustServerQuery.GetStorageContentsAsync; implement on ConnectionSupervisor via GetStorageMonitorInfoAsync
- Add IStorageMonitorStore + IAlarmStore registrations to AlarmPrimingTests and SwitchQueryTests harnesses
- Add FakeRustSocketSource.EnqueueStorageInfo for race-free priming test setup
- Add StorageMonitorPrimingTests: priming event, no-socket null, query-path, trigger relay (69 total, +4)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(4c): Task 11 — StorageMonitorStateRelay (trigger render + connection status unreachable)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(storage): component module (accept/dismiss/refresh/rename)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(storage): hosted service, DI extension, host wiring
Add StorageMonitorsHostedService (3 bus loops: paired, triggered,
connection-status), AddStorageMonitors() DI extension, IStorageMonitorStore
Persistence registration, Program.cs + Host csproj wiring, and registration test.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(storage): harden item-name resolver against duplicate parsed ids
ToFrozenDictionary throws on a duplicate key; two distinct string keys in
items.json can parse to the same int (NumberStyles.Integer allows a leading
sign/whitespace). In the static initializer that would surface as a
TypeInitializationException and hard-fault the feature on first use. Group by
the parsed id (last wins) so a future regenerated/hand-edited items.json
degrades instead of crashing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4418988 commit d2d57a1
61 files changed
Lines changed: 4869 additions & 1 deletion
File tree
- src
- RustPlusBot.Abstractions
- Connections
- Events
- RustPlusBot.Domain/StorageMonitors
- RustPlusBot.Features.Connections
- Listening
- Supervisor
- RustPlusBot.Features.Pairing
- Listening
- Pairing
- RustPlusBot.Features.StorageMonitors
- Hosting
- Modules
- Naming
- Pairing
- Posting
- Relaying
- Rendering
- RustPlusBot.Features.Workspace
- Locating
- Specs
- RustPlusBot.Host
- RustPlusBot.Localization
- RustPlusBot.Persistence
- Configurations
- Migrations
- StorageMonitors
- tests
- RustPlusBot.Features.Connections.Tests
- Fakes
- RustPlusBot.Features.Pairing.Tests
- RustPlusBot.Features.StorageMonitors.Tests
- RustPlusBot.Features.Workspace.Tests
- Locating
- Specs
- RustPlusBot.Localization.Tests
- RustPlusBot.Persistence.Tests/StorageMonitors
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 | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
| |||
Lines changed: 12 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 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 14 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 | + | |
Lines changed: 29 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 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
| |||
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
114 | 126 | | |
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | 111 | | |
| |||
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
| |||
348 | 361 | | |
349 | 362 | | |
350 | 363 | | |
| 364 | + | |
| 365 | + | |
351 | 366 | | |
352 | 367 | | |
353 | 368 | | |
| |||
377 | 392 | | |
378 | 393 | | |
379 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
380 | 424 | | |
381 | 425 | | |
382 | 426 | | |
| |||
558 | 602 | | |
559 | 603 | | |
560 | 604 | | |
| 605 | + | |
561 | 606 | | |
562 | 607 | | |
563 | 608 | | |
| |||
575 | 620 | | |
576 | 621 | | |
577 | 622 | | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
578 | 643 | | |
579 | 644 | | |
580 | 645 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments