Skip to content

feat(mobile): home-screen quick actions#76

Open
GSTJ wants to merge 3 commits into
mainfrom
GSTJ/quick-actions
Open

feat(mobile): home-screen quick actions#76
GSTJ wants to merge 3 commits into
mainfrom
GSTJ/quick-actions

Conversation

@GSTJ

@GSTJ GSTJ commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Long-pressing the app icon now shows two shortcuts, Matches and Edit profile, in the user's language.

Details

  • expo-quick-actions@6.0.2 using the runtime JS API instead of static config, so titles follow the in-app locale and update live when the user switches language.
  • Cold start (app killed) and warm resume both handled, navigating with expo-router to the messages tab and the edit-profile screen.
  • iOS gets SF Symbol icons (message bubble, person). Android shows the actions without custom icons on purpose: custom Android icons need shipped image assets via the config plugin, skipped to keep this small.
  • Heads up for review: this lib has an open SDK 55 compat thread (expo-quick-actions#56, mixed reports). Prebuild passes clean on both platforms here, but the first device run of this branch is the real proof, so worth testing this one with extra care.
  • Version bumped to 1.5.0 (new native module).

Testing steps

  1. Install the build, then long-press the Pegada icon on the home screen: you should see "Matches" and "Edit profile" (or "Editar perfil" with the phone/app in Portuguese).
  2. Force-quit the app, long-press the icon and tap Matches: the app launches straight into the messages tab.
  3. With the app in the background, long-press and tap Edit profile: the app comes back already on the edit screen, no reload.
  4. In the app, switch the language in the profile settings, background it and long-press the icon again: the shortcut titles are in the new language without restarting.

GSTJ added 3 commits July 8, 2026 14:27
Adds two long-press home-screen quick actions via expo-quick-actions:
"Matches" (opens the messages tab) and "Edit profile" (opens
profile/edit). Titles are set through the runtime JS API so they
localize with the user's i18next locale and update live on an in-app
language switch, matching the existing services/linking hook+handlers
split for cold-start vs warm-resume routing.

Bumps native version to 1.5.0 per app.config.ts's native-change policy.
- Move the new "quickActions" i18n key next to "preferences" in both
  translation.json files instead of tacking it on after "themes", to
  match the (loose) alphabetical-ish convention the rest of the file
  follows.
- Add the testing notes for the quick-actions feature (44720a1) that
  were requested but never landed anywhere Gabriel would see them.

Testing notes for Gabriel — home-screen quick actions (44720a1):

iOS (simulator or device):
1. Build and install the dev client (`pnpm ios` from apps/mobile, or
   the EAS dev-client build) so the app.config.ts icon/version changes
   are picked up — quick actions are read from the native side on
   launch, a Metro-only reload won't pick up plugin changes.
2. Cold start: fully quit the app (swipe away from the app switcher,
   or `xcrun simctl terminate`), then long-press the Pegada icon on
   the home screen / springboard. "Matches" and "Edit profile" should
   show with the message-bubble and person SF Symbols. Tap one — the
   app should cold-launch straight into that tab/screen.
3. Warm resume: with the app already running in the foreground or
   background, go back to the home screen and long-press the icon
   again, tap an action — it should navigate immediately without a
   relaunch.
4. Language switch: change the in-app language (Profile > Language),
   background the app, long-press the icon again — titles should
   already reflect the new locale (no restart needed).

Android:
1. Same dev client / build step as iOS.
2. Long-press the app icon (works on the launcher's app icon shortcut
   menu — Pixel/stock launcher supported; some OEM launchers vary).
   Only "Matches" and "Edit profile" labels show; there's no custom
   icon (Android needs drawables via the config plugin, which we
   skipped per handlers/icons.ts — falls back to the app's own icon).
3. Cold start: force-stop the app from Android settings first, then
   long-press → tap an action, confirm it opens directly to the
   right screen.
4. Warm resume: with the app open, go home, long-press, tap again,
   confirm immediate navigation.
5. Language switch: same as iOS — switch language in-app, background,
   re-check the shortcut labels without restarting.
Gate quick-action navigation behind the same "authenticated mount
point" guarantee the linking service already relies on: useQuickActions
now takes an `enabled` flag that's only true once _layout.tsx resolves
initialRouteName to SceneName.Swipe. A tap before that (cold-start
QuickActions.initial, or a warm tap while signed out / mid-onboarding)
is held as a pending action and replayed once auth/onboarding
resolves, instead of firing router.push synchronously and racing the
async tRPC-driven redirect in _layout.tsx.
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