Repository navigation
Save a time left blank on the voting page as no - #46
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZSHCijStZzTcMJSBYoY6t
People often marked the one time that worked and left the rest blank, meaning "not those"; the blanks stayed pending and held up "everyone has responded" and the ranking. The voting page now sends the slots it showed, and VoteAsync (unansweredAsNo) records no for each one the voter hasn't answered. An answer already saved is kept, a time added after the page loaded stays unanswered, and a withdrawn one is ignored. The success notice says how many blanks became no, and the audit records the count. The vote tool is unchanged (an agent may update a single slot), but its description now asks the agent to answer every slot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZSHCijStZzTcMJSBYoY6t
There was a problem hiding this comment.
🟡 Changes recommended
A concurrent vote save can trigger a duplicate-key insert and an unhandled DbUpdateException, rolling back the entire form submission.
1 open issue
What changed in this PR
Addresses #43 by saving unanswered times shown on the voting page as No, helping polls reach complete responses while preserving partial updates through the MCP tool.
Changes:
- Adds service-level blank-to-No handling, success notices, and audit counts.
- Passes displayed slot IDs from the voting form while leaving MCP voting behavior unchanged.
- Updates tests and design documentation, and bumps the version to 1.0.10.
| File | Description |
|---|---|
| tests/Scheduler.Web.Tests/VotingPageTests.cs | Updates page and receipt expectations for blank answers. |
| tests/Scheduler.Web.Tests/OrganizerPageTests.cs | Adapts the voting helper to the new parameter. |
| tests/Scheduler.Data.Tests/VotingTests.cs | Covers blank conversion, saved answers, slot changes, and notifications. |
| tests/Scheduler.Data.Tests/Harness.cs | Keeps test-helper votes as partial updates. |
| src/Scheduler.Web/Mcp/SchedulingTools.cs | Preserves partial voting and clarifies tool guidance. |
| src/Scheduler.Web/Components/Pages/Vote.razor | Submits displayed slot IDs and explains blank handling. |
| src/Scheduler.Data/SchedulingService.cs | Implements implicit No answers, notices, and auditing. |
| src/Scheduler.Core/Services/ISchedulingService.cs | Defines and documents the new voting parameter. |
| docs/design.md | Documents page-specific voting behavior and audit details. |
| Directory.Build.props | Bumps the version to 1.0.10. |
Review effort: Balanced
A double submit of the voting page, or the voter's agent voting while the page saves, could both find a time unanswered and insert the same vote, failing the second save on the votes primary key. Saving blanks as no made this more likely. VoteAsync now locks the caller's participant rows (as SuggestSlotsAsync already did, now a shared helper) and reads the event again under the lock before deciding what to insert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZSHCijStZzTcMJSBYoY6t
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.

Closes #43.
People often marked the one time that worked and left the rest blank, meaning "not those". The blanks stayed pending, which held up "everyone has responded" and made the ranking less clear. Now any time left blank on the voting page is saved as No.
What changed
ISchedulingService.VoteAsynctakesunansweredAsNo, the slots a form showed. Each one that isn't invotesand that the voter hasn't answered yet is saved as no. The rule lives in the service, per the project conventions.vote.castaudit records the count (blankAsNo).Vote.razor):showninput for each time and passes those IDs to the service.voteMCP tool: behavior is unchanged. An agent may update a single slot, so a slot it leaves out stays unanswered. The description now asks the agent to answer every slot.docs/design.md: updated the voting rules, thevotetool row, the voting page row and the audit description.Tests
Scheduler.Data.Testscases:VotingPageTests, where the page now saves blanks as no.dotnet test Scheduler.slnx: 124 Core, 175 Data and 93 Web tests, all passing.Generated by Claude Code