mattermost-mobile-upstream/app/routes/(authenticated)
Eva Sarafianou 9a40cad748
Route through usePropsFromParams for remaining stragglers (#9949)
Four route files were still consuming useLocalSearchParams directly,
bypassing the safeParseJSON decode that every other route already
uses via usePropsFromParams. Combined with propsToParams unconditionally
JSON.stringify'ing every prop (#9931), that means their string params
arrived with literal quote characters embedded (e.g. rootId "abc123"
-> `"abc123"`).

Impact:
- thread.tsx: rootId doesn't match any post in the DB, rootPost stays
  undefined, ThreadContent never renders. The user sees a blank thread
  screen with subtitle `in "channel name"` (visible quote characters).
- code.tsx: code param is rendered verbatim by the highlighter with
  outer quotes and escaped inner quotes/backslashes. The MM-69330
  workaround (bypassing the hook to preserve string type) is obsolete
  now that propsToParams always JSON-encodes: safeParseJSON('"42"')
  returns the string '42', not the number 42.
- about.tsx / settings_display_timezone_select.tsx: header text and
  timezone identifier arrive with extra quotes.

Migrating all four to usePropsFromParams closes the symmetry: every
param is JSON-encoded on send and JSON-decoded on receive.

Also updates code.test.tsx to feed the route JSON-encoded params, so
the MM-69330 regression coverage still exercises the exact scenario
seen in production.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 19:16:46 +03:00
..
(home) Revert "e2e(detox): Rainforest to Detox migration (#9790)" (#9834) 2026-06-15 17:57:01 +02:00
_layout.tsx MM-68208 Implementing global and channel-level banners on mobile (#9752) 2026-07-08 12:47:01 +03:00
agent_chat.tsx
agent_threads_list.tsx
call.tsx
channel.tsx
code.test.tsx Route through usePropsFromParams for remaining stragglers (#9949) 2026-07-18 19:16:46 +03:00
code.tsx Route through usePropsFromParams for remaining stragglers (#9949) 2026-07-18 19:16:46 +03:00
custom_status_clear_after.tsx
data_erased.tsx Mm 68326 file cleanup v2 (#9756) 2026-05-22 19:48:29 +02:00
global_drafts.tsx
global_threads.tsx
integration_selector.tsx Mattermost Blocks (#9764) 2026-06-29 18:42:16 +02:00
latex.tsx
mm_blocks_content.tsx Mattermost Blocks (#9764) 2026-06-29 18:42:16 +02:00
participant_playbooks.tsx
permalink.tsx
playbook_add_checklist_item.tsx
playbook_edit_checklist_item.tsx
playbook_edit_command.tsx
playbook_post_update.tsx
playbook_rename_checklist.tsx
playbook_rename_run.tsx
playbook_run.tsx
playbook_runs.tsx
playbook_select_user.tsx
playbooks_create_quick_checklist.tsx
playbooks_select_date.tsx
playbooks_select_playbook.tsx
playbooks_start_a_run.tsx
select_team.tsx
show_translation.tsx
table.tsx
thread.tsx Route through usePropsFromParams for remaining stragglers (#9949) 2026-07-18 19:16:46 +03:00