Commit Graph

36 Commits

Author SHA1 Message Date
Kingkor Roy Tirtho
aaa4d66db1 refactor(jam): move the room server to its own repository
The jam room server now lives in https://github.com/team-spotube/jam-server.
Remove jam-server/ and its deploy workflow, and point code comments, test
instructions, AGENTS.md and the self-hosting note (all locales) at the new
repository.
2026-10-31 19:01:44 +06:00
Kingkor Roy Tirtho
45a7758eb0 feat(jam): harden the room server, add device bans and friendly names
Security:
- Participants connect with a per-room key derived from a random per-install
  secret; others only see an id derived from it, so nobody can reconnect as
  someone else (including the host).
- "create" only works on a fresh code or for the room's own host, so empty
  rooms can't be taken over.
- Per-socket message and queue budgets disconnect clients that flood; the
  host throttles itself well under them.
- Bans also cover the device: a hashed digest of device traits combined with
  the network, stored only as an opaque per-room value. Earlier members are
  never caught by someone else's ban.
- Peer queue items and suggestions are sanitized (streaming tracks only, no
  URLs, https covers); suggestions are credited to the server-attested sender;
  local file paths go out as opaque ids. Names are cleaned server-side.
- Room codes and keys use a secure random source; the deploy workflow is
  read-only.

Names:
- Participants get a stable generated name ("Mellow Otter") per install, and
  can pick their own on the Jam screen or in Jam settings. The participant
  list marks "(you)".

Also translate the Jam strings into all locales and add tests for the above.
2026-10-31 18:14:45 +06:00
Kingkor Roy Tirtho
0a0b0c9374 feat(jam): replace MQTT with a Durable Object room server and synced playback
- Add jam-server/: a Cloudflare Worker with one Durable Object per room code.
  It tracks membership, host handoff and kicks/bans, keeps the queue for late
  joiners, routes guest commands to the host and serves the room clock.
- Sync playback: devices estimate the server clock, the host sends position
  anchors in server time, guests follow by nudging playback rate (seeking only
  when far off) and stream the host's audio source when they share a plugin.
- Seek, play/pause, skip and jump apply to the whole room.
- Recover from network loss instead of crashing: socket failures reconnect
  with backoff, silent sockets are detected, and an expired room is recreated
  by its host.
- Keep cost and battery low: anchors only on change (plus host drift and a
  60 s heartbeat), kept in memory rather than storage, free runtime keep-alives
  once a minute, rare clock re-syncs, and no polling while paused or buffering.
- Remove the MQTT broker settings and libraries.
- Add sync unit tests, client/session integration tests (JAM_TEST_URL) and a
  network-loss test, plus a deploy workflow for the server.
2026-10-31 16:26:41 +06:00
Kingkor Roy Tirtho
2aaa0db81e fix(broker): update default broker settings and improve connection error handling 2026-10-30 11:50:39 +06:00
Kingkor Roy Tirtho
2c1148a126 chore: remove devil's name 2026-10-30 10:33:11 +06:00
Kingkor Roy Tirtho
08892c2aa0 fix(downloads): respect download format/quality and never save manifests or video
- Downloads resolve streams with the user's download format/quality via a
  new StreamRequest instead of the streaming settings, and bypass the
  playback stream-URL cache in both directions
- Downloads only consider progressive streams; DASH/HLS manifests were
  previously saved as-is instead of audio
- NewPipe: map AAC "mp4a.40.x"/"m4a" to the advertised "aac"/"mp4" so real
  AAC streams can match (previously the hard-coded aac/mp4 manifests always
  won), report each stream's real delivery method, skip streams without a
  format or non-URL content
