feat: improve multiple reservation conflict presentation - #164
Merged
Merged
Conversation
When multiple reservations conflict with a new booking request, replace repeated heading blocks with a conflict count and simplified per-conflict items, reducing visual noise and making the message easier to scan. Add second template `conflict_item` for multiple-conflict rendering, used only when there are 2+ conflicts. Single-conflict messages use the existing `conflict` template unchanged, preserving customizations. The conflict count line (e.g. "3件の予約と重複しています。") appears once before the list, rather than repeating the heading per conflict. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ogic Add documentation for the new conflict_item template in ADMIN_GUIDE.md and ADMIN_GUIDE_ja.md, explaining that it is used only for multiple conflicts and that the conflict count line is appended by the builder, not part of the template. Extract common notification configuration resolution logic from build_one and build_item into a separate render_customization_for_conflict function to eliminate duplication and prevent Shotgun Surgery issues. Both functions now use this helper to retrieve customization settings and timezone before constructing the TemplateRenderer. Also update config/resources.toml.example to include conflict_item as an optional customization example. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
KinjiKawaguchi
pushed a commit
that referenced
this pull request
Sep 21, 2026
🤖 I have created a release *beep* *boop* --- ## [2.0.0](v1.8.0...v2.0.0) (2026-09-21) ### ⚠ BREAKING CHANGES * google_calendar_mappings.json is no longer read and the GOOGLE_CALENDAR_MAPPINGS_FILE environment variable is gone (both are ignored if left in place; reservation ids copied from pre-v1.5.1 event descriptions stop resolving). In the library API, GoogleCalendarUsageRepository::new no longer takes the mappings path. * existing resources.toml files stop loading until calendar_id entries are moved into the [storage] section (see the migration guide). In the library API, load_config returns a (ResourceConfig, StorageConfig) pair, ServerConfig and RoomConfig lose their calendar_id field, and GoogleCalendarUsageRepository::new takes the StorageConfig. * TemplateConfig gains a conflict_item field, so struct-literal construction outside this crate needs updating. * DetectIdleReservationsUseCase loses its IdentityLinkRepository type parameter and constructor argument; judge_reservation_activity drops its owner_identities parameter; GpuUsageReport gains a required unattributed field; NotificationError gains a RecipientUnknown variant; public error enums are non_exhaustive, so external matches need a wildcard arm. ### Features * improve how multiple reservation conflicts are presented ([#164](#164)) ([bbfb86b](bbfb86b)) * judge idle reservations by the reserved device, not process identity ([#161](#161)) ([6141e74](6141e74)) ### Code Refactoring * drop the id-mapping file for calendar events ([#166](#166)) ([88570ee](88570ee)) * separate the storage mapping from resource definitions ([#165](#165)) ([cbc3fdc](cbc3fdc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When multiple reservations conflict with a new booking request, the
Slack error message repeats the heading block for each conflict. This
makes the message verbose and difficult to scan. Additionally, the
reader cannot tell at a glance how many conflicts there are without
scrolling through all of them.
What
conflict_itemtoTemplateConfigfor use whenthere are multiple conflicts. It renders each conflict without the
leading heading (e.g.
⚠️ 予約が重複しています).conflict_message.rs, detect whether there are 1 or multipleconflicts:
conflicttemplate (unchanged,preserves all customizations)
(e.g. "3件の予約と重複しています。"), then list each conflict using
the
conflict_itemtemplateThis reduces visual repetition and makes conflict messages more scannable.
Example
Before:
After:
Closes #126
🤖 Generated with Claude Code