Custom fields - #54
Open
MangoSwirl wants to merge 1 commit into
Open
Conversation
|
🚅 Deployed to the lovat-server-pr-54 environment in lovat
|
Let scouting leads define custom post-match questions (text, number, single-select, multi-select) that scouts answer in Lovat Collection and that surface across the dashboard's analysis, scoped per source team. - New CustomField / CustomFieldAnswer models + Zod/OpenAPI mirrors - Lead-only CRUD plus a public x-team-code manifest endpoint for offline caching - Optional customFieldAnswers on both scout-report submission handlers (lenient: unknown/wrong-team/out-of-options answers dropped, report kept) - Answers flow into raw report data, both CSV exports, category metrics + detail sparklines (number), breakdown distributions (select), and picklist z-scores (number) via a cf_<uuid> key convention - Per-viewer cache isolation so custom data never leaks across teams - Fully additive/backwards-compatible Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MangoSwirl
force-pushed
the
custom-fields
branch
from
August 2, 2026 04:47
abc7a9a to
ca0b1a9
Compare
This was referenced Aug 2, 2026
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.
Adds the custom fields feature: scouting leads define their own post-match questions (text, number, single-select, multi-select) that scouts answer in Lovat Collection and that surface across the dashboard's analysis, scoped per source team.
What's here (backend)
CustomField+CustomFieldAnswer(typed value columns) with Zod/OpenAPI mirrors;SharedPicklist.customFieldWeights. Purely additive (prisma db push)./v1/manager/customfields, plus a publicx-team-codemanifest endpoint ({hash, data}) for the collection app's offline cache. Options are append/reorder-only; type is immutable.customFieldAnswerson both scout-report handlers. Lenient — unknown/wrong-team/out-of-options/archived answers are handled gracefully and never reject the report.cf_<uuid>key convention.augmentResponsehook + viewer-scoped cache keys, so custom data never leaks across teams.Testing
Validated end-to-end against a local server restored from a production dump: CRUD via the real dashboard UI, submission via the real collection app, and every analysis surface (raw report, CSV, category avg, sparkline, breakdown distributions, picklist), plus cross-team isolation and backwards-compat.
npm run build(tsc) + eslint clean.Related PRs — this feature spans four repos: