Commit Graph
1145 Commits
Author SHA1 Message Date
austinried c262e58a96 logging: fix SQL timing and upsert-conflict false alarms
Room's statement cache resets a statement when returning it to the cache, so starting the timer at reset counted idle time in the cache and reported normal queries as tens of seconds. Start timing on the first step instead, and finish on the completing step. Also downgrade Room @Upsert uniqueness-conflict errors (its insert-then-catch-then-update control flow) from ERROR to DEBUG, and log successful HTTP requests at VERBOSE so debug logs aren't flooded by cover-art requests.
2026-10-09 07:58:55 +00:00
austinried eb5019ea5e logging: use Share logs and restore its Flutter translations
Align the Settings label with the old Flutter wording and port the 19 existing settingsAboutShareLogs translations. The subtitle was new text with no prior translation, so drop it rather than ship an untranslated string.
2026-10-09 07:58:55 +00:00
austinried 8fe26a36b1 logging: make the writer total and harden export
Never let a log-write or export failure reach the uncaught handler: wrap the async writer and crash path, synchronize export with rotation, and tolerate vanished files. Redact the Logcat stack-trace copy, stop leaking rows=0 on writes, shut down the previous writer on re-init, and drop unused API. Strengthen tests for the batched write path, rotation count and throwable redaction.
2026-10-09 07:58:55 +00:00
austinried 7a890094fc logging: add file-based logging and a Send logs option
Capture logs to rotating app-private files with Subsonic credential and URL basic-auth redaction, mirror to Logcat, and capture uncaught crashes. Log slow SQL (>100ms), SQL errors, migrations and DB lifecycle via a decorating SQLiteDriver. Add a Send logs row in Settings that zips the logs and opens the share sheet through a FileProvider.
2026-10-09 07:58:54 +00:00
austinried 4012cc0272 build: harden the gradle guard wrapper
- cap workers via GRADLE_OPTS instead of a CLI flag, so a caller passing
  --max-workers no longer collides and fails the build
- keep the lock under $XDG_RUNTIME_DIR (falling back to ~/.cache) rather
  than a world-writable /tmp path
- let --stop/--status/--version bypass the lock, and announce when a build
  is waiting for it
