Skip to content

design(app,deskpie): add country-aware global field policy core #705

@keIIy-kim

Description

@keIIy-kim

Background

We separated lookup core from country-aware field policy on purpose.
The new shared lookup core is the prerequisite, but global CRM/forms are still not consistently country-aware.

Today the codebase still has mixed behavior:

  • address UI is mostly KR vs others
  • phone validation/formatting is still Korean-first in some flows
  • business/corporate registration numbers are not modeled as country-aware policies
  • app and deskpie do not share one global field policy contract yet

Goal

Introduce a shared country-aware field policy core for globally sensitive inputs.

The core should drive:

  • address field shape and validation
  • phone number formatting/validation strategy
  • business registration / corporate registration input strategy
  • country-specific labels, placeholders, and optionality
  • cascading form behavior once country changes

Why

We are a global product. If an input is country-sensitive and the implementation is not country-aware, that is a bug.
We need one extensible policy seam instead of ad-hoc KR branching and per-form exceptions.

Scope

In scope

  • define shared frontend policy contract under @deck/app
  • audit current app + deskpie forms that handle address / phone / registration numbers
  • identify country-sensitive fields that are still hard-coded or Korean-first
  • design per-country policy resolution flow
  • wire the first consumers to the shared policy seam

Out of scope

  • lookup core (handled separately)
  • broad backend schema redesign without a concrete migration plan

Current hotspots

app

  • frontend/app/src/shared/globalization/global-contact-fieldset.tsx
  • frontend/app/src/shared/globalization/policy-runtime.ts
  • frontend/app/src/features/users/user-form/
  • frontend/app/src/shared/utils/validation/

deskpie

  • frontend/deskpie/src/pages/companies/company-edit-modal.tsx
  • contact / contracting-party / deal forms that still assume flat or Korean-first inputs

Acceptance criteria

  • a shared country-aware policy contract exists and is documented
  • country-sensitive fields are explicitly identified and tracked
  • at least one end-to-end consumer path uses the new policy core
  • remaining gaps are listed with follow-up tasks, not hidden in local exceptions

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions