Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
39cf182
feat(auth): add API key settings screen and config manager
TimeToBuildBob May 21, 2026
5b15dad
fix(auth): address Greptile review findings
TimeToBuildBob May 21, 2026
37e18f8
fix(auth): fully scope writeApiKey operations to [auth] section
TimeToBuildBob May 21, 2026
ef4acb1
fix(auth): suppress clipboard preview for API key on Android 13+
TimeToBuildBob May 21, 2026
b1c51a8
fix(auth): bump aw-server-rust for settings PR
TimeToBuildBob May 21, 2026
629cc52
fix(auth): use atomic write for config.toml via temp-file rename
TimeToBuildBob May 21, 2026
d0acba7
fix(ci): fallback versionCode for fork PRs
TimeToBuildBob May 21, 2026
6a07856
fix(ci): upgrade artifact actions to v4
TimeToBuildBob May 21, 2026
287d089
fix(ci): use modern Android SDK tools path
TimeToBuildBob May 21, 2026
649784b
fix(ci): skip signed artifacts on fork PRs
TimeToBuildBob May 21, 2026
422b357
fix(auth): propagate API key write failures
TimeToBuildBob May 21, 2026
23a57d5
fix(ci): repair Linux emulator startup
TimeToBuildBob May 21, 2026
3a50619
fix(ci): handle emulator without kvm acceleration
TimeToBuildBob May 21, 2026
4006732
fix(ci): make E2E screenshot best effort
TimeToBuildBob May 21, 2026
9491520
fix(auth): insert API key in newline-less auth section
TimeToBuildBob May 21, 2026
77ba74a
ci: re-trigger Test job (stuck pending for 14h)
TimeToBuildBob May 22, 2026
fb7b0b7
fix(ci): upgrade Test job from ubuntu-20.04 to ubuntu-22.04
TimeToBuildBob May 22, 2026
ffbdd1f
fix(ci): remove jniLibs dependency from Test job
TimeToBuildBob May 22, 2026
a9c05ca
fix(ci): restore NDK in Test job — required at Gradle config time
TimeToBuildBob May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 58 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,36 @@ jobs:
submodules: 'recursive'


- name: Detect Fastlane secrets
id: fastlane_secrets
env:
KEY_FASTLANE_API: ${{ secrets.KEY_FASTLANE_API }}
run: |
if [ -n "$KEY_FASTLANE_API" ]; then
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "available=false" >> "$GITHUB_OUTPUT"
fi

- name: Require Fastlane secrets outside pull requests
if: steps.fastlane_secrets.outputs.available != 'true' && github.event_name != 'pull_request'
run: |
echo "::error::KEY_FASTLANE_API is required for non-PR builds"
exit 1

# Ruby & Fastlane
# version set by .ruby-version
- name: Set up Ruby and install fastlane
if: steps.fastlane_secrets.outputs.available == 'true'
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

# Needed for `fastlane update_version`
- uses: adnsio/setup-age-action@v1.2.0
if: steps.fastlane_secrets.outputs.available == 'true'
- name: Load Fastlane secrets
if: steps.fastlane_secrets.outputs.available == 'true'
env:
KEY_FASTLANE_API: ${{ secrets.KEY_FASTLANE_API }}
run: |
Expand All @@ -121,12 +141,18 @@ jobs:
# Retry this, in case there are concurrent jobs, which may lead to the error:
# "Google Api Error: Invalid request - This Edit has been deleted."
- name: Update versionCode
if: steps.fastlane_secrets.outputs.available == 'true'
uses: Wandalen/wretry.action@master
with:
command: bundle exec fastlane update_version
attempt_limit: 3
attempt_delay: 20000

- name: Use checked-in versionCode fallback
if: steps.fastlane_secrets.outputs.available != 'true'
run: |
echo "KEY_FASTLANE_API unavailable for pull_request build; using checked-in versionCode."

- name: Output versionCode
id: versionCode
run: |
Expand All @@ -136,6 +162,9 @@ jobs:
name: Build ${{ matrix.type }}
runs-on: ubicloud-standard-4
needs: [build-rust, get-versionCode]
# Fork PRs cannot access signing secrets; build/test coverage still runs in
# build-rust, test, and test-e2e.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -222,15 +251,14 @@ jobs:
make dist/aw-android.${{ matrix.type }}

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: aw-android
name: aw-android-${{ matrix.type }}
path: dist/aw-android*.${{ matrix.type }}

test:
name: Test
runs-on: ubuntu-20.04
needs: [build-rust]
runs-on: ubuntu-22.04
env:
SUPPLY_TRACK: production # used by fastlane to determine track to publish to

Expand All @@ -239,40 +267,20 @@ jobs:
with:
submodules: 'recursive'

