feat(involvement): manually override computed perks#985
Merged
Conversation
Let an Involvement admin override individual perks (dimension values and annotation values) on a person's COMBINED_PERKS involvement, and track which perks are overridden via a technical `manual-perks-override` dimension whose values name the overridden perks (`d-<dimension>` / `a-<annotation>`). Override preservation is implemented once in `Involvement.for_combined_perks` so event-specific Emperkelators need not be aware of it: overridden perks keep their manual value while the rest are recomputed. Overriding is logged to the event log (`involvement.perks.overridden`). The new `PerksForm` is a self-contained client form (one value control plus an Override checkbox per perk, single save button) rather than a patch into SchemaForm. Unticking a perk's Override recomputes it on save. Also make SchemaFormInput a shared (server-renderable) component again by splitting the pattern-validation custom-validity logic into a small client-only PatternTextInput, used only for fields that set patternDescription. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9af9dea to
8c46e2c
Compare
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.
Let an Involvement admin override individual perks (dimension values and
annotation values) on a person's COMBINED_PERKS involvement, and track which
perks are overridden via a technical
manual-perks-overridedimension whosevalues name the overridden perks (
d-<dimension>/a-<annotation>).Override preservation is implemented once in
Involvement.for_combined_perksso event-specific Emperkelators need not be aware of it: overridden perks keep
their manual value while the rest are recomputed. Overriding is logged to the
event log (
involvement.perks.overridden).The new
PerksFormis a self-contained client form (one value control plus anOverride checkbox per perk, single save button) rather than a patch into
SchemaForm. Unticking a perk's Override recomputes it on save.
Also make SchemaFormInput a shared (server-renderable) component again by
splitting the pattern-validation custom-validity logic into a small client-only
PatternTextInput, used only for fields that set patternDescription.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com