Skip to content

refactor: move plain form data types to core - #1889

Open
gabrielseco wants to merge 3 commits into
refactor/core-money-and-nested-value-helpersfrom
refactor/core-form-types
Open

gabrielseco wants to merge 3 commits into
refactor/core-money-and-nested-value-helpersfrom
refactor/core-form-types

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Moves five plain data types into the private core package. Behavior and the public API of @remoteoss/remote-flows are unchanged.

Why

Phase 2 of the Angular support plan (#1833). The form helpers and the form engine can only move to core once the types they use are there, so the types go first. Stacked on #1888.

What changed

Toggle details
  • New packages/core/src/types.ts with $TSFixMe, JSFFields, JSFFieldset, UploadedFileReference and Field, moved as they were (including the existing docs on UploadedFileReference).
  • src/types/remoteFlows.ts, src/types/fields.ts and src/flows/types.ts import and re-export them, so every existing import path keeps working. $TSFixMe and UploadedFileReference are still exported from src/index.tsx.
  • Only types with no React, yup, DOM or component dependency moved. JSFField stays where it is for now because it uses ReactNode, yup's AnySchema and the component field types.
  • No runtime change and no test changes.
  • Checked on a production build: no reference to the core package is left in the built JS or .d.ts files, and the public $TSFixMe and UploadedFileReference declarations are inlined.
  • Public API: no change.

Screenshots

N/A

Related Resources

Testing

Existing tests, unchanged: pnpm run type-check and the full vitest suite (132 files, 1726 tests) pass locally.

  • Tested against the example/ app in a browser
  • Feature flag: N/A

Note

Low Risk
Type-only refactor with re-exports preserving existing imports; no runtime or auth/data-path changes.

Overview
Centralizes five JSON-schema–related plain types ($TSFixMe, JSFFields, JSFFieldset, UploadedFileReference, Field) in @remoteoss/remote-flows-core via a new types.ts and barrel export from packages/core/src/index.ts.

App package keeps the same import paths by deleting the local definitions in src/types/remoteFlows.ts, src/types/fields.ts, and src/flows/types.ts and re-exporting those symbols from core (including a trailing re-export block in remoteFlows.ts). UploadedFileReference docs move with the type into core.

No runtime or public API surface change beyond types living in one place for upcoming shared form tooling.

Reviewed by Cursor Bugbot for commit dfed52c. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 246.81 kB 246.81 kB 0 B (0%) 🟢
Total (raw) 679.72 kB 679.72 kB 0 B (0%) 🟢
CSS (gzip) 22.03 kB 22.03 kB 0 B (0%) 🟢
CSS (raw) 114.89 kB 114.89 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 246.81 kB / 350 kB (70.5%)
  • ✅ Total raw: 679.72 kB / 850 kB (80.0%)
  • ✅ CSS gzipped: 22.03 kB / 25 kB (88.1%)

Largest Files (Top 5)

  1. index.esm-wIkXrqU6.js - 11.4 kB (0 B (0%))
  2. styles.css - 11.02 kB (0 B (0%))
  3. index.css - 11.02 kB (0 B (0%))
  4. internals-CKEaMFOL.js - 6.14 kB (0 B (0%))
  5. hooks-D6zhd6Av.js - 5.78 kB (0 B (0%))
View All Files (317 total)
File Size (gzip) Change
index.esm-wIkXrqU6.js 11.4 kB 0 B (0%)
styles.css 11.02 kB 0 B (0%)
index.css 11.02 kB 0 B (0%)
internals-CKEaMFOL.js 6.14 kB 0 B (0%)
hooks-D6zhd6Av.js 5.78 kB 0 B (0%)
index.js 5.65 kB 0 B (0%)
sdk.gen-D_5dqKZ5.js 5.63 kB 0 B (0%)
flows/Onboarding/hooks.js 4.68 kB 0 B (0%)
FieldSetField-DA_zSUDs.js 4.57 kB 0 B (0%)
EstimationResults-Deu8BcUd.js 3.78 kB 0 B (0%)

✅ Bundle size check passed

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-3cd0qipq7-remotecom.vercel.app
Latest Commit:dfed52c

Deployed with vercel-action

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-eujbr10ot-remotecom.vercel.app
Latest Commit:dfed52c

Deployed with vercel-action

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚠️ Coverage decreased

Metric Current Previous Change Status
Lines 90.27% 90.32% -0.05% 🔴
Statements 90.15% 90.20% -0.05% 🔴
Functions 89.16% 89.16% 0% ⚪
Branches 81.84% 81.94% -0.09% 🔴

Detailed Breakdown

Lines Coverage
  • Covered: 5854 / 6485
  • Coverage: 90.27%
  • Change: -0.05% (-3 lines)
Statements Coverage
  • Covered: 5923 / 6570
  • Coverage: 90.15%
  • Change: -0.05% (-3 statements)
Functions Coverage
  • Covered: 1555 / 1744
  • Coverage: 89.16%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 3620 / 4423
  • Coverage: 81.84%
  • Change: -0.09% (-4 branches)

✅ Coverage check passed

@gabrielseco
gabrielseco marked this pull request as ready for review November 6, 2026 08:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant