Skip to content

feat(contract-document): scaffold the standalone ContractDocument flow - #1319

Merged
jordividaller merged 3 commits into
mainfrom
feat/pbyr-4779-contract-document-scaffold
Sep 16, 2026
Merged

jordividaller merged 3 commits into
mainfrom
feat/pbyr-4779-contract-document-scaffold

Conversation

@jordividaller

@jordividaller jordividaller commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

First part of One-Step SDK Screen — Create New Contract

This PR only adds the empty shell:

  • src/flows/ContractDocument/ with <ContractDocumentFlow render={...}> and the headless useContractDocument(), both exposing the same bag (stepState, steps, next, back, goTo, fields, isLoading, isSubmitting) over two steps: contract_details → contract_preview
  • additive exports in src/index.tsx, short README
  • demo at ?demo=contract-document
  • flow + hook tests

No form, no API call yet. Nothing in Contractor Onboarding changes.


Note

Low Risk
Additive scaffolding and documentation only; no auth, data, or contractor onboarding behavior changes.

Overview
Introduces a standalone Contract Document flow for creating a contractor contract document outside contractor onboarding, as the first slice of the “Create New Contract” SDK screen.

The new ContractDocumentFlow render-prop component and headless useContractDocument() hook share a flow bag over two navigable steps (contract_details → contract_preview). Step navigation (next, back, goTo) is wired via existing useStepState; fields, loading, and submit are stubbed (empty fields, isLoading/isSubmitting always false) with no API integration yet. Public exports are added in src/index.tsx, flow README documents the WIP state, and the example app gains a contract-document demo entry.

Unit tests cover initial step rendering and step transitions on the flow and hook.

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

Adds the empty two-step shell of the standalone twin of the contract details and
contract preview steps of contractor onboarding, modelled on the Invoice Schedule flow:
`<ContractDocumentFlow render={...}>` and the headless `useContractDocument()`, both
exposing the same bag (`stepState`, `steps`, `next`, `back`, `goTo`, `fields`,
`isLoading`, `isSubmitting`).

No form is rendered and no request is made yet — the steps exist and can be navigated,
which is what the `?demo=contract-document` page shows. Exports are additive and nothing
in Contractor Onboarding changes.

Part of pbyr-4779.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 282.07 kB 280.07 kB +2.01 kB (+0.7%) 🔴
Total (raw) 744.42 kB 741.48 kB +2.94 kB (+0.4%) 🔴
CSS (gzip) 21.83 kB 21.83 kB 0 B (0%) 🟢
CSS (raw) 113.53 kB 113.53 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 282.07 kB / 350 kB (80.6%)
  • ✅ Total raw: 744.42 kB / 850 kB (87.6%)
  • ✅ CSS gzipped: 21.83 kB / 25 kB (87.3%)

Largest Files (Top 5)

  1. chunk-SRLBVFNQ.js - 12.94 kB (0 B (0%))
  2. styles.css - 10.91 kB (0 B (0%))
  3. index.css - 10.91 kB (0 B (0%))
  4. index.js - 7.08 kB (+65 B (+0.9%))
  5. chunk-DAUDKN32.js - 6.58 kB (0 B (0%))
View All Files (470 total)
File Size (gzip) Change
chunk-SRLBVFNQ.js 12.94 kB 0 B (0%)
styles.css 10.91 kB 0 B (0%)
index.css 10.91 kB 0 B (0%)
index.js 7.08 kB +65 B (+0.9%)
chunk-DAUDKN32.js 6.58 kB 0 B (0%)
chunk-MKECBMBV.js 6.45 kB new
chunk-OMNDZQ4X.js 5.85 kB new
chunk-C4HFMTSB.js 5.33 kB 0 B (0%)
chunk-IPQZBMOO.js 4.69 kB new
chunk-Z56XHGGK.js 4.36 kB new

✅ Bundle size check passed

@github-actions

github-actions Bot commented Sep 15, 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-46lt591g0-remotecom.vercel.app
Latest Commit:9d07ce6

Deployed with vercel-action

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 86.16% 86.16% 0% ⚪
Statements 85.74% 85.74% 0% ⚪
Functions 84.71% 84.73% -0.03% 🔴
Branches 77.51% 77.40% +0.10% 🟢

Detailed Breakdown

Lines Coverage
  • Covered: 4763 / 5528
  • Coverage: 86.16%
  • Change: 0% (39 lines)
Statements Coverage
  • Covered: 4846 / 5652
  • Coverage: 85.74%
  • Change: 0% (35 statements)
Functions Coverage
  • Covered: 1274 / 1504
  • Coverage: 84.71%
  • Change: -0.03% (14 functions)
Branches Coverage
  • Covered: 2936 / 3788
  • Coverage: 77.51%
  • Change: +0.10% (31 branches)

✅ Coverage check passed

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

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

Deployed with vercel-action

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jordividaller
jordividaller merged commit a6a54ad into main Sep 16, 2026
13 checks passed
@jordividaller
jordividaller deleted the feat/pbyr-4779-contract-document-scaffold branch September 16, 2026 09:06
@gabrielseco gabrielseco mentioned this pull request Sep 16, 2026
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.

2 participants