- name: Set RELEASE
run: |
echo "RELEASE=${{ startsWith(github.ref_name, 'v') }}" >> $GITHUB_ENV

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}

# Android SDK & NDK
# Android SDK & NDK (NDK required at Gradle configuration time even for JVM unit tests)
- name: Set up Android SDK
uses: android-actions/setup-android@v2
- name: Set up Android NDK
run: |
sdkmanager "ndk;${{ env.NDK_VERSION }}"
ANDROID_NDK_HOME="$ANDROID_SDK_ROOT/ndk/${{ env.NDK_VERSION }}"
ls $ANDROID_NDK_HOME
echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV


# Restores jniLibs from cache
# `actions/cache/restore` only restores, without saving back in a post-hook
- uses: actions/cache/restore@v3
id: cache-jniLibs
env:
cache-name: jniLibs
with:
path: mobile/src/main/jniLibs/
key: ${{ env.cache-name }}-release-${{ env.RELEASE }}-ndk-${{ env.NDK_VERSION }}-${{ hashFiles('.git/modules/aw-server-rust/HEAD') }}
fail-on-cache-miss: true
- name: Check that jniLibs present
run: |
test -e mobile/src/main/jniLibs/x86_64/libaw_server.so

# Test
- name: Test
run: |
Expand Down Expand Up @@ -328,15 +336,18 @@ jobs:
if: runner.os == 'macOS'
run: brew install intel-haxm

- name: Set up Android SDK
uses: android-actions/setup-android@v2

# # # Below code is majorly from https://github.com/actions/runner-images/issues/6152#issuecomment-1243718140
- name: Create Android emulator
run: |
# Install AVD files
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-'$MATRIX_E_SDK';default;x86_64'
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --licenses
echo "y" | sdkmanager --install 'system-images;android-'$MATRIX_E_SDK';default;x86_64'
echo "y" | sdkmanager --licenses

# Create emulator
$ANDROID_HOME/tools/bin/avdmanager create avd -n $MATRIX_AVD -d pixel --package 'system-images;android-'$MATRIX_E_SDK';default;x86_64'
avdmanager create avd -n $MATRIX_AVD -d pixel --package 'system-images;android-'$MATRIX_E_SDK';default;x86_64'
$ANDROID_HOME/emulator/emulator -list-avds
if false; then
emulator_config=~/.android/avd/$MATRIX_AVD.avd/config.ini
Expand Down Expand Up @@ -369,14 +380,19 @@ jobs:
run: |
echo "Starting emulator and waiting for boot to complete...."
ls -la $ANDROID_HOME/emulator
$ANDROID_HOME/tools/emulator --accel-check # check for hardware acceleration
nohup $ANDROID_HOME/tools/emulator -avd $MATRIX_AVD -gpu host -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 &
emulator_args=(-avd "$MATRIX_AVD" -gpu swiftshader_indirect -no-window -no-audio -no-boot-anim -camera-back none -camera-front none)
if $ANDROID_HOME/emulator/emulator -accel-check; then
echo "Hardware acceleration available."
else
echo "Hardware acceleration unavailable; using software acceleration."
emulator_args+=(-accel off)
fi
nohup $ANDROID_HOME/emulator/emulator "${emulator_args[@]}" -qemu -m 2048 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do echo "wait..."; sleep 1; done; input keyevent 82'
echo "Emulator has finished booting"
$ANDROID_HOME/platform-tools/adb devices
sleep 30
mkdir -p screenshots
screencapture screenshots/screenshot-$SUFFIX.jpg
$ANDROID_HOME/platform-tools/adb exec-out screencap -p > screenshots/emulator-$SUFFIX.png

# # # Have to re-setup everything since we need to run emulator for faster performance on masOS ? Other os'es emulator will not startup ?
Expand Down Expand Up @@ -422,8 +438,6 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}

# Android SDK & NDK
- name: Set up Android SDK
uses: android-actions/setup-android@v2
- name: Set up Android NDK
run: |
sdkmanager "ndk;${{ env.NDK_VERSION }}"
Expand All @@ -449,15 +463,15 @@ jobs:
env:
SUFFIX: ${{ matrix.android_avd }}-eAPI-${{ matrix.android_emu_version }}
run: |
adb shell monkey -p net.activitywatch.android.debug 1
adb shell monkey -p net.activitywatch.android.debug 1 || echo "App launch failed; capturing current emulator screen."
sleep 10
screencapture screenshots/pscreenshot-$SUFFIX.jpg
$ANDROID_HOME/platform-tools/adb exec-out screencap -p > screenshots/pemulator-$SUFFIX.png
mkdir -p screenshots
$ANDROID_HOME/platform-tools/adb exec-out screencap -p > screenshots/pemulator-$SUFFIX.png || echo "Screenshot capture failed."
ls -alh screenshots/

