Repository navigation
feat(web): ask the scope before editing an Event that repeats - #236
Merged
Merged
Conversation
Update Event on an Occurrence (an Event with a SeriesId) now asks which
events take the change, in the reusable ScopeDialog over the edit dialog:
"This event only" (the existing PUT api/events/{id}, which marks it
Modified), "This and following events" (PUT api/series/{id}?scope=following
&occurrence={eventId}) or "All future events" (PUT api/series/{id}?scope=all).
None is chosen when it opens, Confirm names the scope, and it is not
destructive. A standalone Event, and an Occurrence with nothing changed,
save as before with no question.
A Series holds the name, the time of day and Unique games only, so only
those changes offer the series scopes. A changed date or changed slots
offer "This event only" with the one-line reason. A series scope reads
the Series (GET api/series/{id}) and sends it back with only those three
replaced, under If-Match = the ETag read. The rule, end, slot count,
Filters, skipped, splitAt and splitFrom go back as read. The new time of
day is read at the Series' own UTC offset. "This and following" starts
on the day of the Occurrence's key at that offset. A time that lands on
another day at that offset is refused in the dialog before any PUT.
The pure parts live in SeriesEdit.cs; the dialog's scope wiring lives in
EventEditDialog.razor.cs, and the save's busy guard (RunAsync) covers
every route, so a double click sends once. Refusals show the API's
words in the dialog's own error line and keep it open. Cancel, Escape
and overlay click drop the question and leave the edit dialog open with
focus back in it.
Refs #100, #204
Contributor
Author
DISPOSITION (t_816d92da, #100 / #204 Web part 2b)
Observations for Nerd (not fixed)
|
This was referenced Nov 25, 2026
Contributor
Author
|
Review-only follow-ups filed in the 0.6.0 milestone:
These follow-ups do not expand this PR. Its title and body remain unchanged. |
A series-scope edit of an Occurrence read the Series (GET api/series/{id})
only when Confirm was pressed, so If-Match covered only the gap between that
read and the PUT. Two admins with Edit open at once who both chose a series
scope each read the newest ETag, and the later save silently overwrote the
earlier one (#204 story 22).
The edit dialog now starts the Series read when it opens on an Occurrence,
before the admin can change anything, and a series scope sends that snapshot
back under that ETag. A Series saved by someone else after the dialog opened
is the API's 409: the dialog stays open with the API's words and no Event PUT
follows. A failed read is not retried at Confirm (that read would take a
newer version); the message says to open the dialog again. This event only
and an unchanged save never wait for the read, so a failed read leaves them
as they were.
A series PUT is never sent without If-Match: a read with no ETag header is
refused in the dialog with its own message, and SeriesService.UpdateAsync
now requires a non-empty ETag (UpdateWithNoETagSendsNoIfMatch, which blessed
the unsafe write, is replaced by UpdateWithNoETag_SendsNothing).
Tests: the stale writer after Edit-open (both series scopes, exact request
list, If-Match is the ETag read at open), a read without an ETag, a failed
read that still saves This event only and an unchanged edit; This and
following starting on the key's day at the Series' UTC-04:00 when its UTC day
is the next one; This and following for an unrolled Occurrence; the exact
Sent() list after a refused Series PUT; and a non-empty shared radio name.
Refs #100, #204
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
This was referenced Nov 25, 2026
mwg-bender Bot
added a commit
that referenced
this pull request
Nov 26, 2026
…254) ## Summary Brings the glossary, the README, the API validation doc and ADRs 0001 and 0002 in line with what `dev` does after 0.6.0. Documents only: no code, tests, workflows or `.github/` files change. ## Change - **`GLOSSARY.md`** - Series, Occurrences, zero-Selection Occurrences and the slot template have shipped, so the "Planned for 0.6.0 (#204)" wording is gone. - Comment's _Avoid_ line no longer names `ActivityNoteConversion` or its marker, which were removed in #247. - Occurrence now describes the edit scope question as it works after #250 (#237): - Update Event with nothing changed asks nothing and sends nothing. - A Modified, won or past Occurrence shows "Series changes skip played, modified and past events." and saves as This event only, with no question. - The first Occurrence of a Series is offered This event only and All future events. Later Occurrences are also offered This and following events. - The wording from #236 and #240 that is still true is kept. - **`README.md`**: the Azurite section names the one remaining Azurite class, `StorageQueryAzuriteTests` (2 tests). It no longer mentions `EM_API_URL`, the conversion test, or the warning that the conversion rewrites the whole store. It also says that the tests skip when the connection string would reach a non-loopback host. - **`docs/api-validation.md`**: the conversion paragraph now says the conversion was removed in #247 and what stays in storage (the marker row, and the old `Comments` column on rows the API has not rewritten). The Comment-response sentence names that marker the same way. - **ADR 0001**: a dated amendment records that the conversion was removed. The original decision text stays as written. - **ADR 0002**: Cancel the Series deletes the Series row and keeps past Occurrences as well as played ones, as the `DELETE /api/series/{id}?scope=all` route does. ## Validation Base `origin/dev` `9890a1dca978795988f44692d261188ae552732d`. It had not moved when I pushed. Both runs below are cold (`clean-build.sh`, then `build --no-incremental`, then `test --no-build`) and were run by the worker. | | errors | warnings | Api.Tests | Web.Tests | E2E (no stack) | |---|---|---|---|---|---| | base `9890a1d` | 0 | 0 | 901 passed + 2 skipped (903) | 1245 | 5 passed + 13 skipped (18) | | head `b5bcb79` | 0 | 0 | 901 passed + 2 skipped (903) | 1245 | 5 passed + 13 skipped (18) | - Each relative link and each backticked test-class name in `README.md`, `GLOSSARY.md`, `AGENTS.md` and `docs/**` was checked against the tree by a script. Every link resolves. The only class names that do not exist are three uses of `CommentApiTests` and one of `RetiredCommentsFieldTests` in `docs/api-validation.md`. Those lines predate this PR and are listed under Observations. - Every behaviour sentence this PR adds or changes has a `DOC-CHECK` line in the PR comment, citing the file and line that proves it. - No live flow was run, because the card asks for none for a documents-only change. **UI flows: NOT RUN by the worker.** - File sizes: `GLOSSARY.md` 196 lines, `README.md` 180, `docs/api-validation.md` 161. All are under 400. ## Notes `Refs #100, #204, #237, #238`. The issues are left open for Nerd to close by hand.
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.
Summary
Update Event on an Occurrence (an Event with a
SeriesId) now asks which events take the change. The question is the reusableScopeDialogfrom #234, shown over the Edit Event dialog. It is titled "Update repeating event", the group label is "What to update", nothing is pre-selected, Confirm stays disabled until a choice is made, and it is not destructive:PUT api/events/{id}(the existing save; the API marks the Occurrence Modified)GET api/series/{seriesId}, thenPUT api/series/{seriesId}?scope=following&occurrence={eventId}withIf-Matchset to the ETag that was readGET api/series/{seriesId}, thenPUT api/series/{seriesId}?scope=allwithIf-Matchset to the ETag that was readA standalone Event saves exactly as before (same dialog, same route, no question). An Occurrence with no changes also saves as before, with no question.
A Series holds the name, the time of day and Unique games only. All three options are offered only when the change touches nothing but those three. A changed date or any changed slot (a roll, a replaced activity, an added or removed slot) offers "This event only" alone, with the line "A changed date or changed activities apply to this event only."
Refs #100, #204
Change (Web only)
Services/SeriesService.cs:GetAsync(seriesId)returnsSeriesRead.Stored(series, eTag)orSeriesRead.Failed(message).UpdateAsync(series, eTag, scope, occurrenceId)sendsPUT api/series/{id}?scope=allor?scope=following&occurrence={id}withIf-Match(passed through as read).Shared/Events/SeriesEdit.cs(new, pure: no JS, no clock, no services) holds:Compare: what changed;Question: the options, wording and confirm texts;Body: the stored Series with only the name, the start's time of day and Unique games only replaced;OtherDay: the check for a time that falls on another day.Shared/Events/EventEditDialog.razor.cs(new partial) addsAskScope,ScopeConfirmed/ScopeCancelled,DropScopeandUpdateSeriesAsync.EventEditDialog.razoris 371 lines, under 400. It renders theScopeDialog, and Escape or overlay clicks drop the question first. The edit dialog'sTrapFocusis released while the question is open, so focus returns into the open Edit dialog.SendAsyncnow runs throughRunAsync, the one busy guard (_generating), so a double click sends once on every route. A failure keeps the dialog open withThe event was not saved. {API message}.OccurrenceEditScopeTests(21) andOccurrenceEditGuardTests(18), on a sharedOccurrenceEditFixture;SeriesEditTests(22, pure);SeriesServiceTests(+7);ServiceRouteContractTests.ServiceRouteContractTestswas not in the card's list. Its existingEveryPublicServiceMethodHasARowInTheTablefails for any new public service method until that method has a row, so the file had to change..github/.Validation
All runs are by the worker (Nerd's dispatched worker, t_816d92da).
Cold build and tests:
916eba81a0a814No test was removed, renamed or split.
Mutations: 29 break-it mutations, all killed. The list, with the tests that failed, is in the evidence file on the card. M23 removes ScopeDialog's answer guard. It is killed by the existing
ScopeDialogTests.AFastSecondAnswer_CountsOnce, which is outside the edit-scope filter.Live (
with-slot.sh, headless Chromium, America/Chicago):origin/dev)splitAt= its key), a second Series starts there, earlier Occurrences keep the old nameThe date in F5 was typed and confirmed with Enter. The calendar popup does not open in headless Chromium.
E2E against the branch stack: 17/17 passed on a fresh stack. Run on the same stack straight after F1-F8, 14 passed and 3 failed:
DeleteEvent_ConfirmationNamesIt_CancelKeepsIt_ConfirmRemovesIt,RapidSecondClick_OnConfirmedEventDelete_SendsOneRequestandSelectWinner_OnEventWithTwoSelections_SavesAndShowsTheWinner. Each of them waits for its own row button, and the row is not shown. Plainorigin/dev(916eba8) gives exactly the same 3 failures in the same order (control F1-F8, then E2E). So this comes from data seeded before the suite, not from this change (see Observations).Observations (not fixed)
devtoo. The suite should search for its row, or page to it.Notes
OccurrenceKeyat that offset, at the new time of day. The API reads the body's start as the new Series' start and requires it after every earlier Occurrence's key. If the new time lands on another calendar day at the Series' offset (possible only when the browser's offset differs), the dialog refuses after the GET and before any PUT: "At the series' own UTC offset this time falls on another day, so only this event can take it. Choose This event only, or another time."GET api/series/{id};splitFrom);alledit that drops keys.docs/api-validation.md: the Web readsGET api/series/{id}and sends its ETag asIf-Match; the Web's other-day refusal.Refs #100, #204only. Nerd closes the issues by hand.