Skip to content

Conversation

@alexjba
Copy link
Contributor

@alexjba alexjba commented Jan 28, 2026

What does the PR do

Implementing a convenience feature to share app logs or report bugs.

It's inspired from the legacy app where shaking the phone will allow the user to report a bug or export the app logs.

Affected areas

StatusQ mainly

Architecture compliance

Screencapture of the functionality

ScreenRecording_01-28-2026.17-19-41_1.MP4
Screen_Recording_20260128_172417_GitHub.mp4

Impact on end user

The user will be able to export logs or to quickly report bugs.

How to test

Shake the phone in any screen

Risk

Low

@status-im-auto
Copy link
Member

status-im-auto commented Jan 28, 2026

Jenkins Builds

Click to see older builds (37)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d42e3cae 1 2026-01-28 11:19:33 ~10 min android/arm64 🤖apk 📲
✔️ cac378b 1 2026-01-28 11:21:19 ~11 min tests/nim 📄log
✔️ cac378b 1 2026-01-28 11:23:09 ~13 min tests/ui 📄log
cac378b 1 2026-01-28 11:24:00 ~14 min ios/aarch64 📄log
✔️ cac378b 1 2026-01-28 11:25:29 ~15 min macos/aarch64 🍎dmg
✖️ cac378b PR19809 2026-01-28 11:29:30 ~9 min tests/e2e-android 📦pkg
✔️ cac378b 1 2026-01-28 11:30:36 ~21 min macos/aarch64-nwaku 🍎dmg
✔️ cac378b 1 2026-01-28 11:31:20 ~21 min linux/x86_64 📦tgz
✔️ cac378b 1 2026-01-28 11:31:30 ~22 min linux/x86_64-nwaku 📦tgz
cac378b 1 2026-01-28 11:34:55 ~25 min windows/x86_64 📄log
✔️ cac378b 9411 2026-01-28 11:49:15 ~17 min tests/e2e 📊rpt
✔️ 12d168d3 2 2026-01-28 14:51:26 ~9 min android/arm64 🤖apk 📲
✔️ 82e3bcc 2 2026-01-28 14:53:48 ~11 min tests/nim 📄log
✔️ 82e3bcc 2 2026-01-28 14:55:38 ~13 min ios/aarch64 📱ipa 📲
✔️ 82e3bcc 2 2026-01-28 14:57:04 ~14 min tests/ui 📄log
✖️ 82e3bcc PR19809 2026-01-28 15:01:23 ~9 min tests/e2e-android 📦pkg
✔️ 82e3bcc 2 2026-01-28 15:02:42 ~20 min linux/x86_64-nwaku 📦tgz
✔️ 82e3bcc 2 2026-01-28 15:02:47 ~20 min linux/x86_64 📦tgz
82e3bcc 2 2026-01-28 15:05:55 ~23 min macos/aarch64-nwaku 📄log
✔️ 82e3bcc 2 2026-01-28 15:06:40 ~24 min macos/aarch64 🍎dmg
82e3bcc 2 2026-01-28 15:07:56 ~25 min windows/x86_64 📄log
82e3bcc 9415 2026-01-28 15:21:21 ~18 min tests/e2e 📄log
✔️ bedcc78e 3 2026-01-28 15:45:32 ~16 min android/arm64 🤖apk 📲
8d7f436 3 2026-01-28 15:45:58 ~16 min macos/aarch64-nwaku 📄log
✔️ 8d7f436 3 2026-01-28 15:48:34 ~19 min tests/nim 📄log
✔️ 8d7f436 3 2026-01-28 15:53:13 ~23 min ios/aarch64 📱ipa 📲
✔️ 8d7f436 3 2026-01-28 15:53:25 ~23 min tests/ui 📄log
✔️ 8d7f436 3 2026-01-28 15:53:26 ~23 min macos/aarch64 🍎dmg
8d7f436 3 2026-01-28 15:57:32 ~27 min windows/x86_64 📄log
✔️ 8d7f436 3 2026-01-28 15:57:58 ~28 min linux/x86_64 📦tgz
✔️ 8d7f436 3 2026-01-28 15:58:10 ~28 min linux/x86_64-nwaku 📦tgz
✖️ 8d7f436 PR19809 2026-01-28 16:00:11 ~14 min tests/e2e-android 📦pkg
✔️ 8d7f436 9419 2026-01-28 16:38:53 ~40 min tests/e2e 📊rpt
✖️ 8d7f436 PR19809 2026-01-29 05:50:44 ~20 min tests/e2e-android 📦pkg
✖️ 8d7f436 PR19809 2026-01-30 06:00:28 ~29 min tests/e2e-android 📦pkg
✖️ 8d7f436 PR19809 2026-01-31 06:12:49 ~32 min tests/e2e-android 📦pkg
✔️ 93a3c3b0 4 2026-01-29 05:29:44 ~11 min android/arm64 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 206bc271 5 2026-01-30 05:31:15 ~12 min android/arm64 🤖apk 📲
✔️ 0115c93b 6 2026-01-31 05:40:04 ~21 min android/arm64 🤖apk 📲

