Repository navigation
feat: answer time range per avatar template and organization background colour - #198
Merged
Merged
Conversation
Two per-template columns, answer_min_seconds (default 90) and answer_max_seconds (default 150), bounded 10..600 with min < max (validated on create/update, import, and a DB CHECK). Exposed on the admin template resources, copied by duplicate, carried by export/import (older files fall back to the defaults) and delivered in the candidate session response next to interview_max_seconds.
…he old schema The baseline revision test rolls the schema back, so creating the template through the model also named the answer range columns added later.
…h a 422 Translate the avatar_templates_answer_range CHECK violation into the same 422 on answer_max_seconds the ordering helper raises, on both update paths, and cover the import type, bounds and defaulting branches.
Nullable #rrggbb organizations.background_color with a CHECK, writable by admins and superadmins, exposed to the candidate in branding.background_color and classified admin-only for T-EXPOSE-001. openapi.json regenerated.
…n the start values
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
Two additive features on one stacked branch (both native-review approved):
avatar_templates.answer_min_seconds(default 90) andanswer_max_seconds(default 150), NOT NULL with database defaults and a CHECK (10..600, min < max). Editable through the template write endpoints (422 on a violation, including the concurrent race), duplicate and import/export (omitted keys default, explicit null or a missing record key is refused), and delivered in the candidate session start response next tointerview_max_seconds. Admin-only forT-EXPOSE-001.organizations.background_colornullable#rrggbb(anchored regex + DB CHECK), settable by admins and managed clients, delivered inbranding.background_colorto the candidate frontend. Emails keep the primary colour only; public API v1 untouched.Both migrations are additive (new columns, defaults fill existing rows).
Checks
openapi.jsonexported against Postgres;openapi.v1.jsonunchanged.BaselineRevisionMigrationTestinserted a template through the model on a rolled-back schema.