- Fail the download on non-2xx responses, on a range request answered with
  a full 200, and on video/* content, with localized reasons, instead of
  writing the response body to disk
- Save AAC as .m4a
- Tests for request overrides, manifest exclusion and cache isolation
2026-10-20 16:03:48 +06:00
Kingkor Roy Tirtho
d4961bb5ed feat: download diagnostics, live connect status, remote settings on devices screen
Downloads
- Show the real download folder: "Current folder: <path> (default)" in
  settings instead of the misleading "default music folder", and a
  "Saved to <path>" line on the Downloads screen
- Register finished downloads with Android's MediaStore (MediaScanner) so
  music players and the Files app see them immediately
- Add tagged logs across the download path to diagnose format/quality
  selection: raw NewPipe streams ([Streams]), every selection candidate
  with its rank key and fallback warnings ([Resolve]), and per-download
  enqueue prefs, resolved stream, HEAD/GET status + content type, segment
  responses and written vs expected bytes ([Download])

Connect status
- Mobile Home keeps its Devices / Group Jam / Support icons (Jam now uses
  the sound icon) and shows a slim banner only while remote-controlling a
  device or in a Jam ("Playing on krtx", "Hosting · 3 listeners")
- Sidebar Devices / Group Jam rows get a live dot and status line
- New ConnectStatusViewModel feeds both

Remote control settings
- Extract "Allow remote control" and "Device name" into shared
  remoteControlSettingCards, used by Playback settings and a new
  "This device" section on the Devices screen
2026-10-20 15:54:23 +06:00
Kingkor Roy Tirtho
b38a4f6963 feat(remote): redesign remote control and devices screens, fix connection issues
- Remove the unused "Enable Connect" setting and its strings
- Redesign RemoteControlScreen to match the expanded player: artwork sized
  to fit, side-by-side queue panel on wide screens, proper connecting /
  disconnected / error states, "Playing on <device>" subtitle
- Seek and volume sliders keep local drag state and only commit on release
  (volume throttled while dragging) instead of sending a command per frame
- Redesign DevicesScreen with the settings card components, a connected
  device card, error banner and empty state; ViewModels expose one UiState
- Fix tapping an already-connected device doing nothing; reopen its remote
  screen instead, and switch devices by disconnecting first
- Fix the controller getting stuck in Connecting after the host denies a
  request: Ktor never delivers Close frames to `incoming`, so detect the
  close reason after the receive loop ends
- Fix a UI freeze when leaving the devices screen on desktop: run discovery
  (and JmDNS's blocking close/resolve) on Dispatchers.IO
- Advertise the LAN address of the default-route interface on desktop;
  dns-sd-kt otherwise picks any site-local address, e.g. a Docker bridge
2026-10-20 15:11:10 +06:00
Kingkor Roy Tirtho
62c1fe7902 feat: enhance Android build configuration with stable/nightly flavors and update launcher icons 2026-10-16 21:34:44 +06:00
Kingkor Roy Tirtho
83115ea99a feat(plugin): add login prompt for metadata plugin access and implement authentication view model 2026-10-16 12:06:13 +06:00
Kingkor Roy Tirtho
c57e33fe0d feat(ui): replace IndeterminateProgress with new loading components and enhance dialog structures 2026-10-16 11:49:48 +06:00
Kingkor Roy Tirtho
daf54b74f4 feat(plugin): implement MetadataPluginGuard to manage plugin dependencies and user prompts 2026-10-16 09:29:08 +06:00
Kingkor Roy Tirtho
9f79505e1c feat(i18n): replace hardcoded strings with localized resources across multiple components 2026-10-15 14:07:56 +06:00
Kingkor Roy Tirtho
58dfa2de92 feat(library): add Library screen list mode beside grid mode, Local Track, Download screen, Local Library folders dialog visual improvement 2026-10-15 11:36:39 +06:00
Kingkor Roy Tirtho
cf9476ab08 feat(library): enhance library UI with new tab titles, filtering options, and improved state management 2026-10-14 21:52:24 +06:00
Kingkor Roy Tirtho
5b442a93a9 feat(jam): implement group jam functionality with UI components and state management 2026-10-14 20:39:54 +06:00
Kingkor Roy Tirtho
1ccd70a18c feat(search): enhance search functionality with recent search suggestions and improved UI components 2026-10-14 16:29:45 +06:00
Kingkor Roy Tirtho
d720467338 feat(support): implement support reminder dialog and donation options 2026-10-14 09:51:07 +06:00
Kingkor Roy Tirtho
8efcbd4af4 feat(player): add content descriptions for play, pause, and add to queue actions 2026-10-13 13:06:22 +06:00
Kingkor Roy Tirtho
76518a01a1 feat(onboarding): enhance welcome screen with structured guide steps and improved layout 2026-10-13 13:03:27 +06:00
Kingkor Roy Tirtho
caad76ba95 refactor: replace currentWindowAdaptiveInfo with currentWindowWidthBreakpoint for adaptive layouts 2026-10-11 21:08:25 +06:00
Kingkor Roy Tirtho
cfd472016e refactor: integrate millennium UI 2026-10-11 17:17:34 +06:00
Kingkor Roy Tirtho
963b360a81 feat(ui): new custom surface integration on all components 2026-10-09 14:51:30 +06:00
Kingkor Roy Tirtho
9f96b07ebd feat(ui): replace Scaffold with BaseScaffold for consistent surface theming across screens 2026-10-07 18:45:22 +06:00
Kingkor Roy Tirtho
fa9ad9981c feat(settings): add 'About' section and improve header visibility in settings sections 2026-10-07 14:07:09 +06:00
Kingkor Roy Tirtho
71d7649db6 feat(welcome): implement onboarding flow with multiple pages and donation options 2026-10-06 15:29:27 +06:00
Kingkor Roy Tirtho
4e2afeaea4 feat(update): refactor update checking mechanism and implement new dialog for app and plugin updates 2026-09-30 09:58:04 +06:00
Kingkor Roy Tirtho
a4d157e9c2 feat(jam-settings): implement JamSettings screen and view model for broker configuration 2026-09-25 16:44:48 +06:00
Kingkor Roy Tirtho
df3dd2ad88 feat(player-options): enhance options menu with localized strings and icons 2026-09-25 15:03:24 +06:00
Kingkor Roy Tirtho
a2b9f4178c feat(jam-session): integrate MQTT broker configuration and enhance jam session settings 2026-09-11 19:35:54 +06:00
Kingkor Roy Tirtho
d3a8548661 feat(devices): add device discovery and remote control features 2026-08-21 19:50:09 +06:00
Kingkor Roy Tirtho
ec672d5f84 feat(plugin_discovery): implement GitHub plugin discovery and add logo support in UI 2026-07-25 14:57:35 +06:00
Kingkor Roy Tirtho
3448e16ed2 feat: implement blacklist functionality for tracks and artists with UI updates 2026-07-22 16:23:02 +06:00
Kingkor Roy Tirtho
b22ab3d43e feat: enhance AdaptiveDialogBottomSheet with dismiss icon and improve plugin screen layout 2026-07-20 17:04:39 +06:00
Kingkor Roy Tirtho
c3852a1c32 feat: add adaptive dialog bottom sheet component and enhance plugin installation UI 2026-07-20 15:19:52 +06:00
Kingkor Roy Tirtho
0c426689cb feat: migration to Compose Multiplatform 2026-06-30 17:00:13 +06:00