Release 1.0.0: merge dev into main [skip release] #15

Merged
nezumi merged 7 commits from dev into main 2026-11-21 13:52:30 +00:00
Owner

Merge dev into main to prepare the first stable release (v1.0.0).

Changes since v0.3.4

  • Fix D-pad unable to reach Favorites and Recent rows on Home (#10)
  • UI: align TV screens with the updated prototype, add splash screen (#11)
  • Add TV Settings screen from the prototype (#12)
  • Self-update: install via PackageInstaller and clean up installer files (#13)
  • Replace app icon and TV banner with the new mic icon set (#14)
  • Weekly cleanup of old releases, emulator control script

Release notes

  • Merge with a merge commit (not squash). The merge commit title contains [skip release], so the auto patch release (would be v0.3.5) is skipped.
  • After merging, run Actions > Release > Run workflow on main with bump=major to publish v1.0.0.
Merge `dev` into `main` to prepare the first stable release (v1.0.0). ## Changes since v0.3.4 - Fix D-pad unable to reach Favorites and Recent rows on Home (#10) - UI: align TV screens with the updated prototype, add splash screen (#11) - Add TV Settings screen from the prototype (#12) - Self-update: install via PackageInstaller and clean up installer files (#13) - Replace app icon and TV banner with the new mic icon set (#14) - Weekly cleanup of old releases, emulator control script ## Release notes - Merge with a **merge commit** (not squash). The merge commit title contains `[skip release]`, so the auto patch release (would be v0.3.5) is skipped. - After merging, run Actions > Release > Run workflow on `main` with `bump=major` to publish **v1.0.0**.
Fix D-pad unable to reach Favorites and Recent rows on Home (#10)
Some checks failed
CI / build (push) Has been cancelled
6fa93a124f
## Problem
On the Home screen, D-pad focus could only reach the Suggested row; Favorites and Recent rows were unreachable.

## Cause
Rows lived in a `LazyColumn`. Focus search only sees composed items, and the large Suggested card pushed the lower rows out of the viewport, so they were never composed.

## Fix
Use a `Column` with `verticalScroll` so all three rows are composed. Focusing a card scrolls it into view. Each row is still a `LazyRow`.

## Testing
Not built or run locally (no JDK on this machine); relies on CI.

Co-authored-by: Nezumi-2711 <123229563+Nezumi-2711@users.noreply.github.com>
Reviewed-on: #10
CI: add weekly cleanup of releases older than 30 days [skip release]
All checks were successful
CI / build (push) Successful in 4m31s
6240bcee75
Deletes releases (and APK assets) older than 30 days when a newer release
exists; the newest release is always kept. Tags are left untouched.
Manual runs default to dry-run.
UI: align TV screens with the updated prototype, add splash screen (#11)
All checks were successful
CI / build (push) Successful in 3m29s
43dec6e94c
## Why

The prototype (`docs/design/prototype.html`) gained a stage background, motion, an update chip/dialog and a splash screen. This brings the parts that exist in the app up to date with it. Settings and genre colours are not in the app yet and are skipped.

## What changed

- **Stage background** (`StageBackground.kt`): amber beams, top glow and a star field with sway and twinkle, behind Home, Search, Library and Interlude. Animated through `graphicsLayer` only; a stronger `StageStyle.Splash` preset is used by the splash.
- **Motion** (`Motion.kt`, `Components.kt`):
  - Pulsing "now singing" dot.
  - Focus ring that fades in and settles, animated background colour, animated card lift.
  - Screen fade-in, staggered rise on Home rows and Interlude, dialog pop, toast slide-in.
  - Linear player progress and interlude ring.
- **Updates**: chip in the top nav (available / downloading N% / ready). Redesigned dialog with a version panel, release notes, a progress bar and "Chạy nền". "Để sau" hides the dialog but keeps the chip.
- **Splash** (`Splash.kt`): shown on cold start for 2.8s; OK/Enter/Back skip it. Skipped when a song is already playing. The auto update dialog waits until it ends. The window background is now `#141415` to avoid a black flash.
- `docs/design/prototype.html` refreshed from the latest prototype.

## Checks

- `:app:compileDebugKotlin` and `:app:testDebugUnitTest` pass.
- Installed on the Android TV emulator; Home and Splash checked from screenshots.
- Not yet run on the FPT Play box. The full-screen background animation should be checked for jank there.

Co-authored-by: nezumi <123229563+Nezumi-2711@users.noreply.github.com>
Reviewed-on: #11
Add TV Settings screen from the prototype (#12)
All checks were successful
CI / build (push) Successful in 4m37s
4dda7ced3c
## Why
The prototype has a Settings screen; the app had none, and interlude length / video quality were hard-coded.

## What changed
- **Settings screen** (icon-only nav item after "Điện thoại", Back → Home), two columns:
  - *Phát*: auto-play next (toggle), interlude 5/10/15 s (picker), video quality Auto/720p/1080p (picker).
  - *Giao diện*: stage lights & stars, motion (toggles).
  - *Kết nối*: room code (opens the QR dialog), device name.
  - *Về ứng dụng*: version, author (opens an author dialog, avatar loaded from Forgejo with an initial fallback), check for updates (manual check, ignores the interval).
- `Settings` is persisted in `state.json` (`Persisted.settings`) and never bumps the protocol `rev`.
- Interlude countdown uses `settings.interludeSec`; auto-play off sends the TV Home with a "next song waiting" toast.
- Quality caps the resolver height (prefetch included); auto-downshift to 720p only in Auto.
- `LocalMotion` / `LocalStageLights` turn off animations and the stage background.
- Protocol: `screen` may be `"settings"` (`docs/protocol.md`, `remote/src/protocol.ts`).

## Verification
- `./gradlew :app:testDebugUnitTest :app:assembleDebug` green; 6 new `AppStoreTest` cases (interlude length, clamping, auto-next off, persistence round-trip, no rev bump, navigation).
- `pnpm -C remote build` green.
- Checked on the Android TV emulator: layout, D-pad between columns and past static rows, pickers/QR/author dialogs return focus to their row, toggles, persistence across restart, update check.
- Not checked with real playback: interlude length, auto-next off, 720p/1080p cap (unit-tested only).

Co-authored-by: nezumi <123229563+Nezumi-2711@users.noreply.github.com>
Reviewed-on: #12
Self-update: install via PackageInstaller and clean up installer files (#13)
All checks were successful
CI / build (push) Successful in 1m58s
b2e9e123f1
## Summary

Reworks the in-app self-update so that, after the user taps **Update**, the app downloads and installs the new version on its own where Android allows it, then removes the installer file and any leftovers.

- **Install via `PackageInstaller` session** instead of `ACTION_VIEW` + FileProvider. On Android 12+ it sets `USER_ACTION_NOT_REQUIRED`, so the update is silent once KaraTV is its own installer of record. The first update after an adb/file-manager sideload, and every update on Android ≤ 11, still shows the system confirmation.
- **Auto-install when safe**: runs only while the app is in the foreground and not in the middle of a song. After the user grants "install unknown apps", the install continues on resume, without reopening settings in a loop.
- **Cleanup**:
  - The APK is deleted as soon as it is written into the session.
  - `cache/updates` is cleared on app start and on `MY_PACKAGE_REPLACED`.
  - Leftover sessions are abandoned on start.
  - Partial downloads (`.apk.part`) are removed on failure.
- **Integrity**: the downloaded size is checked against the release asset `size`.
- **Fixes**:
  - Crash on API 24/25: `canRequestPackageInstalls()` and `ACTION_MANAGE_UNKNOWN_APP_SOURCES` are API 26+.
  - A release check can no longer overwrite a running download or install.
- **UI**:
  - New `Installing` state and chip.
  - The error dialog has a **Retry** button.
  - The "Khởi động lại" button now reads "Cài đặt".
- Removes the now-unused FileProvider and `res/xml/file_paths.xml`.

## Testing

- `./gradlew :app:compileDebugKotlin :app:testDebugUnitTest :app:lintDebug` pass; lint reports no NewApi findings.
- Manual run on the Android TV emulator (API 36) against a mock `releases/latest` server:
  - A newer version was detected.
  - The download verified the size, then the unknown-sources grant led to an auto install.
  - Cancel at the confirmation returned to "update available".
  - The retry installed 9.9.9 silently, with the installer of record now `com.karatv.app`.
  - `cache/updates` was removed afterwards.
- Not tested on a real device, or on Android ≤ 11 / API 24–25.

## Known limitations

- After a successful update the app is not reopened automatically. Android 10+ blocks background activity starts, and this was confirmed on the emulator, so the TV returns to the launcher.
- If the confirmation is needed while the app is in the background, the system blocks it. The chip stays on "Installing…" until the next app start, which then cleans up and allows a retry.

Co-authored-by: nezumi <123229563+Nezumi-2711@users.noreply.github.com>
Reviewed-on: #13
feat: add script for control the tv emulator
All checks were successful
CI / build (push) Successful in 2m0s
fb2e06d203
Replace app icon and TV banner with the new mic icon set (#14)
All checks were successful
CI / build (push) Successful in 2m21s
CI / build (pull_request) Successful in 4m49s
6039fff382
## Summary
- Replace the placeholder icon/banner with the new KaraTV mic icon set (orange mic on `#141415`).
- Adaptive launcher icon (`mipmap-anydpi-v26/ic_launcher.xml`): vector mic foreground, color background, monochrome layer for themed icons.
- Legacy `mipmap-*/ic_launcher.png` (48–192px) for API 24–25.
- TV banner is now a PNG (`drawable-mdpi` 320×180, `drawable-xhdpi` 640×360) since it contains text; old `drawable/banner.xml` removed.
- Manifest `android:icon` now points to `@mipmap/ic_launcher`.
- Remove the ERR_TOO_MANY_RETRIES troubleshooting hint from the phone-connect dialog.

## Testing
- `assembleDebug` builds; `aapt dump badging` shows the new icon and banner.
- Installed on the Android TV emulator: the Apps row shows the new banner (the launcher may need a restart to drop the cached old banner).

Co-authored-by: nezumi <123229563+Nezumi-2711@users.noreply.github.com>
Reviewed-on: #14
nezumi merged commit 4b00be0eb3 into main 2026-11-21 13:52:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nezumi/kara-tv-app!15
No description provided.