brackt/drizzle/meta/_journal.json
Chris Parsons 22726550a6
Refactor user profile to comprehensive settings page (#403)
* Add account deletion and multi-section settings page

- Rename /user-profile → /settings with 301 redirect from old URL
- Add multi-section settings nav (Profile, Account, API placeholder, Data & Privacy)
  reusing existing SettingsDesktopNav/SettingsMobileGridNav components
- Implement account deletion via anonymization: wipes all PII from users row,
  releases team ownerships, removes commissioner records, deletes sessions/accounts
- Add data export request form that emails privacy@brackt.com via Resend
- Add deletedAt timestamp column to users table (migration 0100)
- Add anonymizeUserAccount() to user model
- Add removeAllCommissionersByUserId() to commissioner model
- Tests for both new model functions
- Update UserMenu "Profile" link → "Settings" at /settings

https://claude.ai/code/session_017Hvmof82Xr3UwKFc3pnC4X

* Address code review feedback on settings/account deletion

1. Wrap anonymizeUserAccount in a DB transaction so partial failures
   (e.g. session delete succeeds but user update fails) can't leave
   accounts in an inconsistent state
2. Escape user email and notes with escapeHtml() before interpolating
   into the data request email body
3. Reset AlertDialog confirmed state when dialog is dismissed via
   backdrop click or Escape key (onOpenChange handler)
4. Extract accounts DB query to app/models/account.ts (findLinkedAccountsByUserId)
   to comply with the "always query through app/models/" convention
5. Replace dynamic imports() in action handlers with static top-level imports
6. Remove the unused hard-delete deleteUser() function
7. Add lastDataRequestAt timestamp to users (migration 0101) and enforce
   a 30-day server-side cooldown on data export requests
8. Replace fragile actionData type casts with a proper ActionData
   discriminated union; narrowing now works without `as` assertions
9. Strengthen tests: verify which schema tables are passed to delete()
   and that operations run inside the transaction

https://claude.ai/code/session_017Hvmof82Xr3UwKFc3pnC4X

* Fix no-non-null-assertion lint error in PrivacySection

Replace non-null assertion with optional chaining on dataRequestCooldownUntil
to satisfy oxlint no-non-null-assertion rule.

https://claude.ai/code/session_017Hvmof82Xr3UwKFc3pnC4X

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-10 17:26:14 -07:00

720 lines
No EOL
15 KiB
JSON

{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1732076135211,
"tag": "0000_short_donald_blake",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1760165302772,
"tag": "0001_serious_la_nuit",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1760166775427,
"tag": "0002_tired_iron_man",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1760167848365,
"tag": "0003_public_shadowcat",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1760168383812,
"tag": "0004_spicy_zarda",
"breakpoints": true
},
{
"idx": 5,
"version": "7",
"when": 1760169537260,
"tag": "0005_abnormal_thunderbird",
"breakpoints": true
},
{
"idx": 6,
"version": "7",
"when": 1760241924414,
"tag": "0006_needy_junta",
"breakpoints": true
},
{
"idx": 7,
"version": "7",
"when": 1760327817376,
"tag": "0007_pink_nebula",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1760375514773,
"tag": "0008_salty_trauma",
"breakpoints": true
},
{
"idx": 9,
"version": "7",
"when": 1760392647508,
"tag": "0009_fuzzy_korvac",
"breakpoints": true
},
{
"idx": 10,
"version": "7",
"when": 1760469105799,
"tag": "0010_complex_the_stranger",
"breakpoints": true
},
{
"idx": 11,
"version": "7",
"when": 1760501621605,
"tag": "0011_gifted_mystique",
"breakpoints": true
},
{
"idx": 12,
"version": "7",
"when": 1760504208398,
"tag": "0012_yielding_phil_sheldon",
"breakpoints": true
},
{
"idx": 13,
"version": "7",
"when": 1760543654915,
"tag": "0013_pink_the_order",
"breakpoints": true
},
{
"idx": 14,
"version": "7",
"when": 1760588333462,
"tag": "0014_lowly_gateway",
"breakpoints": true
},
{
"idx": 15,
"version": "7",
"when": 1760589195551,
"tag": "0015_exotic_loners",
"breakpoints": true
},
{
"idx": 16,
"version": "7",
"when": 1760590495868,
"tag": "0016_majestic_roulette",
"breakpoints": true
},
{
"idx": 17,
"version": "7",
"when": 1760599350154,
"tag": "0017_calm_zarda",
"breakpoints": true
},
{
"idx": 18,
"version": "7",
"when": 1760996053371,
"tag": "0018_numerous_stardust",
"breakpoints": true
},
{
"idx": 19,
"version": "7",
"when": 1761112236540,
"tag": "0019_acoustic_ben_grimm",
"breakpoints": true
},
{
"idx": 20,
"version": "7",
"when": 1761719248881,
"tag": "0020_slim_spacker_dave",
"breakpoints": true
},
{
"idx": 21,
"version": "7",
"when": 1762190473418,
"tag": "0021_fair_ser_duncan",
"breakpoints": true
},
{
"idx": 22,
"version": "7",
"when": 1762191156317,
"tag": "0022_shiny_mother_askani",
"breakpoints": true
},
{
"idx": 23,
"version": "7",
"when": 1762200550705,
"tag": "0023_cynical_jack_power",
"breakpoints": true
},
{
"idx": 24,
"version": "7",
"when": 1763276901482,
"tag": "0024_faithful_mesmero",
"breakpoints": true
},
{
"idx": 25,
"version": "7",
"when": 1763277000000,
"tag": "0025_rename_participant_ev_season_to_sports_season",
"breakpoints": true
},
{
"idx": 26,
"version": "7",
"when": 1763278000000,
"tag": "0026_add_source_odds_to_participant_ev",
"breakpoints": true
},
{
"idx": 27,
"version": "7",
"when": 1763279000000,
"tag": "0027_add_projected_points_to_team_standings",
"breakpoints": true
},
{
"idx": 28,
"version": "7",
"when": 1763280000000,
"tag": "0028_add_tournament_groups",
"breakpoints": true
},
{
"idx": 29,
"version": "7",
"when": 1763281000000,
"tag": "0029_change_participant_ev_to_decimal",
"breakpoints": true
},
{
"idx": 30,
"version": "7",
"when": 1763282000000,
"tag": "0030_add_draft_picks_unique_slot",
"breakpoints": true
},
{
"idx": 31,
"version": "7",
"when": 1763283000000,
"tag": "0031_add_autodraft_queue_only",
"breakpoints": true
},
{
"idx": 32,
"version": "7",
"when": 1763284000000,
"tag": "0032_consolidate_playoff_pattern",
"breakpoints": true
},
{
"idx": 33,
"version": "7",
"when": 1763285000000,
"tag": "0033_add_schedule_event_type",
"breakpoints": true
},
{
"idx": 34,
"version": "7",
"when": 1763286000000,
"tag": "0034_add_ev_snapshots",
"breakpoints": true
},
{
"idx": 35,
"version": "7",
"when": 1763287000000,
"tag": "0035_increase_prob_precision",
"breakpoints": true
},
{
"idx": 36,
"version": "7",
"when": 1763288000000,
"tag": "0036_increase_ev_precision",
"breakpoints": true
},
{
"idx": 37,
"version": "7",
"when": 1763289000000,
"tag": "0037_add_simulator_type_to_sports",
"breakpoints": true
},
{
"idx": 38,
"version": "7",
"when": 1773122866361,
"tag": "0038_sad_wilson_fisk",
"breakpoints": true
},
{
"idx": 39,
"version": "7",
"when": 1773200000000,
"tag": "0039_add_ucl_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 40,
"version": "7",
"when": 1773262080928,
"tag": "0040_fat_puma",
"breakpoints": true
},
{
"idx": 41,
"version": "7",
"when": 1773557500336,
"tag": "0041_great_magma",
"breakpoints": true
},
{
"idx": 42,
"version": "7",
"when": 1773600000000,
"tag": "0042_migrate_event_date_to_starts_at",
"breakpoints": true
},
{
"idx": 43,
"version": "7",
"when": 1773634394633,
"tag": "0043_demonic_vanisher",
"breakpoints": true
},
{
"idx": 44,
"version": "7",
"when": 1773700000000,
"tag": "0044_add_ncaam_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 45,
"version": "7",
"when": 1773710000000,
"tag": "0045_add_ncaaw_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 46,
"version": "7",
"when": 1773720000000,
"tag": "0046_add_nba_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 47,
"version": "7",
"when": 1773730000000,
"tag": "0047_fix_nba_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 48,
"version": "7",
"when": 1773765768905,
"tag": "0048_eager_songbird",
"breakpoints": true
},
{
"idx": 49,
"version": "7",
"when": 1773800000000,
"tag": "0049_add_admin_picked_by_type",
"breakpoints": true
},
{
"idx": 50,
"version": "7",
"when": 1773821310661,
"tag": "0050_chief_peter_quill",
"breakpoints": true
},
{
"idx": 51,
"version": "7",
"when": 1773900000000,
"tag": "0051_add_standings_snapshot_unique_index",
"breakpoints": true
},
{
"idx": 52,
"version": "7",
"when": 1773897678653,
"tag": "0052_new_warbird",
"breakpoints": true
},
{
"idx": 53,
"version": "7",
"when": 1773903201189,
"tag": "0053_smooth_kingpin",
"breakpoints": true
},
{
"idx": 54,
"version": "7",
"when": 1774070769112,
"tag": "0054_massive_vulcan",
"breakpoints": true
},
{
"idx": 55,
"version": "7",
"when": 1774072156237,
"tag": "0055_special_vampiro",
"breakpoints": true
},
{
"idx": 56,
"version": "7",
"when": 1774167142673,
"tag": "0056_jittery_the_fallen",
"breakpoints": true
},
{
"idx": 57,
"version": "7",
"when": 1774239259550,
"tag": "0057_cultured_doctor_doom",
"breakpoints": true
},
{
"idx": 58,
"version": "7",
"when": 1774310000000,
"tag": "0058_add_unique_participant_ev",
"breakpoints": true
},
{
"idx": 59,
"version": "7",
"when": 1774329951326,
"tag": "0059_mysterious_jack_murdock",
"breakpoints": true
},
{
"idx": 60,
"version": "7",
"when": 1774330910098,
"tag": "0060_omniscient_outlaw_kid",
"breakpoints": true
},
{
"idx": 61,
"version": "7",
"when": 1774410244601,
"tag": "0061_violet_mephistopheles",
"breakpoints": true
},
{
"idx": 62,
"version": "7",
"when": 1774500000000,
"tag": "0062_add_mlb_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 63,
"version": "7",
"when": 1774504559479,
"tag": "0063_bored_ultimo",
"breakpoints": true
},
{
"idx": 64,
"version": "7",
"when": 1774598151282,
"tag": "0064_fuzzy_wolfsbane",
"breakpoints": true
},
{
"idx": 65,
"version": "7",
"when": 1774719902130,
"tag": "0065_kind_mantis",
"breakpoints": true
},
{
"idx": 66,
"version": "7",
"when": 1774802533652,
"tag": "0066_stiff_siren",
"breakpoints": true
},
{
"idx": 67,
"version": "7",
"when": 1774900000000,
"tag": "0067_darts_bracket",
"breakpoints": true
},
{
"idx": 68,
"version": "7",
"when": 1775485575205,
"tag": "0068_cs2_major_simulator",
"breakpoints": true
},
{
"idx": 69,
"version": "7",
"when": 1775485599229,
"tag": "0069_draft_window",
"breakpoints": true
},
{
"idx": 70,
"version": "7",
"when": 1775485630297,
"tag": "0070_verify_migrations",
"breakpoints": true
},
{
"idx": 71,
"version": "7",
"when": 1775528386356,
"tag": "0071_many_nico_minoru",
"breakpoints": true
},
{
"idx": 72,
"version": "7",
"when": 1775652883157,
"tag": "0072_jittery_steve_rogers",
"breakpoints": true
},
{
"idx": 73,
"version": "7",
"when": 1775679862606,
"tag": "0073_blushing_lady_vermin",
"breakpoints": true
},
{
"idx": 74,
"version": "7",
"when": 1775699707816,
"tag": "0074_clammy_tiger_shark",
"breakpoints": true
},
{
"idx": 75,
"version": "7",
"when": 1776101579459,
"tag": "0075_chubby_stephen_strange",
"breakpoints": true
},
{
"idx": 76,
"version": "7",
"when": 1776226761564,
"tag": "0076_heavy_zemo",
"breakpoints": true
},
{
"idx": 77,
"version": "7",
"when": 1776312815334,
"tag": "0077_lively_wolfpack",
"breakpoints": true
},
{
"idx": 78,
"version": "7",
"when": 1776314387095,
"tag": "0078_striped_rick_jones",
"breakpoints": true
},
{
"idx": 79,
"version": "7",
"when": 1776316296907,
"tag": "0079_wide_trauma",
"breakpoints": true
},
{
"idx": 80,
"version": "7",
"when": 1776318182740,
"tag": "0080_chemical_gorilla_man",
"breakpoints": true
},
{
"idx": 81,
"version": "7",
"when": 1777067050669,
"tag": "0081_careless_magdalene",
"breakpoints": true
},
{
"idx": 82,
"version": "7",
"when": 1777090754037,
"tag": "0082_stale_pride",
"breakpoints": true
},
{
"idx": 83,
"version": "7",
"when": 1777180952144,
"tag": "0083_fearless_leader",
"breakpoints": true
},
{
"idx": 84,
"version": "7",
"when": 1777477826949,
"tag": "0084_wooden_retro_girl",
"breakpoints": true
},
{
"idx": 85,
"version": "7",
"when": 1777483407743,
"tag": "0085_young_cobalt_man",
"breakpoints": true
},
{
"idx": 86,
"version": "7",
"when": 1777505810235,
"tag": "0086_marvelous_infant_terrible",
"breakpoints": true
},
{
"idx": 87,
"version": "7",
"when": 1777661299612,
"tag": "0087_small_susan_delgado",
"breakpoints": true
},
{
"idx": 88,
"version": "7",
"when": 1777666830394,
"tag": "0088_cheerful_norrin_radd",
"breakpoints": true
},
{
"idx": 89,
"version": "7",
"when": 1777675084016,
"tag": "0089_lonely_tigra",
"breakpoints": true
},
{
"idx": 90,
"version": "7",
"when": 1777677410094,
"tag": "0090_powerful_redwing",
"breakpoints": true
},
{
"idx": 91,
"version": "7",
"when": 1777700829535,
"tag": "0091_fast_inhumans",
"breakpoints": true
},
{
"idx": 92,
"version": "7",
"when": 1777745229462,
"tag": "0092_robust_klaw",
"breakpoints": true
},
{
"idx": 93,
"version": "7",
"when": 1777783789103,
"tag": "0093_ambiguous_hellcat",
"breakpoints": true
},
{
"idx": 94,
"version": "7",
"when": 1777920441672,
"tag": "0094_curved_nick_fury",
"breakpoints": true
},
{
"idx": 95,
"version": "7",
"when": 1778043585280,
"tag": "0095_lucky_madrox",
"breakpoints": true
},
{
"idx": 96,
"version": "7",
"when": 1778177368941,
"tag": "0096_demonic_vulture",
"breakpoints": true
},
{
"idx": 97,
"version": "7",
"when": 1778189247519,
"tag": "0097_puzzling_spectrum",
"breakpoints": true
},
{
"idx": 98,
"version": "7",
"when": 1778261539567,
"tag": "0098_lucky_sabra",
"breakpoints": true
},
{
"idx": 99,
"version": "7",
"when": 1778341807236,
"tag": "0099_peaceful_hannibal_king",
"breakpoints": true
},
{
"idx": 100,
"version": "7",
"when": 1778440988519,
"tag": "0100_mighty_weapon_omega",
"breakpoints": true
},
{
"idx": 101,
"version": "7",
"when": 1778445560663,
"tag": "0101_simple_black_bolt",
"breakpoints": true
}
]
}