- name: Upload logcat
if: ${{ success() || steps.test.conclusion == 'failure'}}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: logcat
# mobile\build\outputs\connected_android_test_additional_output\debugAndroidTest\connected\Pixel_XL_API_32(AVD) - 12\ScreenshotTest_saveDeviceScreenBitmap.png
Expand All @@ -473,7 +487,7 @@ jobs:
# path: ./*.mov # out.mov

- name: Upload screenshots
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ success() || steps.test.conclusion == 'failure'}}
with:
name: screenshots
Expand All @@ -500,10 +514,11 @@ jobs:
- uses: actions/checkout@v3

- name: Download APK & AAB
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: aw-android
pattern: aw-android-*
path: dist
merge-multiple: true

- name: Display structure of downloaded files
working-directory: dist
Expand Down Expand Up @@ -556,10 +571,11 @@ jobs:

# Will download all artifacts to path
- name: Download release APK & AAB
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: aw-android
pattern: aw-android-*
path: dist
merge-multiple: true

- name: Display structure of downloaded files
working-directory: dist
Expand All @@ -581,4 +597,3 @@ jobs:
dist/*.apk
dist/*.aab
# body_path: dist/release_notes/release_notes.md

2 changes: 1 addition & 1 deletion aw-server-rust
Submodule aw-server-rust updated 57 files
+11 −11 .github/workflows/build.yml
+2 −5 .github/workflows/lint.yml
+25 −0 .pre-commit-config.yaml
+1,367 −811 Cargo.lock
+4 −1 Makefile
+37 −0 README.md
+9 −2 aw-client-rust/Cargo.toml
+0 −2 aw-client-rust/README.md
+22 −2 aw-client-rust/src/blocking.rs
+144 −0 aw-client-rust/src/classes.rs
+135 −36 aw-client-rust/src/lib.rs
+484 −0 aw-client-rust/src/queries.rs
+84 −0 aw-client-rust/src/single_instance.rs
+139 −0 aw-client-rust/tests/status_errors.rs
+179 −5 aw-client-rust/tests/test.rs
+3 −2 aw-datastore/Cargo.toml
+66 −32 aw-datastore/src/datastore.rs
+5 −5 aw-datastore/src/legacy_import.rs
+1 −0 aw-datastore/src/lib.rs
+420 −0 aw-datastore/src/privacy_filter.rs
+110 −7 aw-datastore/src/worker.rs
+41 −4 aw-datastore/tests/datastore.rs
+5 −0 aw-models/src/lib.rs
+76 −0 aw-models/src/settings.rs
+1 −1 aw-query/Cargo.toml
+22 −2 aw-query/src/datatype.rs
+0 −3 aw-query/src/functions.rs
+55 −0 aw-query/tests/query.rs
+2 −2 aw-server.service
+10 −6 aw-server/Cargo.toml
+6 −0 aw-server/build.rs
+145 −5 aw-server/src/android/mod.rs
+96 −3 aw-server/src/config.rs
+1 −1 aw-server/src/device_id.rs
+79 −13 aw-server/src/dirs.rs
+279 −0 aw-server/src/endpoints/apikey.rs
+21 −21 aw-server/src/endpoints/bucket.rs
+1 −0 aw-server/src/endpoints/cors.rs
+98 −3 aw-server/src/endpoints/import.rs
+22 −0 aw-server/src/endpoints/mod.rs
+0 −3 aw-server/src/lib.rs
+12 −3 aw-server/src/main.rs
+89 −7 aw-server/tests/api.rs
+18 −4 aw-sync/Cargo.toml
+70 −13 aw-sync/README.md
+241 −0 aw-sync/src/android.rs
+11 −5 aw-sync/src/dirs.rs
+4 −1 aw-sync/src/lib.rs
+176 −69 aw-sync/src/main.rs
+12 −3 aw-sync/src/sync.rs
+8 −27 aw-sync/src/sync_wrapper.rs
+1 −1 aw-sync/src/util.rs
+2 −2 aw-transform/Cargo.toml
+70 −9 aw-transform/src/classify.rs
+35 −5 aw-transform/src/split_url.rs
+1 −1 aw-webui
+9 −0 compile-android.sh
6 changes: 6 additions & 0 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
android:theme="@style/AppTheme.NoActionBar"
android:exported="true"/>

<activity
android:name=".AuthSettingsActivity"
android:screenOrientation="portrait"
android:configChanges="orientation"
android:exported="false"/>

<receiver
android:name=".watcher.AlarmReceiver"
android:enabled="true"
Expand Down
Loading
Loading