@alexjba alexjba force-pushed the feat/shake-to-share-master branch from cac378b to 82e3bcc Compare January 28, 2026 14:41
Implement shake to share for android and IOS

+ migrate to an event driven mechanism for IOS as well
@alexjba alexjba force-pushed the feat/shake-to-share-master branch from 82e3bcc to 8d7f436 Compare January 28, 2026 15:29
@alexjba alexjba marked this pull request as ready for review January 28, 2026 15:32
@alexjba alexjba requested review from a team, caybro, micieslak and noeliaSD as code owners January 28, 2026 15:32
@alexjba alexjba requested a review from Copilot January 28, 2026 18:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a shake-to-share feature for mobile platforms, allowing users to export app logs or report bugs by shaking their device. The feature is inspired by the legacy app's functionality.

Changes:

  • Added shake detection support for iOS (using CoreMotion accelerometer) and Android (using SensorManager)
  • Implemented a dialog UI that presents two options when shake is detected: export log files or report a bug on GitHub
  • Added cross-platform file sharing utilities to share log files through the native share sheets

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
ui/main.qml Added shake detection handler and dialog UI for log export/bug reporting
ui/imports/utils/Constants.qml Added GitHub bug report URL constant
ui/i18n/*.ts Added translation entries for the new dialog strings
ui/StatusQ/src/systemutilsinternal.cpp Implemented shake detection callbacks and file sharing methods for iOS and Android
ui/StatusQ/src/ios_utils.mm Added iOS accelerometer-based shake detection and native share sheet implementation
ui/StatusQ/src/ios_utils.h Added shake detection and share sheet function declarations
ui/StatusQ/include/StatusQ/systemutilsinternal.h Added shakeDetected signal and share methods to API
ui/StatusQ/CMakeLists.txt Linked CoreMotion framework for iOS
src/app/global/utils.nim Added collectLogFilesJson method to gather log files for sharing
mobile/wrapperApp/Status.pro Added CoreMotion framework to iOS build
mobile/android/qt6/src/app/status/mobile/StatusQtActivity.java Integrated shake detection lifecycle management
mobile/android/qt6/src/app/status/mobile/ShareUtils.java Implemented Android file sharing via FileProvider
mobile/android/qt6/src/app/status/mobile/ShakeDetector.java Implemented Android accelerometer-based shake detection

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +23670 to +23674
<source>Hello World</source>
<comment>main</comment>
<translation>Hello World</translation>
</message>
<message>
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The translation files include an entry for "Hello World" which doesn't appear to be used anywhere in the code. This appears to be leftover from development or testing and should be removed to keep the translation files clean.

Suggested change
<source>Hello World</source>
<comment>main</comment>
<translation>Hello World</translation>
</message>
<message>

Copilot uses AI. Check for mistakes.
Comment on lines +19586 to +19589
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The translation files include an entry for "Hello World" which doesn't appear to be used anywhere in the code. This appears to be leftover from development or testing and should be removed to keep the translation files clean.

Suggested change
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>

Copilot uses AI. Check for mistakes.
Comment on lines +19455 to +19458
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The translation files include an entry for "Hello World" which doesn't appear to be used anywhere in the code. This appears to be leftover from development or testing and should be removed to keep the translation files clean.

Suggested change
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>

Copilot uses AI. Check for mistakes.
Comment on lines +19429 to +19432
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The translation files include an entry for "Hello World" which doesn't appear to be used anywhere in the code. This appears to be leftover from development or testing and should be removed to keep the translation files clean.

Suggested change
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>

Copilot uses AI. Check for mistakes.
Comment on lines +304 to +311
function onShakeDetected() {
const nowMs = Date.now()
if (nowMs - d.lastShakeShareMs < 3000) {
return
}
d.lastShakeShareMs = nowMs
shakeToShareLoader.active = true
}
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The onShakeDetected handler is placed inside a Connections block with enabled: SQUtils.Utils.mac which restricts it to only work on macOS. However, based on the PR description and the shake detection implementations in systemutilsinternal.cpp (Android on lines 99-128, iOS on lines 131-159), this feature is intended for mobile platforms (iOS and Android), not macOS. This means the shake detection will not work on the intended platforms. Consider either:

  1. Removing the enabled condition from this Connections block (since onQuit is already checking for mac in its logic), or
  2. Moving onShakeDetected to a separate Connections block with enabled: SQUtils.Utils.isMobile

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +137
// Set up iOS shake detection (event-driven callback)
::setIOSShakeCallback(&iosShakeDetected);
// Set up iOS shake detection
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

There are duplicate comments about setting up iOS shake detection on consecutive lines. Line 135 says "Set up iOS shake detection (event-driven callback)" and line 137 says "Set up iOS shake detection" which are redundant. Consider consolidating these into a single clear comment.

Suggested change
// Set up iOS shake detection (event-driven callback)
::setIOSShakeCallback(&iosShakeDetected);
// Set up iOS shake detection
// Set up iOS shake detection: register callback and enable detection
::setIOSShakeCallback(&iosShakeDetected);

Copilot uses AI. Check for mistakes.
Comment on lines +489 to +512
StatusButton {
Layout.fillWidth: true
text: qsTr("Export log files")
onClicked: {
try {
const json = globalUtils.collectLogFilesJson()
const paths = JSON.parse(json)
if (!paths || paths.length === 0) {
return
}

SystemUtils.sharePaths(paths)
} catch (e) {
console.error("[Shake] handler threw: " + e)
}
}
}
StatusButton {
Layout.fillWidth: true
text: qsTr("Report a bug on GitHub")
onClicked: {
Qt.openUrlExternally(Constants.bugReportUrl)
}
}
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The dialog buttons do not explicitly close the dialog after their actions complete. When "Export log files" is clicked, the system share sheet is invoked but the shake dialog remains open in the background. Similarly, when "Report a bug on GitHub" is clicked, the browser opens but the dialog stays open. Consider calling the dialog's close method or setting shakeToShareLoader.active to false at the end of each button's onClicked handler to dismiss the dialog after the user takes action.

Copilot uses AI. Check for mistakes.
Comment on lines +496 to +498
if (!paths || paths.length === 0) {
return
}
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

When no log files are found (paths.length === 0), the function silently returns without providing any feedback to the user. This could leave users confused when they shake their device expecting to share logs but nothing happens. Consider showing a toast notification or message to inform users that no log files were found.

Copilot uses AI. Check for mistakes.
Comment on lines +19492 to +19495
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The translation files include an entry for "Hello World" which doesn't appear to be used anywhere in the code. This appears to be leftover from development or testing and should be removed to keep the translation files clean.

Suggested change
<source>Hello World</source>
<translation type="unfinished"></translation>
</message>
<message>

Copilot uses AI. Check for mistakes.
*/
Connections {
target: SystemUtils
enabled: SQUtils.Utils.mac
Copy link
Member

Choose a reason for hiding this comment

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

As noted elsewhere, this is wrong :D

target: SystemUtils
enabled: SQUtils.Utils.mac

function onQuit(spontaneous) {
Copy link
Member

Choose a reason for hiding this comment

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

Might want to split into 2 Connections, and enable this onQuit handler everywhere

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.

3 participants