Skip to content

[No QA] Route personal details writes through buildPersonalDetailsUpdate - #67

Closed
TMisiukiewicz wants to merge 4 commits into
mainfrom
refactor/personal-details-writes
Closed

TMisiukiewicz wants to merge 4 commits into
mainfrom
refactor/personal-details-writes

Conversation

@TMisiukiewicz

Copy link
Copy Markdown

Closes Expensify#101096
Part of Expensify#101083

Routes every ONYXKEYS.PERSONAL_DETAILS_LIST write through buildPersonalDetailsUpdate from @libs/PersonalDetailsUtils, so a single helper owns turning one list update into the per-account update after the reshape.

What changed

  • Replaced every hand-built { onyxMethod: MERGE, key: PERSONAL_DETAILS_LIST, value } onyxData payload and direct Onyx.merge(PERSONAL_DETAILS_LIST, ...) (now Onyx.update([buildPersonalDetailsUpdate(...)])) across the 20 in-scope files.
  • Updated accompanying type annotations to the exported PersonalDetailsOnyxUpdate alias (ReturnType<typeof buildPersonalDetailsUpdate>) instead of naming the key in an OnyxUpdate generic. Multi-key unions were split into OnyxUpdate<otherKeys> | PersonalDetailsOnyxUpdate.
  • Shrank the rulesdir/no-direct-personal-details-list seatbelt accordingly; entries for fully-migrated files were removed.

Notes

  • Behavior does not change — mechanical no-op. Verified Onyx.update([update]) resolves to the same merge(key, value) call as Onyx.merge.
  • Remaining PERSONAL_DETAILS_LIST references are read-only (Onyx.connect, update.key === comparisons, snapshot writes) and a couple of OnyxData<typeof PERSONAL_DETAILS_LIST> param types — those belong to the reads / key-reshape sub-issues, so their seatbelt counts were only reduced, not removed.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

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.

[Due for payment 2026-09-28] Personal details: route all writes through buildPersonalDetailsUpdate

1 participant