Repository navigation
On-call: edit user overrides, and one person's overrides may not overlap (#7630, #7631) - #7770
Merged
Merged
Conversation
…e scope (#7630, #7631) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…first: the override dialog's pickers hold minutes) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… are picked (#7630, #7631) The one Add/Edit dialog (UserOverrideFormModal) for the User Overrides tables and a schedule's active overrides card; the overlap notice under Ends with Edit that override; Overlaps marks on legacy overlaps; tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…guage (#7630, #7631) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… mark reads out once, the note is valid HTML (#7630, #7631) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…#7630, #7631) The User Overrides page gains an Edit an override section (who covers, when it starts and ends; who is away stays; an ended override is locked), says that two overrides of one person on one policy, or both global, may not overlap (back to back is fine; policy over global is allowed and the page says which is used), how overlaps saved before the rule are marked, the Edit permission, and the API's PUT. All 16 translations follow line for line; the facts suite holds the page to the model, the edit rule, the service and the forms. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n several are ticked (#7630) The server now refuses an override that overlaps another of the same person in the same scope, in a sentence that says who covers them and when. The phone's Get cover sheet shows that sentence as the server words it and stays open; with several policies ticked, the refusal of one of them starts with that policy's name, since the server's own words say only "this policy". Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Postgres (#7630) UserOverrideOverlapPostgres races adds and edits through the real override service on a migrated Postgres (every table cloned into a schema of its own): twelve overlapping adds of one person, on one policy or all global, held until every one has passed its checks, save exactly one and the rest are refused naming it; an add and an edit, or two edits, that overlap only with each other cannot both pass, free racing or with one held inside its lock while the other tries; back to back, other people, other policies, global beside a policy's and another project all save. Without the advisory lock, or with the edit's check dropped, the racing cases fail. Runs in the Postgres Schema Drift workflow's shard 1, opted in with RUN_POSTGRES_USER_OVERRIDE_OVERLAP_TESTS. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nal types (#7630, #7631) compile-tests' parts hold Dashboard files to exactOptionalPropertyTypes: Starts, edited before it starts, says nothing but the time zone with an empty description rather than an undefined one, and Ends always has its footer, which draws the dialog's overlap notice when one is handed in and nothing otherwise. The M-R translation test's override rows carry the override's id and policy the rows now have. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Dashboard locale files' tails conflicted (main's PromQL and Twilio words, the branch's override edit and overlap words): main's keys first, then the branch's, in all 18 files, the same keys in the same order. Main brings #7655 (minute pickers), which this branch builds on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…override edit (#7630, #7631) An override edit carries forward the people each override named and its times before the edit (pairs and before), so OnCallShiftConfigPropagation reads the people from pairs. The Add User Override form moved from the table into UserOverrideFormModal, which also edits one: LongFormStepsGuard lists it there, with why it is one page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
… to do (#7631) ErrorMessagesGuard holds each file to no more messages that are not sentences than it had. The edit's four refusals repeated the add's ("Start time must be before end time" and the rest); they now say what happened and what to do next: an override has to end after it starts, always has both times, and the person away cannot cover for themselves. The add's own messages are as they were. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Dashboard locale files met at their tail again: main's 12 new keys first, then this branch's 28, so every locale keeps en.json's keys in en.json's order (51825 keys each). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the dark theme (#7630, #7631) Theme.css re-colours the light utility classes under html.dark, one rule per class; a class without one keeps its light colour and nothing fails. UserOverrideDarkMode holds the dialog, the notice under Ends (red for an overlap, grey for a note), the lists' Overlaps mark (amber) and the Edit on the lists and the Active overrides card to what Theme.css remaps, with no dark: variant and no colour built from a template. An unmapped colour on the mark, or a dark: variant on the notice, fails it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's translation fixes changed values inside the Dashboard locale files; they merged on their own. The branch's 28 keys stay at the tail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's Twilio account description ends each Dashboard locale file now; the branch's 28 keys follow it at the tail, in en.json's order. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e dialog does (#7630) Where overrides saved before the rule put both a skip and an override that names who covers in the way of new times, the server named the one that starts first, while the dialog's notice and the Overlaps marks name the one used there. The server now reads the overrides in the way and names the one used first: one that names who covers over a skip, then the one that starts first, then the one added first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's exception breadcrumb words now come before the Twilio account description at the tail of each Dashboard locale file; the branch's 28 keys follow them, in en.json's order. Every locale file is main's, key for key, plus those 28. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#7630, #7631) The suite keeps console.error to pass on what is not a nesting warning, as the other suites that watch for them do: with the rule switched off for that one line, and a word on why. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's new words (the Layers page's save bar among them) end each Dashboard locale file now; the branch's 28 keys follow them, in en.json's order. Every locale file is main's, key for key, plus those 28. The drift workflow keeps both new Postgres steps: the schedule layers save (shard 3) and the user override overlap (shard 1). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's new words end each Dashboard locale file now; the branch's 28 keys follow them, in en.json's order. Every locale file is main's, key for key, plus those 28. Main's new on-call docs facts merge beside the branch's in OnCallAdministrationDocsFacts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… a field that can change UI review of editing user overrides and refusing overlaps (#7630, #7631): - Starts of an override not started yet said its column's description, "When the override starts sending the Override User's alerts to the Route Alerts To User", in English in every language: its empty description fell back to the column's. It now says what it may be moved to, in all 18 Dashboard languages, and a test holds every row of the Add form and both Edit forms to words of their own. - Who is away in the Edit dialog is the person alone: a locked Change button offered what the description says is not made there. A people picker field can now be read-only (PeoplePickerFieldConfig.isReadOnly). - A dialog no longer starts its focus on a read-only field - an override under way opened with the caret in its locked Starts. The first field that can be changed comes first; Tab still reaches the read-only one. - The overlap notice and the Overlaps marks write times as the lists do: Sat, Nov 14, 01:25 - no zone, which the dialog and the lists already say, and no year while it is this year. - The Overlaps mark draws two stacked squares instead of the warning triangle the policy-scope pill beside it uses; a changed override's feed entry draws an edit pencil instead of the added one's arrow. - The policy feed's filter names User Override Changed in every language (FeedOptionsLocales failed on it). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 13, 2026
…erlap and edit words This branch reads two more files for the Dashboard's keys (UserOverrideOverlap.ts and UserOverrideEdit.ts, #7630 and #7631), and App's I18nExtractStrings pins the list of source roots: it failed on the two it did not name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 14, 2026
simlarsen
pushed a commit
that referenced
this pull request
Nov 14, 2026
Brings in main up to d85d840: user overrides that can be edited (#7770: #7630, #7631), owner and on-call policy conditions (#7554, #7582, #7583), the paging docs (#7596) and the rest. Conflicts, each kept both ways: - WorkspaceNotificationRule's description keeps the API's account of updatesToPost and its on-call kinds, and adds main's sentence that owner and on-call policy conditions name people, teams and policies of this project by ID. The rule form hides the column's description (hideColumnDescription), so its length is the API reference's. - WorkspaceNotificationRuleService checks a new rule's updatesToPost and then, as main does, the IDs its conditions name. - OnCallDutyPolicyUserOverrideService imports main's FeedMarkdown with this branch's OnCallChatText and WorkspaceMessageTime. - The Dashboard locale files keep both sides' keys, each once (i18n:extract makes no change; i18n:check passes). main's new OnCallDutyPolicyFeedEventType.UserOverrideChanged is mapped to the User overrides update, as added and removed are: ON_CALL_DUTY_POLICY_FEED_UPDATE_KINDS is a Record of every entry type, so the merge needs it to compile. Co-Authored-By: Claude Opus 5.5 <[email protected]>
simlarsen
pushed a commit
that referenced
this pull request
Nov 14, 2026
…olicy's channels too (#7549) #7770 (#7630, #7631) lets an override be edited, and the edit writes a User Override Changed entry in the policy's feed, which its chat channels were sent as written: "Changed a User Override Rule for user ... All alerts will be routed to ... from ... to ... Changed: who covers (it was ...)", each time in the zones of both people. The channels now hear the override as it is now, said as an added one is, each moment in the reader's own zone: ✏️ Changed an override on Payments: @Carol covers for @jane from tomorrow at 9:00 AM to tomorrow at 5:00 PM. What it was stays in the policy's feed. The line is posted under the User overrides update (the merge mapped the entry there), so the box's words now say "Overrides added, changed and taken back", in all 18 Dashboard languages, and so does the Slack docs' table of on-call updates, in all 17 languages. OnCallChatText's added and changed lines share one wording of who covers for whom. Tests: the exact changed line with a cover, without one and with an empty name (OnCallHandoffPosts); what the real edit posts to the channels - a new cover, a cover taken off, new times, nothing for an edit that changes nothing or a global override's - and that the feed keeps what it was (OnCallDutyPolicyUserOverrideEdit); the entry is a User overrides update, and the override service gives each of its three entries a short line (FeedUpdateKinds). Mutation-checked: mapping the entry elsewhere, leaving it unmapped, dropping its line and swapping who covers each fail them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 #7630, Closes #7631
What changes
Edit a user override (#7631). Every list of overrides has an Edit: a policy's User Overrides tab, the project's User Overrides page (global ones), and the Active overrides card on a schedule's Layers page. It opens the same dialog as Add User Override, filled in:
Editing takes the same rights as adding (Edit On-Call Policy User Override, and the project-wide grant for a global override), and the server checks every rule above, whatever sends the edit (the API's
PUT /api/on-call-duty-policy-user-override/:idtoo). Each refusal of an edit is a sentence that says what to do next, for example:Each edit of a policy's override writes one User Override changed entry to the policy's feed (and its chat updates), saying what changed.
One person's overrides may not overlap (#7630). The server refuses an add or an edit that overlaps another override of the same person in the same scope (both on one policy, or both global), naming the other one in the caller's time zone, then what to do:
ProjectLimitLock,user-override-times): adds throughgetCreateLimit, edits through a newDatabaseService.getUpdateLimithook. Two writes that would overlap cannot both pass.Mobile. The Get cover sheet shows the refusal whole and stays open; with several policies ticked, the refusal starts with that policy's name. (Editing on the phone is a follow-up.)
Docs and words. The User Overrides docs page has an Edit an override section, the overlap rule and marks, the Edit permission and the API's PUT, in all 17 languages. Every new Dashboard word is in all 17 Dashboard languages.
Tests
OnCallDutyPolicyUserOverrideEdit,OnCallDutyPolicyUserOverrideOverlap,OnCallDutyPolicyUserOverrideGlobalAccess,DatabaseServiceUpdateLimit,WriteStepRecordedGuard, and the rules inUserOverrideEdit/UserOverrideOverlap.UserOverrideOverlapPostgres(Postgres Schema Drift, shard 1). Twelve overlapping adds, held until all passed their checks, save exactly one; an add and an edit, or two edits, that overlap only with each other cannot both pass (racing freely, or with one held inside its lock); back to back, other people, other policies, global beside a policy's and another project all save. Without the advisory lock, or without the edit's check, the racing cases fail.UserOverrideEditAndOverlapPages(the three lists, the dialog, the live notice, the marks),UserOverrideEditForm,UserOverrideFormGuard,UserOverrideWordsInEveryLanguage(every new word in every language, filled sentences, German, Arabic and Japanese renders),UserOverrideDarkMode(every colour the change draws with is one Theme.css re-colours for the dark theme).OnCallAdministrationDocsFactsholds the page to the model, the edit rule, the service and the forms; the translations suites hold all 16 translations line for line.CreateOnCallOverrideScreen(the refusal whole, the policy named when several are ticked).OnCallShiftConfigPropagation(an edit carries forwardpairsandbefore),LongFormStepsGuard(the dialog moved toUserOverrideFormModal),DashboardComponentsMRTranslation.Checked locally
After merging the newest main, which now holds #7751 (a schedule's layers saved at once). Main's changes met this branch's files only in the Dashboard locale files, at their end (each is main's file, key for key, followed by this branch's 28 keys), in the Postgres drift workflow, which keeps both new steps, and in
OnCallAdministrationDocsFacts, where main's new facts sit beside this branch's.npm run compile-testsruns them with its 8 GiB heap:server-utils,app-rest,app-dashboard-a-m,uiandresthave no errors;serverhas one, from main (below).i18n:checkfinds every locale file sound with no translation lost, andi18n:extractfinds nothing new.OpenAPISpec(main's newest additions with this branch's model): 50 tests pass.EmailDividerGuard,OidcEgressGuardandSmtpEgressGuardneed App packages this checkout does not install.UserOverrideOverlapPostgres8 of 8, and feat(on-call): changes to a schedule's layers wait for Save changes, then save in one go #7751'sScheduleLayersSavePostgres7 of 7, pass.CreateOnCallOverrideScreenunder jest-expo, ios and android: 136 tests pass.PR CI was not waited for.
Failures seen on main
One check failed on main as merged here; this PR touches no file it names, and main has since fixed it (ac8e7b9).
Tests/Server/API/PrometheusAPIRoutes.test.ts(182,27)TS2345, a mock ofexecuteQuerythat takes only aStatement(SQL / PromQL queries #6796).UI review
Every surface this PR adds or changes was rendered from the branch's own components: a policy's User Overrides tab and the global page, the Add and Edit dialogs with the overlap notice under Ends (a conflict, a global override under a policy's own, Edit that override, a save the server refuses), the schedule's user overrides card, the Overlaps marks and their tooltips, a locked Edit, and the policy feed. Each at 1280 and 390 px, light and dark, in English, German and Arabic, for a reader with every right, one limited to a label, and one who may only read. Fixed in this review:
UserOverrideEditFormholds every row of the Add form and of both Edit forms to words of their own.PeoplePickerFieldConfig.isReadOnly, the picker's existingreadOnly).Modal:pickInitialFocusElementand the late-form watcher,isReadOnlyField).FeedOptionsLocalesfailed on the new feed kind.I18nExtractStringsfailed: it pins the extractor's source roots, and this branch added two (UserOverrideOverlap.ts,UserOverrideEdit.ts). It names them now.Looked at and kept: the red conflict box with its link, the amber Overlaps pill, the locked Edit with its reason on hover (an ended override, a reader without the permission, a label-limited reader on a global override), and the server's refusal shown under Ends. Nothing scrolls sideways at 390 px.
Checked after merging the newest main (384d577). Main's changes met this branch's only in the Dashboard locale files, which merged cleanly: all 18 parse, hold the same keys in the same order, and round-trip unchanged.
Modaland its late-form focus, every people picker suite, the suites that check focus beside a read-only field, the Dashboard runtime locales and the Arabic guards: 58 suites, 1,476 tests pass. All 239 Common guard suites pass (14,119 tests).Modaltests).i18n:extractfinds nothing new,i18n:checkfinds every locale sound with no translation lost (Arabic: 0 left).Follow-ups filed: #7897 (edit an override from the mobile app), #7898 (the Skip until... dialog says an overlap as the times are picked), #7899 (End now for an override under way).
Merge order
It is meant to merge after #7655 (minute pickers), which is in main now and merged in here, as is #7751 (a schedule's layers saved at once). This PR left the Layers page's own files to #7751; the Skip until dialog there does not yet say an overlap as the times are picked, as the Add dialog now does (#7898). #7746 (on-call chat updates, #7549) adds
ON_CALL_DUTY_POLICY_FEED_UPDATE_KINDS, a record over every on-call feed kind: whichever of the two merges second addsUserOverrideChangedto it asOverrides, or that table no longer type-checks. #7746 also gives the added and removed entries a one-line chat text (OnCallChatText); the changed entry here should get one too.🤖 Generated with Claude Code