Skip to content

feat: add home screen long-press shortcuts via expo-quick-actions#6001

Open
samholmes wants to merge 1 commit intodevelopfrom
sam/long-press-shortcuts-expo
Open

feat: add home screen long-press shortcuts via expo-quick-actions#6001
samholmes wants to merge 1 commit intodevelopfrom
sam/long-press-shortcuts-expo

Conversation

@samholmes
Copy link
Copy Markdown
Contributor

@samholmes samholmes commented Apr 25, 2026

Help users about to uninstall Edge recover their accounts: add a warning shortcut linking to the "save 2FA & credentials before uninstalling" support article, and a direct "Contact Support" link.

Use expo-quick-actions so titles/subtitles flow through lstrings and Crowdin instead of duplicating translations across 12 locales of InfoPlist.strings and values-*/strings.xml. Shortcuts are registered dynamically in JS, which means they only appear after the first app launch post-install — acceptable since the audience is established users considering uninstall, not fresh installs.

The import 'expo-modules-core' side effect in index.ts is non- obvious but required: expo-quick-actions reads
globalThis.expo.modules.ExpoQuickActions at module-evaluation time, and that global is installed lazily by expo-modules-core's NativeModule/SharedObject/EventEmitter module imports. Without one of those evaluating first the global stays empty and every expo-quick-actions call silently no-ops, including setItems, so the shortcuts never appear.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Medium Risk
Moderate risk due to new native module dependency (expo-quick-actions) and iOS pod changes, plus startup-side-effect initialization in index.ts that could impact app boot if misconfigured.

Overview
Adds home screen long-press quick actions via expo-quick-actions, registering two shortcuts ("⚠️ Save 2FA First!" and "Contact Support") that open Edge support URLs.

Wires a new QuickActionsManager into App to set items on startup and handle shortcut activation, and adds an expo-modules-core side-effect import in index.ts to ensure the module registry is initialized.

Updates iOS pods (ExpoQuickActions), package.json, lockfiles, localized strings, and the CHANGELOG entry to reflect the new shortcuts.

Reviewed by Cursor Bugbot for commit 4bec8ad. Bugbot is set up for automated code reviews on this repo. Configure here.


Help users about to uninstall Edge recover their accounts: add a
warning shortcut linking to the "save 2FA & credentials before
uninstalling" support article, and a direct "Contact Support" link.

Use expo-quick-actions so titles/subtitles flow through lstrings
and Crowdin instead of duplicating translations across 12 locales
of InfoPlist.strings and values-*/strings.xml. Shortcuts are
registered dynamically in JS, which means they only appear after
the first app launch post-install — acceptable since the audience
is established users considering uninstall, not fresh installs.

The `import 'expo-modules-core'` side effect in index.ts is non-
obvious but required: expo-quick-actions reads
globalThis.expo.modules.ExpoQuickActions at module-evaluation time,
and that global is installed lazily by expo-modules-core's
NativeModule/SharedObject/EventEmitter module imports. Without one
of those evaluating first the global stays empty and every
expo-quick-actions call silently no-ops, including setItems, so
the shortcuts never appear.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4bec8ad. Configure here.

}),
params: { url: CONTACT_SUPPORT_URL }
}
]).catch(showError)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shorthand .catch(showError) loses stack traces

Low Severity

Both .catch(showError) calls (on QuickActions.setItems(…) and Linking.openURL(url)) use the shorthand form that loses the calling-site stack trace. The project convention (and other service files like Services.tsx and ContactsLoader.ts) consistently use .catch((error: unknown) => showError(error)) instead. This violates the preserve-stack-traces rule.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4bec8ad. Configure here.

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