Skip to content

docs: omit implementation details from hooks reference#1675

Open
serikjensen wants to merge 1 commit intomainfrom
docs/hooks-omit-fields-metadata
Open

docs: omit implementation details from hooks reference#1675
serikjensen wants to merge 1 commit intomainfrom
docs/hooks-omit-fields-metadata

Conversation

@serikjensen
Copy link
Copy Markdown
Member

Summary

Tightens the hook reference docs to focus on what partners need to build forms, removing implementation-detail leaks that don't help integrators and that previously could mislead readers into wiring forms in non-recommended ways.

Changes

  • Removed the Advanced: Fields Metadata section from hooks.md so partners aren't steered toward consuming fieldsMetadata directly. Field components consume metadata internally; the recommended path is Fields (with FieldComponent for UI overrides).
  • Reworded the Fields.Ssn section to describe the masked placeholder + auto-waived REQUIRED rule behaviorally instead of via fieldsMetadata.ssn.hasRedactedValue.
  • Replaced internal symbols with behavioral descriptions: NAME_REGEX (Employee Details), FLSA_OVERTIME_SALARY_LIMIT (Compensation), rev_2020_w4 (Federal Taxes).
  • Stripped schema-builder vocabulary ('never' / 'always' / "predicate", "schema declares/enforces") from Pay Schedule, Compensation, and hooks.md in favor of partner-facing language.
  • Dropped the internal Rule column from the Compensation required-fields table; the remaining columns convey the same partner-relevant info.
  • Removed raw HTTP endpoint paths (e.g. GET /v1/work_addresses/{work_address_uuid}, POST) from Work Address mode descriptions in favor of mode-only language.

What was intentionally preserved:

  • fieldsMetadata in return-type signatures and the SignEmployeeFormFieldsMetadata row in the Exported Types table — they accurately describe the public return shape without prescribing direct consumption.
  • react-hook-form / Zod / UseFormReturn references — partner-relevant framework context, especially for the Advanced: Hook Form Internals escape hatch.
  • Cross-references to other public hooks (e.g. useCurrentWorkAddressForm, useWorkAddressManagement).

Testing

  • Docs-only change; no code touched.
  • Re-grepped `docs/hooks/` to confirm no remaining `NAME_REGEX`, `FLSA_OVERTIME_SALARY_LIMIT`, `rev_2020_w4`, `/v1/`, `'never'`/`'always'` requiredness, or "predicate rule" references outside legitimate framework/behavioral usage.
  • Visual review of each modified `docs/hooks/*.md` file confirmed updates read cleanly.

Made with Cursor

Tightens the hook reference docs to focus on what partners need to build
forms, removing implementation-detail leaks that don't help integrators
and that previously could mislead readers into wiring forms in
non-recommended ways.

- Removed the Advanced: Fields Metadata section from hooks.md so
  partners aren't steered toward consuming fieldsMetadata directly.
- Reworded the Fields.Ssn section to describe the masked placeholder +
  auto-waived REQUIRED rule behaviorally rather than via the
  fieldsMetadata.ssn.hasRedactedValue flag.
- Replaced internal symbols with behavioral descriptions: NAME_REGEX
  (Employee Details), FLSA_OVERTIME_SALARY_LIMIT (Compensation),
  rev_2020_w4 (Federal Taxes).
- Stripped schema-builder vocabulary ('never'/'always'/predicate,
  "schema declares/enforces") from Pay Schedule, Compensation, and
  hooks.md.
- Dropped the internal Rule column from the Compensation required-fields
  table.
- Removed raw HTTP endpoint paths from Work Address mode descriptions
  in favor of mode-only language.

fieldsMetadata is preserved in return-type signatures and the
SignEmployeeFormFieldsMetadata Exported Types entry since those
accurately describe the public return shape without prescribing direct
consumption.

Co-authored-by: Cursor <cursoragent@cursor.com>
@serikjensen serikjensen marked this pull request as ready for review May 5, 2026 21:18
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