Commit Graph
887 Commits
Author SHA1 Message Date
zarzet 68dd11bf55 Merge branch 'link/l3a-client' into link/integration 2026-10-25 02:38:02 +07:00
zarzet 796b26ba56 fix(link): let the server derive starred artist ids from names
The app reported favorite artists as ids it computed with a looser
normalization than the catalog, so some never matched. getStarred now
sends artist names and the server maps them with its own rule; unstar
matches favorites by name as well.
2026-10-25 02:38:02 +07:00
zarzet 32fc942a04 feat(link): add the phone client for desktop discovery and pairing
Phones find Mornye on a computer over mDNS (bonsoir, _mornye._tcp),
pair with its 6-digit PIN and keep a live session with the chosen
desktop.

- Pinned HTTPS: first contact records the presented certificate and
  checks it against info and the mDNS fingerprint; later requests and
  the WebSocket accept only that SHA-256.
- Pairing posts the PIN proof, maps bad_proof, pairing_closed and 429
  to clear errors, saves a Subsonic API-key network connection, adds it
  to Library and scans it. Re-pairing replaces the key in place.
- LinkClientSession: Bearer JSON get/post with timeouts and
  LinkException mapping, WebSocket hello/welcome, backoff from 1 s
  doubling to 30 s, pause in the background, reconnect when discovery
  sees the desktop again, address updates when it moves.
- LinkClientController publishes the active session through
  linkActiveClientProvider and rescans on catalog.changed.
- Settings entry "Mornye on your computer" on Android and iOS with
  nearby and paired computers, PIN and manual address dialogs, forget,
  and local network permission, Wi-Fi and certificate warnings.
- iOS NSBonjourServices and the Android multicast permission.
2026-10-25 02:37:07 +07:00
zarzet 0b406d5f1f feat(link): sync collections and history between phone and desktop
registerLinkSyncHandlers answers the collections and history endpoints
and the Subsonic playlist, star, getStarred and scrobble ops on the
desktop, and announces changes through linkCollectionsChangedHookProvider.
linkSyncRunnerProvider keeps the phone in sync on connect, on
collections.changed and after local edits, with per-server cursors.
2026-10-25 02:34:45 +07:00
zarzet 6cbfcf8248 feat(link): track collection and listening changes for sync
Collections schema v3 adds link_sync_state and link_sync_changes with
SQLite triggers on every collection table, so Dart, native publication
and restore writes are all recorded, one coalesced row per key with
tombstones. Existing rows are seeded on upgrade. Native jobs keep
reading and staging v2 copies of the collection tables.