- drop the redundant GITHUB_ACTIONS check; the CI runners all set CI
2026-10-09 07:48:00 +00:00
austinried 336fd9c49f build: guard local gradle runs against exhausting the box
The devshell `gradle` now serialises local builds with flock and runs
them under `nice` with capped workers, so several agents building at
once queue instead of piling up daemons and compile workers and taking
the machine down. With CI/GITHUB_ACTIONS set it execs Gradle directly,
leaving CI untouched. Also shorten the Gradle daemon idle timeout so
idle daemons are reaped sooner.
2026-10-09 07:42:05 +00:00
austinried 5f138bde6a artwork: cover the non-square and thumbnail reload paths
The fix keyed the request remembers in all three CoverArt branches; assert
each of them survives a re-salted URL for the same cacheKey, not just the
square grid path.
2026-10-09 07:03:49 +00:00
austinried 32360fac08 artwork: keep the cover request stable across recompositions
CoverArt keyed its remember blocks on the whole CoverArtRef, whose url is
freshly salted on every call. A recomposition therefore built a new
ImageRequest, Coil restarted the load and dropped the current drawable, so
the image flashed back to the letter placeholder before resolving from
cache. Key the request and the load-state remembers on the ref's stable
cacheKey instead.
2026-10-09 07:03:49 +00:00
austinried 206ac8988f net: include the Android release in the user agent 2026-10-09 06:33:22 +00:00
austinried 4fad6a78ec net: use the lowercase subtracks name in the user agent 2026-10-09 06:33:22 +00:00
austinried 2439368e4e net: pin the user agent value and test the shared client
Build the shared OkHttpClient through UserAgent.httpClient() so the unit test exercises the same client the app uses, assert the exact 'Subtracks (Android; <version>)' value rather than the property it writes, and run the test under the Android runner.
2026-10-09 06:33:22 +00:00
austinried 92c6f6945f net: use the AppName (platform; version) user agent form 2026-10-09 06:33:22 +00:00
austinried bcd7bbf23a net: send the subtracks user agent on every request
Only SubsonicClient tagged requests with 'subtracks/android'; playback (Media3 OkHttpDataSource), downloads (DownloadManager) and artwork (Coil/OkHttpArtworkFetcher) fell back to the OkHttp or platform default. Add a single UserAgent with the app version, apply it to the shared OkHttp client, the streaming data source factory and the DownloadManager request, and drop SubsonicClient's now-redundant header.
2026-10-09 06:33:22 +00:00
austinried ce9e3e89a7 build: pair the nightly icon background with its amber fill
Set the nightly launcher background to a dark tint of the amber mark
(#1A1200) instead of the magenta-tinted near-black, mirroring how the
standard icon's background is a dark tint of its magenta fill.
2026-10-09 05:27:05 +00:00
austinried 66ee837cbb build: give the nightly a distinct icon and drop the longer label
The 17-character 'subtracks nightly' label just truncates in the launcher,
so revert the app_name override (debug and nightly show 'subtracks' like
the release) and distinguish the nightly with a recoloured launcher icon
(amber mark) instead. The debug and nightly variants share src/nightly/res,
so installDebug and installNightly look the same.
2026-10-09 05:20:55 +00:00
austinried de4bd473f9 ci: upload the nightly APKs as separate raw artifacts
archive: false only supports a single file, so upload each of the two
APKs and SHA256SUMS as its own unzipped artifact instead of one zip.
2026-10-08 19:51:03 +00:00
austinried 7f421470b2 release: gzip the R8 mapping before attaching it 2026-10-08 19:23:56 +00:00
austinried 4bea164906 release: split the Play key write, guard the tag and attach the mapping
- write the Play service account in its own step so fastlane never has
  the secret in its environment (only the 0600 file path)
- fail the build when the tag does not match versionName
- serialize releases with a concurrency group
- attach the R8 mapping.txt to the GitHub release
2026-10-08 19:21:26 +00:00
austinried 9d43b6d104 address review: persist nightly checksums, guard the changelog, tidy CI
- write SHA256SUMS into the subtracks-nightly artifact
- assert at least one changelog exists in the metadata test
- drop the unused assembleDebug from the Forgejo CI
- only claim the AAB was uploaded to Play for stable releases
- clean up the export-certificate keystore with a trap
2026-10-08 19:12:56 +00:00
austinried 323bfde41b ci: fold the nightly artifact into the CI job
Drop the separate build-nightly workflow: on a push to main the CI job
uploads the debug and nightly APKs as the subtracks-nightly artifact, so
the nightly variant is built once instead of twice (and there is no
second Nix/cache setup).
2026-10-08 18:53:00 +00:00
austinried 18d06f750d ci: build the nightly variant in CI
Add :app:assembleNightly to the CI Gradle invocation so the R8 minify,
resource shrinking and packaging path is exercised on every PR (signed
with the committed debug key, so no secrets are needed).
2026-10-08 18:53:00 +00:00
austinried 44bc3f927e address review: guard the release pipeline and harden the metadata test
- fail the release before uploading to Play when the versionCode has no
  changelog
- rely on supply's defaults for release_status and metadata_path
- enforce 8-bit PNGs and reject tRNS chunks in MetadataConstraintsTest
- name the nightly artifact's APKs distinctly
- fix doc drift and the stale libraries uniqueId
2026-10-08 18:53:00 +00:00
austinried b0a0bc1867 build: label the nightly/debug variants distinctly 2026-10-08 18:53:00 +00:00
austinried e700c99796 docs: label the fingerprints as keytool/apksigner format 2026-10-08 18:52:44 +00:00
austinried 6af43c9c16 docs: drop the private Play Console references from signing/README 2026-10-08 18:52:44 +00:00
austinried 4f04129b0e docs: show both fingerprint formats with tool labels 2026-10-08 18:52:44 +00:00
austinried 772ab5f563 docs: note the fingerprint formats and normalize the release-notes one 2026-10-08 18:52:44 +00:00
austinried 1eb7c136bf docs: link F-Droid's signing keys and the nightly keystore 2026-10-08 18:52:44 +00:00
austinried 17ba581f88 docs: list F-Droid before nightly in the signing channels 2026-10-08 18:52:44 +00:00
austinried 76f2e4014c docs: put the release certificate before the nightly section 2026-10-08 18:52:44 +00:00
austinried 3d2ec5e931 docs: unwrap the lines in signing/README.md 2026-10-08 18:52:44 +00:00
austinried 368f53d589 release: attach the signed AAB to the GitHub release
Publish the exact bundle sent to Play alongside the APK, cover both in
SHA256SUMS and the release notes, and document verifying the AAB.
2026-10-08 18:52:44 +00:00
austinried 3f3db71f14 docs: commit the release signing certificate and fingerprint
Add the release key's public certificate (signing/release-certificate.pem)
and its SHA-256 to signing/README.md.
2026-10-08 18:52:44 +00:00
austinried e60b2d9910 rename the next build back to nightly
Rename the build type, workflow, artifact and app id (com.subtracks.nightly)
from next to nightly, and update the signing docs to match.
2026-10-08 18:52:44 +00:00
austinried f6d1d548e4 docs: correct the signing notes for Play App Signing
Google re-signs Play-delivered apps, so the release key is only the
upload key there and signs the AAB we send; the installed app verifies
against Google's app signing certificate. The release key also signs the
GitHub-release APK.
2026-10-08 18:52:44 +00:00
austinried e74360fe07 docs: link the verification steps under the download badges 2026-10-08 18:52:44 +00:00
austinried d3373261d2 release: publish checksums and the signing certificate
Print the artifact SHA-256 and the APK signer certificate in the release
log, attach SHA256SUMS and the public release certificate to the GitHub
release, list the APK and certificate SHA-256 in the release notes, print
the next build checksums, and commit the next build's public certificate
with verification steps in signing/README.md.
2026-10-08 18:52:44 +00:00
austinried 7f4e9703d4 test: cite the store docs in the metadata constraint tests
Quote and link the Play preview-asset requirements and recommendations
and the F-Droid metadata limits alongside the checks they justify.
2026-10-08 18:52:44 +00:00
austinried ff8011eaf4 release: only publish to Play for a stable tag
Gate the Play upload on a full vX.Y.Z tag and mark other tags as
prereleases. Fold the changelog length limit into MetadataConstraintsTest
and make its image checks reject anything but PNG or JPEG. Keep the
decoded keystore at 0600 and note in .forgejo/README.md that the GitHub
CI now factors the build into composite actions.
2026-10-08 18:52:44 +00:00
austinried b4b5f66d81 ci: track the build composite action
The .gitignore build/ pattern also matched .github/actions/build, so the
action was never committed even though the workflows referenced it.
Negate the rule for that path.
2026-10-08 18:52:44 +00:00
austinried 8fb930c2ce ci: share the build as a composite action
Replace the reusable workflow with .github/actions/build plus a nested
nix setup action, invoked as a step. CI and the next build stay a single
job (no extra runner or Nix restore); the release keeps its build/publish
split for credential isolation.
2026-10-08 18:52:44 +00:00
austinried af3741a549 ci: share the build and isolate the release credentials
Extract checkout, nix, signing and the Gradle run into a reusable build
workflow used by CI, the next build and the release build job. The build
job holds only the signing secrets; the publish job is the only one with
a write token and the Play credential. The Play service account is now
written to a 0600 file and passed via --json_key instead of on argv.
2026-10-08 18:52:44 +00:00
austinried fded9949af ci: stop exposing the checkout token and the keystore to later steps
Set persist-credentials: false so the contents:write token is not left
in .git/config where every later step (including the Gradle build) could
read it, and delete the decoded keystore once signing is done.
2026-10-08 18:52:44 +00:00
austinried 5c219c9f06 test: guard the store metadata against the store limits
Add metadata checks (title, short/full description, icon, feature
graphic, phone screenshots) at the stricter of the Play and F-Droid
limits, and drop the trailing period from the short description.
2026-10-08 18:52:44 +00:00
austinried 7145b9c3c7 test: write the demo screenshots as 24-bit no-alpha PNGs
Re-encode each capture to opaque RGB so the store screenshots copied
into metadata/ already satisfy Play's rule, instead of depending on a
manual palette-free re-encode.
2026-10-08 18:52:44 +00:00
austinried 4db8645691 docs: note the Play 24-bit screenshot requirement 2026-10-08 18:52:43 +00:00
austinried eaab5368d0 play: push the full store listing and make the screenshots compliant
Drop the fastlane --skip_upload_* flags so the title, descriptions,
icon, feature graphic and screenshots upload alongside the AAB, and
re-encode the phone screenshots as 24-bit no-alpha PNGs, which is what
Play requires.
2026-10-08 18:52:43 +00:00
austinried 6b6a99e51c release: create the GitHub release with the gh CLI
Drop the third-party action in favour of GitHub's own gh CLI, which the
hosted runners already provide.
2026-10-08 18:52:43 +00:00
austinried 21d6c57bc2 ci: match the repo GitHub runner and action versions
Use ubuntu-26.04, actions/checkout v7 and actions/upload-artifact v7,
and cap the cached Nix store at 6G, matching .github/workflows/ci.yml.
2026-10-08 18:52:43 +00:00
austinried 650d8c49e6 release: upload to Google Play with fastlane
Replace the unpinned third-party upload-google-play action with fastlane
supply from a small nix release devshell, and pin the remaining
third-party GitHub release action to a commit SHA.
2026-10-08 18:52:43 +00:00