Skip to content

mobile fixes - #15

Merged
thomasluizon merged 5 commits into
mainfrom
mobile-fixes
Apr 7, 2026
Merged

thomasluizon merged 5 commits into
mainfrom
mobile-fixes

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner
  • mobile: add habit delete flow & push handling
  • mobile: drill navigation, UI & push improvements
  • Mobile: UI tweaks, push token fix, and APK script
  • fix push notification registration flow

Multiple mobile changes: add a habit delete confirmation flow (request/confirm, modal, and onDelete wiring) and surface a TrialBanner in the Today screen. Improve push notification handling: open settings if permission denied, refresh permission status on app resume, and move PushPrompt lazy-loading logic to a safer location. UX fixes: better keyboard handling for the Profile "Fresh Start" modal (KeyboardAvoidingView + ScrollView, maxHeight), show an action to open settings when mic access is denied in Chat, and adjust related styles. Tests: update api-client tests to mock text responses and add a test for successful empty 200 responses. Config: update app.json Android adaptive icon foreground and add POST_NOTIFICATIONS and RECORD_AUDIO permissions. Repo housekeeping: expand .gitignore rules for native build outputs and remove generated Android build artifacts from orbit-widget; add/update web/mobile assets and i18n updates.
Add drill-into view and refine habit UI and push handling.

- Introduce drill navigation in HabitList (useDrillNavigation): renders a drill header with back/reset, shows only sub-habits for a drilled parent, and provides an add-sub-habit action.
- Update HabitList to wire drill.drillInto and adapt onForceLogParent to call an optional onLogHabit prop.
- Refactor HabitCard touch behavior: replace outer TouchableOpacity with an inner pressable area, simplify expand toggle handler, reorder title/description rendering and adjust styles to avoid interaction conflicts.
- Improve push notification handling: remove automatic permission request from PushPrompt, use ExecutionEnvironment checks from expo-constants to detect StoreClient/Expo Go, and harden permission/token flow in use-push-notifications.
- Add googleServicesFile to app.json for Android native config.
- Add convenience scripts and wiring: new scripts run-android.js, run-dev-client.js, android-release-device.js and update package.json to use them for dev/client/android commands.

(Excluded autogenerated build/intermediates changes.)
Multiple mobile app updates:

- bottom-sheet-modal: stabilize snapPoints useMemo by keying on a joined snapPoints string to avoid stale deps when array identity changes.
- habit-card: make the whole card pressable (TouchableOpacity) and remove nested pressable to simplify touch handling; adjust styles accordingly and add long-press to enter select mode.
- habits/log-habit-modal: replace Gorhom bottom sheet with a native Modal + KeyboardAvoidingView, add custom sheet header with close button, backdrop handling, and platform-aware keyboard behavior for improved UX.
- ui/push-prompt: auto-request notification permission once when status is undetermined (with a small Android delay), track auto-request to avoid repeated prompts.
- hooks/use-push-notifications: ensure Android uses native FCM token only (never fall back to Expo token) so backend delivery via FCM works reliably; streamline token retrieval logic.
- package.json + scripts: add npm script "android:apk" and new scripts/android-release-apk.js to run gradle assembleRelease with EXPO_NO_METRO_WORKSPACE_ROOT set.

These changes improve touch handling, modal UX, push notification reliability on Android, and add a convenience script for building a release APK.
@vercel

vercel Bot commented Apr 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
orbit-ui-mobile-web Ignored Ignored Apr 7, 2026 3:11pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b93ca1fd85

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +67 to +71
const interaction = InteractionManager.runAfterInteractions(() => {
timeoutId = setTimeout(() => {
if (cancelled) return
void requestPermission().then((success) => {
if (success) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor dismissed push prompt before auto-requesting permission

The effect now auto-calls requestPermission() as soon as permission is undetermined, but that branch runs before the stored dismissal flag is checked. As a result, users who tapped “Not now” (which sets orbit_push_prompted in dismiss) can still be forced into the OS permission dialog on the next launch, effectively ignoring their deferral choice and causing repeated unsolicited prompts until they deny/grant at the system level.

Useful? React with 👍 / 👎.

@sonarqubecloud

sonarqubecloud Bot commented Apr 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
75.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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