Listening statistics v2 adds per-author running totals with a stable
(origin, day, track key) id. Stores page changes by cursor and apply
peer changes by last writer wins without echoing them as local.
2026-10-25 02:34:45 +07:00
zarzet f20dcf434a fix(settings): keep loading when retired credential cleanup fails
An invalidated keystore made reading or deleting the retired secret
throw and block settings from loading. The cleanup now logs the error
and continues without touching the other stored credentials.
2026-10-25 01:37:22 +07:00
zarzet 824bff1072 feat(player): shuffle downloads and scanned songs from the Library
Library shuffle pages through the queue Library query, so it plays
downloads as well as enabled scanned sources. It starts on a random
song with shuffle on and keeps the Library order underneath, so
turning shuffle off returns to it. The unused getAll query is gone.
2026-10-25 01:37:22 +07:00
zarzet 2ecd433b3f fix(player): reshuffle each repeat-all pass in shuffle mode
When a shuffled queue wraps under repeat all, the next pass opens with
a random queued song other than the one that just finished and plays
in a new order, instead of looping the same order. AutoMix into the
wrap prepares that opener and starts the reshuffled pass.
2026-10-25 01:37:22 +07:00
zarzet 1b7bcfd92a feat(search): group sort and view tools as on Library pages
The Library toolbar's connected button group moves to a shared
ToolButtonGroup, and Material search results use it for Sort and the
list or grid tool. Mornye keeps its text Sort and icon buttons.
2026-10-25 00:55:18 +07:00
zarzet 92a41641b7 fix(ui): keep page titles clear of the back button
Desktop and short landscape windows shortened the page header, so the
large title ran into the back button. Pages with a back button keep the
full 120dp header; tab roots keep the shorter one.
2026-10-25 00:26:10 +07:00
zarzet a985ea0e87 feat(desktop): expand the Material rail and list playlists in it
Wide windows now open with the rail expanded. A menu button on top and
the sidebar shortcut toggle it, and the choice is kept across launches.
Collapsed, the rail shows icons alone, named by tooltips. Expanded, its
pills span the rail, and a Playlists section (All Playlists and the
user's playlists) fills the space under the destinations. Library
returns to the Library root while a playlist is open.
2026-10-25 00:26:10 +07:00
zarzet 1158d0881b feat(player): group Material shuffle and repeat and start-align the title
The Material phone player moves shuffle and repeat out of the transport
into a connected two-segment group in the footer, between the lyrics
toggle and the output button. The selected segment fills its own shape
with primaryContainer, and the pressed one widens. Without them the
transport spans the timeline. The title, artist and lyrics now start at
the leading edge, as in Mornye; a duet's second voice keeps the end.

Selected mode buttons take the content colour of their fill, so the icon
stays legible on light neutral cover schemes.
2026-10-25 00:26:10 +07:00
zarzet 1b348511e3 fix(library): keep playlist songs visible in Songs and Singles
Playlist membership no longer removes tracks from library pages while their counts still include them. Keep the cached page content independent of playlist membership.

Verified with 43 library tests covering both styles, mobile and desktop layouts, list and grid views, and switching from Mornye to Material. Related to #726.
2026-10-25 00:04:21 +07:00
zarzet c489960b44 feat(player): let the Now Playing menu hide the volume slider
The phone Now Playing menu gains Hide volume and Show volume in both
styles, saved as the playerShowVolume setting. Mornye drops the slider in
portrait and landscape and moves the transport into its place; Material
keeps the gap above the footer. Desktop keeps its volume controls.
2026-10-24 23:10:27 +07:00
zarzet 29ded7e46e perf(preview): resolve extension previews when they play
Extensions that require the new deferredPreview runtime feature return
mornye-preview:<extension>/<track> links instead of a sample URL. The
preview player resolves such a link through the extension's
resolvePreview function when the preview starts, so a search no longer
waits for one sample lookup per track.
2026-10-24 11:35:08 +07:00
zarzet 3fba270258 feat(search): keep the result rows by default and offer the grid as a view
Wide screens now open search results as the phone rows, as before the
cover layout landed. A list or grid button after Sort, like the Library's
view button, switches to the cover grids and shelves, and the choice is
kept in settings (searchViewMode). Phones never show the button.
2026-10-24 11:24:38 +07:00
zarzet 6eaffa5942 test(search): cover the wide result layouts and pin the phone rows
The narrow suite compares what the Search tab paints on phones, a
landscape phone, a portrait tablet and a narrow desktop window, in both
styles, against fingerprints recorded on the previous layout. The wide
suite covers the cover grid (tap, cover saving, sort, keys, RTL), the
All view songs and shelves with their Show all controls, the desktop
song table activating like a phone row, and skeleton geometry.
2026-10-24 10:36:50 +07:00
zarzet 05b6fa33e0 fix(stats): credit collaborators individually in listening history 2026-10-24 10:30:25 +07:00
zarzet 4bdd22d2e8 fix(android): preserve audio routing during player initialization
Preserve the system audio mode and speakerphone route when only player settings change. Apply explicit global routing changes using the incoming context instead of the previous defaults.

Verified with three native routing regression tests and 34 Dart player tests. The Android build and audioplayers lint checks pass. Related to #721.
2026-10-24 10:30:12 +07:00
zarzet 44cbb57b30 refactor: import moved files directly and remove the re-export shims
Eight one-line re-export files remained from an earlier move into controllers, models and providers. Every import now points at the real file, so the shims are deleted.
2026-10-24 03:27:23 +07:00
zarzet a155dc5c80 perf(shell): read the keyboard inset without a dependency on back press
The back handler read the insets through MediaQuery.viewInsetsOf on the
shell context, so the first back press at a tab root made keyboard frames
rebuild the shell again. It now shares the scroll observer's lookup.
2026-10-23 23:52:25 +07:00
zarzet f4cc5a6131 perf(shell): stop rebuilding the shell on every keyboard frame
The shell read the view insets in build, so each keyboard animation frame
rebuilt the tab navigators and the bottom bar and re-ran the service setup
in didChangeDependencies, including a method-channel call. The insets are
now read by the bottom bar and the scroll observer, and the setup reruns
only when the localizations or the locale change.
2026-10-23 23:52:25 +07:00
zarzet 9a4fd4ccb7 perf(library): rebuild only the toolbar title when local collections flip it
The downloaded album, local album and library folder pages now hand the
mixin's title notifier to their header, so crossing the collapse threshold
no longer rebuilds the whole page mid-scroll. No importer of the screens
re-export of the mixin remains, so it is removed.
2026-10-23 23:31:31 +07:00
zarzet 61be03eb70 test(settings): keep a page test for the choice sheets
The migration comparison test copied the old dialogs and sheets and pinned
nothing about the pages once merged. A shorter test opens the four choice
sheets from the library and lyrics pages and checks their options, icons,
selection and the saved setting in both styles.
2026-10-23 23:22:20 +07:00
zarzet 0a53c78dda test(settings): pump the cache page and check its rows
The rows now come from one builder; the test pins each row's icon, title,
size line and divider and the clear confirmation, and passes on the old
page too.
2026-10-23 23:22:20 +07:00
zarzet f8c56b1b36 test(settings): compare the migrated dialogs and sheets with the old ones
Each confirm dialog and choice sheet the settings pages used to write by
hand is rebuilt with its old flags and checked against the shared helper
call, in both styles.
2026-10-23 23:22:20 +07:00
zarzet b9358b8158 perf(mornye): resolve the cover colour when the mini player changes track
The Mornye full player shades itself from the cover's source colour, which
it only started resolving inside its opening slide. Starting the same job
when the mini player shows a track lets the player open on its final colour.
2026-10-23 23:22:10 +07:00
zarzet 6920d4b8c6 perf(material): move the mini player wave on the 30 Hz decorative clock
The package's wavy indicator derives its phase from a ticker that asks for a
frame on every display refresh while music plays. Painting the same indicator
from a DecorativePhase keeps its look and stops it while paused, hidden or in
the background.
2026-10-23 23:22:10 +07:00
zarzet 22276c3593 perf(mornye): stop the mini player marquee after two passes on liquid glass
Every marquee frame re-filters the glass chrome around the mini player, so
an overflowing title kept liquid devices drawing for the whole session. The
liquid level now rests after the same two passes as frosted and flat.
2026-10-23 23:22:10 +07:00
zarzet cbe0f64177 test(player): check the shared motion clock in now playing rows
With the 30 Hz clock no frame is pending between ticks, so frame scheduling no
longer shows whether the glyph moves. The tests now check whether the shared
decorative clock is running.
2026-10-23 23:22:02 +07:00
zarzet 197cc2a1a7 perf(player): hold decorative motion while the app draws no frames
A vsync ticker never advanced in the background, but the 30 Hz timer kept
waking the UI isolate while music played with the app hidden. The shared
clock now runs only while frames are enabled and resumes from the held phase.
2026-10-23 23:22:02 +07:00
zarzet 3686095ad8 perf(material): cache the full-screen cover blur at quarter resolution
The opt-in full-screen cover style re-ran a sigma 48 blur over the whole
screen on every frame while the seek wave moved. The surface, blurred cover
and tint are now drawn once per cover, size and surface colour into a
quarter-resolution image with the sigma scaled to match.
2026-10-23 23:22:02 +07:00
zarzet 8985d7fb45 perf(player): cap decorative playback motion at 30 Hz
The current-row equalizer and the Material seek wave ticked every vsync for
the whole listening session, forcing full-scene rasterization at the display
rate. Both now advance from one shared 30 Hz phase clock that runs only while
a phase is running, with the same waves, loop lengths and pause rules.
2026-10-23 23:22:02 +07:00
zarzet 60913592be fix(desktop): show a short profile label in the sidebar
Without a profile name the sidebar account row showed "Set up your
profile", which the narrow sidebar cut off mid-word in longer languages:
Russian read as "Настройте сво…", which a user took for an unknown
abbreviation. The row now shows the short Profile title, which fits in
every language, while screen readers still hear the full invitation.
2026-10-23 23:21:55 +07:00
zarzet 911890a39c refactor(dialogs): resolve the error confirm color inside the dialog
The duplicate review and extension uninstall dialogs read the error color
from the dialog's own theme, so it followed a theme change while open.
errorConfirm keeps that, and the one-time migration test is dropped.
2026-10-23 23:14:57 +07:00
zarzet ba7be88c88 refactor(playback): share the library queue playback path
playLocalLibraryQueue and playHistoryQueue ran the same filter, start index
and player-mode branch; they now go through playMediaQueue, which makes
MusicPlayerController.playLocal and playHistory unused. playLocalPath also
loses its never-passed track parameter.
2026-10-23 23:14:57 +07:00
zarzet 7f323e88b1 refactor(library): move confirm dialogs to showAppConfirmDialog
Thirteen hand-written cancel/confirm dialogs in the batch actions, track
metadata, setup, statistics, extension and queue selection code now use the
shared helper with the same flags and styles. Every caller only acted on a
true result, so the helper's false-on-dismiss keeps their behavior.
2026-10-23 23:14:57 +07:00
zarzet 87ea8948c6 fix(repo): keep the store button beside the text when the title fits
Store rows moved their button under the description whenever the text
column was under 360 logical pixels, which put it below on every phone.
The row now measures the widest store button in the current language
and text size and keeps it beside the text unless it would leave the
title under 140 logical pixels. English phones get the side-by-side
layout back, while long labels such as Russian still stack (issue #694).
Rows and the loading skeleton share the width, so a list lays out alike.
2026-10-23 23:14:38 +07:00
zarzet 32bf54d6ff fix(library): keep current row text readable on cover fills
Screens colored a row's subtitle and track number from the app scheme,
outside the row, so the current track's artwork fill could hide them: a
black and white cover fills the row with a light container in dark
themes, where onSurfaceVariant nearly vanishes. TrackCard now gives
uncolored leading and subtitle text the row's supporting color, which
follows a filled row's content color, and re-roots the trailing
controls' content roles onto the fill. The library, album, playlist,
folder and search rows leave their text uncolored or read it inside the
row; badges keep their own surfaces.
2026-10-23 23:14:38 +07:00
zarzet 5d8c22a452 chore(services): drop write-only result and config fields
Duplicate entries, donation config, spectrogram, audio route, cover save,
share and redownload results carried fields that nothing reads; the
duplicate query no longer selects the unused album name.
2026-10-23 23:08:48 +07:00
zarzet a6db7fe878 chore(services): remove unused service members and write-only fields
UpdateInfo.publishedAt/isPrerelease, UpdateChecker.currentVersion,
BackupBundle.isEmpty, LocalLibraryItem.matchKey and two unused desktop
debug setters are never read.
2026-10-23 23:08:48 +07:00
zarzet 671b712485 chore(providers): remove unused provider members
MusicPlayerController.play/pause/stop, PreviewPlayerState.progress, the
manual extension cleanup, setUseExtensionProviders and the repo store's
unused category list, clearError and write-only fields have no caller.
2026-10-23 23:08:48 +07:00
zarzet 24c8b76215 refactor(search): loop the collection result sections
The artist, album and playlist sections and their missing-source guards
differed only in data, so one loop and one guard helper replace the copies.
2026-10-23 23:00:46 +07:00
zarzet 2f6e19eb57 perf(mornye): skip the backdrop pass for the extension overview glass
The overview card scrolls over the plain page background, where sampling
the backdrop only filters a flat color.
2026-10-23 23:00:46 +07:00
zarzet 0be275a3b1 chore: remove unread extension manifest model fields
The health check, hook, setting and track matching fields were parsed from
backend JSON but never read, and quality options only need a settings count.
2026-10-23 23:00:46 +07:00
zarzet 7a92132798 perf(mornye): fade full-bleed artwork without a shader mask
The ShaderMask rendered the artwork offscreen on every raster frame, at video
rate for motion artwork. Painting the animated background gradient over the
artwork with the inverse fade as alpha composites the same pixels within
8-bit rounding; only the tilted gradient of the lyrics transition still
uses a small layer.
2026-10-23 22:55:15 +07:00
zarzet c7503d9f0f perf(mornye): skip the backdrop read on plain-page glass
The Library search fields, the Install extension panel and the band count and
theme mode pickers sit on a flat page or an opaque group card, so filtering
that backdrop costs a read for an identical result. They now keep the tint and
rim like the Home and Settings fields.
2026-10-23 22:52:33 +07:00
zarzet a29a5179c4 refactor(mornye): drop the MornyeGlass default constructor
Its last app callers went with the dead library chip row; the remaining test
callers use MornyeGlass.navigation, whose defaults match.
2026-10-23 22:52:33 +07:00
zarzet 4707feeaa3 refactor(library): share the collection selection bar toggle
Album, playlist and artist pages each rebuilt the same select all toggle
around SelectionBottomBar; SelectionModeMixin.buildSelectionBar now does it
once. The Library selection bar's mobile delete reuses
DestructiveSelectionButton with its own label.
2026-10-23 22:49:09 +07:00
zarzet 04277f40bd perf(pages): rebuild only the toolbar title when it flips
The collapsing title flip used setState, rebuilding the whole album,
playlist, artist or track metadata page mid-scroll. The mixin now keeps the
flag in a ValueNotifier that these headers listen to; screens that still read
the bool keep the page rebuild.
2026-10-23 22:49:09 +07:00