fix(backend): widen plot_config size cap to fit a full hiddenSubjects list

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-06-01 10:30:06 -04:00
parent 9a9b5dfae8
commit b0c6217cb4
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -224,9 +224,10 @@ function validateSubjectTemplate(template) {
return null;
}
// Upper bound on the stored UI-preference blob. Generous for the known fields;
// guards against a client persisting an arbitrarily large object.
const PLOT_CONFIG_MAX_BYTES = 16 * 1024;
// Upper bound on the stored UI-preference blob. Sized to comfortably hold the known
// fields plus a full hiddenSubjects list (≤500 UUIDs ≈ 20 KB) with headroom, while
// still guarding against a client persisting an arbitrarily large object.
const PLOT_CONFIG_MAX_BYTES = 64 * 1024;
// The blob is intentionally schema-loose (clients may add display keys over time);
// only hiddenSubjects is structurally validated since the backend reasons about it.