Skip to content

docs: add regional snapshot design (Phase 3) - #777

Merged
itsbkm merged 3 commits into
mainfrom
docs/regional-snapshot-design
Sep 20, 2026
Merged

itsbkm merged 3 commits into
mainfrom
docs/regional-snapshot-design

Conversation

@itsbkm

@itsbkm itsbkm commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds docs/regional-snapshot.md (ACTIVE DESIGN): one backend resolveRegionalSnapshot(settings) that derives currency symbol/position/fraction-digits, number separators, and default timezone from the country/currency chosen at signup, using Intl/ISO 4217/IANA conventions — no default country, no hard-coded symbol, no per-store override.
  • Records the underlying product decision in docs/business-decisions.md ("Regional settings come from signup, never from a fallback"), with a grep any agent can run to catch a reintroduced fallback.
  • Indexes the note in docs/README.md.

Scope

Documentation only. No code changes — this is the design PR 1 (resolver + contract tests) implements against. Supersedes PR #697; prerequisite for the fresh #693 reimplementation.

Verification

Commands run:

  • git diff --check — clean
  • relative markdown link check across docs/README.md — all resolve
  • every concrete Intl/dayBoundsInTimezone value quoted in the contract-test table verified against actual Node output on 2026-09-18

Results: all pass.

Compatibility & data safety

  • Database/data impact: None — documentation only.
  • Migration: None.
  • User-visible behavior: None yet; this note gates the PRs that will change it.
  • Offline/network impact: None.

Summary by CodeRabbit

  • Documentation
    • Added guidance on regional settings, including country selection during setup and standards-based currency, locale, and timezone conventions.
    • Documented that missing regional configuration should be reported rather than replaced with a default country.
    • Added a design proposal for consistent regional settings across the server app and currency display/input experiences.
    • Recorded the related business decision and forward-looking implementation plan.

Defines one backend resolveRegionalSnapshot(settings) so currency
symbol/position/fraction-digits, number separators, and default
timezone are all derived from the country/currency chosen at signup
via Intl/ISO/IANA conventions, with no default country and no
per-store override anywhere. Records the underlying product decision
in business-decisions.md and indexes the note in docs/README.md.

Supersedes PR #697; prerequisite for the fresh #693 reimplementation.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 160147b7-49e7-477d-8228-f22b01150cc5

📥 Commits

Reviewing files that changed from the base of the PR and between b8d1f31 and 002c2ac.

📒 Files selected for processing (3)
  • docs/README.md
  • docs/business-decisions.md
  • docs/regional-snapshot.md
 _____________________________________________________________
< Jurassic Park would have been a lot shorter with me around. >
 -------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The COP contract-test value used an ordinary space; Intl actually
renders a non-breaking space (U+00A0) between symbol and amount there.

Also splits step (1) of the implementation order: removing
seedInstallDefaults()'s writes needs its own PR with a central
test-harness fix, since 107 of 120 test files never go through
/setup/initialize and rely entirely on that seed for a working
country before their own test body runs. Found while starting PR 1;
the resolver itself stays purely additive.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@itsbkm
itsbkm merged commit 367088a into main Sep 20, 2026
13 of 14 checks passed
@itsbkm
itsbkm deleted the docs/regional-snapshot-design branch September 20, 2026 18:05
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