chore(deps): update @codaco packages to fresco-ui 4.0 / interview 3.0#834
Conversation
Bump @codaco/fresco-ui 3.0.1->4.0.0, @codaco/interview 2.0.1->3.0.0, @codaco/protocol-validation 11.8.1->11.9.0, @codaco/protocol-utilities 2.1.1->2.2.0, @codaco/shared-consts 5.4.0->5.5.0, @codaco/tailwind-config 1.0.2->1.1.0, @codaco/network-exporters 1.1.2->1.1.3, and tailwindcss 4.3.1->4.3.2 (new peer minimum). Downstream changes required by the upgrade: - UpdateSettingsValue: field onFocus is now typed as a generic React.FocusEvent, so narrow event.target before calling select(). - SettingsCard/SettingsNavigation: Heading margin="none" now emits m-0! (important), which defeats consumer mb-* utilities; use padding for the title gap instead. - migrate-protocols-to-v8: protocol-validation 11.9.0 tightened the v8 schema, so stored v8 protocols imported under 11.8.x can newly fail isConformantV8 and be re-run through the v7->v8 migration, which is not idempotent on genuine v8 bodies (it resets node shape configs and adds required:true next to min* validators). Snapshot the stored codebook before migrating, restore authored shape/required state onto the migration output, and persist the restored body only when it still passes the strict schema.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 293fb3f3a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Reconstruct the asset manifest in both isConformantV8 and the restored-body re-parse: the whole-protocol schema cross-references roster/geospatial dataSource ids against the manifest, so without it every asset-referencing protocol failed conformance, re-normalized on each deploy, and lost its authored state to the fallback path. - Only remove the migration-added required:true for minValue-only variables. Fresco's legacy form engine failed empty values for minLength/minSelected (effectively required) but passed them for minValue, so this preserves the validation behaviour participants actually observed. Explicit required values are restored verbatim.
Schema 8 evolved during development but was never released, so the current schema 8 (protocol-validation 11.9+) is the only version that exists. Remove the authored-state restoration machinery from normalizeMislabelledV8 that #834 added to protect data authored under interim v8 iterations; non-conformant schemaVersion-8 rows are dev-era data and are mechanically coerced by the plain v7->v8 re-migration. The asset-manifest reconstruction in isConformantV8 stays (current-schema fix for roster/geospatial protocols).
Updates all
@codaco/*packages to their latest versions and implements the required downstream changes.Version bumps
@codaco/fresco-ui@codaco/interview@codaco/protocol-validation@codaco/protocol-utilities@codaco/shared-consts@codaco/tailwind-config@codaco/network-exporterstailwindcss@codaco/interview3.0.0's major bump is driven by its peer on fresco-ui 4; its own changes are minor/patch (skipdestinationrouting, exit confirmation, Sociogram QoL, autosave durability). All other peer requirements (react 19.2.7, motion 12.40, zod 4.4, zustand 5.0.14, @base-ui/react ^1.4, @tanstack/react-table ^8.21.3) were already satisfied.Required code changes
onFocusevent typing (fresco-ui 4)Field components now type
onFocus/onBluras genericReact.FocusEvent, soevent.targetis no longerHTMLInputElement.UpdateSettingsValuenow narrows withinstanceofbefore calling.select().Settings heading spacing (fresco-ui 4)
Heading margin="none"changed frommb-0tom-0!. The!importantshorthand is not in the same tailwind-merge conflict group asmb-*, so the consumer margins inSettingsCardandSettingsNavigationwere silently defeated (every settings card title lost its gap — verified against the built CSS). Switched both to padding (pb-*), which the important margin reset cannot override.Protocol normalization data preservation (protocol-validation 11.9.0)
11.9.0 tightened
CurrentProtocolSchema(OrdinalBin prompt colors restricted to theord-color-seq-1..10palette; orphaned CategoricalBinotherOptionLabel/otherVariablePromptrejected; locked value sets enforced for read-only ordinal variables; FamilyPedigree ego identifier validation). Stored v8 protocols imported under ≤11.8.1 can now failisConformantV8and be routed throughnormalizeMislabelledV8at deploy time — and the v7→v8 re-migration is not idempotent on genuine v8 bodies:shapeto{ default: 'circle' }, wiping authored shape configs; andrequired: trueto any variable with amin*validator and no explicitrequired(correct for v7 semantics preservation, but a silent behavior change for v8-authored optional fields).normalizeMislabelledV8now snapshots the stored codebook before migrating (the migration mutates nested input objects in place), restores authored nodeshapeconfigs and originalvalidation.requiredstate onto the migration output, and persists the restored body only if it still passes the strict schema — otherwise it falls back to the plain migration output with a warning. Regression tests cover both paths.Audited, no change needed
A multi-agent audit verified the remaining changelog items against Fresco usage (empirically, against the installed dists and prior tarballs):
InputFieldclassName now wrapper-only: all 9 className-passing call sites audited; font classes reach the input via CSS inheritance, layout classes were wrapper-targeted all along.SegmentedSwitcher/SegmentedToolbarrestyling: Fresco has no direct usages; the only consumer is@codaco/interviewitself, which was authored against the new defaults.NetcanvasInflationLimitError(zip-bomb cap inextractProtocol): unreachable — Fresco's import flow uses JSZip directly and maps validation errors via a discriminated union.NcNetworkSchema/StageMetadataSchemabehavior is identical across versions.lib/db): stored protocols newly failing the stricter schema are repaired by the deploy-time migration on both deploy paths (Vercelbuild:platformand Dockermigrate-and-start.sh). Residual gap is dev-only (pnpm devnever runs the migration), where an affected protocol reads back stage-less with a console warning.Known behavioral notes (no code change)
--text(near-black → cyber grape),--accent(violet → slate blue), and surface colors are now derived from the page background. Expect Chromatic diffs on dashboard stories — these are the intended upstream design-system change and need baseline acceptance. The interview theme CSS is byte-identical between versions.skipLogic.destinationfeature: interview 3.0.0 recovers forward for bypassed stages. With Fresco'shistory: 'push'URL state, pressing browser Back onto a bypassed step index bounces forward again (a no-op loop; the in-UI back button is unaffected and correct). A selective fix isn't possible today because the package'sonStepChangegives no way to distinguish recovery from user navigation — if this matters, the fix is an upstream discriminator in the step-change meta. Legacy destination-less skips keep the old backward recovery.Verification
pnpm typecheck,pnpm lint,pnpm test(363 tests, 42 files, includes browser-mode) all passpnpm build(production) passes