Repository navigation
fix enum/array config property rendering, block edit during pre-event window - #240
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 of 8 tasks
jencompgeek
force-pushed
the
jh/feat-properties
branch
from
November 6, 2026 20:05
754f55c to
4a8dbc0
Compare
…tionKeys
getEnumIdentity returned {} for a primitive option/default whenever
validationKeys was set, since it only ever read keys off an object.
openapi.json's ConfigProperty.default permits a bare primitive even
when options are object-shaped, so a schema-legal primitive default
never matched any radio option's own identity and nothing pre-selected
on load. Map a primitive straight to its single validation key's
value; ambiguous multi-key cases are left as before.
…ate siblings canEdit was an inline boolean expression that had accreted conditions across several separate edits (an isOwner check added then removed, a type check added, a pre-event-window check added), unlike deriveEventState/isInPreEventWindow/isEventMissed, which name, document, and centralize the same kind of lifecycle question. Give it the same treatment so a future edge case has one tested place to land.
jencompgeek
force-pushed
the
jh/feat-properties
branch
from
November 10, 2026 16:58
4a8dbc0 to
b2bc2c7
Compare
This branch was successfully deployed
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.
What is in this PR?
Two fixes to support new pregame feature bundled together from recent event-creation/admin work:
plain { value, label } options) silently did nothing when clicked, and an explicit default on
such a property never pre-selected a radio either. Also adds rendering for the new array config
property type.
pre-event window, even though editing an active event is already blocked. Closes that gap.
Changes in the codebase
an enum option's comparable identity consistently — via validationKeys when set, via a { value,
label } option's value otherwise, or the raw value as a last resort — and use them for rendering,
defaulting, and submission. Previously the RadioGroup's controlled value and each option's value
could be serialized inconsistently, so no option ever compared equal and nothing visually
selected; an explicit default also bypassed validationKeys extraction entirely.
array-type properties (new in ConfigProperty.type) have no fixed option set, they're edited as
free-form comma-separated text and parsed into a trimmed, non-empty string array at submission via
a new parseArrayPropertyValue helper.
alongside it — array properties reuse the existing default/options fields as plain
comma-separated/joined values rather than structured items).
existing isInPreEventWindow helper (already used by the chat flow for the same window), since that
window leaves active: false and startTime unset.
Documentation and automated testing
Did you:
content/whatsNew.tsfor new features?Testing this PR
Test in conjunction with BE PR berkmancenter/llm_engine#436
comma-separated values, submit, and confirm the payload contains a trimmed array (e.g. "a, b ,, c"
→ ["a", "b", "c"]).
its pre-event window (active: false, scheduled time within preEventMinutes of now), same as it's
hidden for an active event.
Additional information