mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
perf(linux): WebKit probe, throttled progress IPC, snapshot playback UI (#452)
* feat(linux): optional native GDK for Nix gdk-session Introduce PSYSONIC_ALLOW_NATIVE_GDK so main skips the default GDK_BACKEND=x11 pin when the Nix gdk-session wrapper sets the flag. Remove GDK_BACKEND from the npm tauri:dev script so it does not override nix develop defaults. * fix(ui): portal server switch menu above sidebar Main column stacks below the sidebar (layout z-index), so an in-tree dropdown could never win over the left nav. Render the menu via createPortal to document.body with fixed coordinates, matching the library scope picker. * feat(perf): add mainstage probe controls and cut WebKit repaint load Add a dedicated performance probe surface for mainstage/home toggles and wire Linux CPU diagnostics to isolate expensive UI paths. Tune waveform drawing and Home artwork clipping/windowing so visible content loads immediately while reducing WebKit compositor pressure during playback. * fix(perf): stop hero rotation when section is off-screen Gate hero auto-rotation and backdrop crossfade by real viewport visibility using the actual scrolling ancestor. This prevents periodic 10-second CPU spikes from hidden hero updates while preserving normal behavior when the hero is visible. * fix(perf): isolate player progress updates from mainstage diagnostics Add probe toggles for PlayerBar waveform and live progress UI updates to confirm playback progress churn as the main CPU driver. Restore Home artwork quality defaults and keep visual-degradation modes opt-in via debug flags only. * fix(hero): resume background and autoplay after viewport return Re-check hero visibility on focus/visibility changes and add a short recovery poll while off-screen so missed scroll/RAF events cannot leave hero animation paused. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(perf): decouple playback progress from mainstage compositing pressure Throttle audio progress delivery and route live seekbar timing through a lightweight progress channel to cut focus-time WebKit CPU spikes. Add focused diagnostics in Performance Probe and restore hero/waveform behavior so visuals remain stable while profiling. * fix(debug): open performance probe with Ctrl+Shift+D Replace logo-triggered opening with a keyboard shortcut and keep logo purely decorative to avoid accidental probe activation. * docs(changelog): document experiment/performance probe and playback work Add an [Unreleased] section for the performance probe, throttled audio progress IPC, snapshot-based live UI updates, WaveformSeek scheduling over the same canvas bar renderer, Hero/Home rail fixes, and Linux/Nix GDK dev ergonomics. * perf(linux): add WebKit probe, throttle progress IPC, snapshot playback UI Ship Performance Probe (Ctrl+Shift+D), Rust-throttled audio:progress, a playback progress snapshot channel with coarse Zustand timeline commits, Linux /proc CPU readout for the probe, Hero and Home rail artwork fixes, Tracks SongRail windowing parity, MPRIS cleanup, gated perf counters, and WaveformSeek paused-seek correctness. Documented in CHANGELOG for PR #452. * docs(changelog): fold perf work into 1.45.0 and refresh date Drop the separate 1.45.1 heading; keep PR #452 notes under 1.45.0 Added and set the section date to 2026-05-04. Restore the safety preface before the versioned sections. * docs(changelog): order 1.45.0 Added entries by PR number Sort the 1.45.0 release notes so subsections follow ascending PR id (390 through 452), with PR #452 last. --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -414,6 +414,12 @@
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
/* Horizontal rails can hold many off-screen cards; skip their paint/layout until visible. */
|
||||
.album-grid .album-card {
|
||||
content-visibility: auto;
|
||||
contain-intrinsic-size: 0 240px;
|
||||
}
|
||||
|
||||
.album-card-more {
|
||||
flex: 0 0 clamp(140px, 15vw, 180px);
|
||||
display: flex;
|
||||
@@ -2298,6 +2304,14 @@ html[data-track-previews-randommix="off"] [data-preview-loc="randomMix"] .pl
|
||||
animation: fadeIn 150ms ease both;
|
||||
}
|
||||
|
||||
/* Perf probe must not blur/composite the whole app while profiling. */
|
||||
.modal-overlay--perf-probe {
|
||||
backdrop-filter: none !important;
|
||||
-webkit-backdrop-filter: none !important;
|
||||
background: rgba(17, 17, 27, 0.96);
|
||||
animation: none;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: var(--ctp-surface0);
|
||||
border: 1px solid var(--border);
|
||||
@@ -2338,6 +2352,99 @@ html[data-track-previews-randommix="off"] [data-preview-loc="randomMix"] .pl
|
||||
font-family: var(--font-display);
|
||||
}
|
||||
|
||||
.sidebar-perf-modal {
|
||||
max-width: 560px;
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__hint {
|
||||
margin: 0 0 12px;
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 0;
|
||||
font-size: 13px;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__item input[type="checkbox"] {
|
||||
accent-color: var(--accent);
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__phase {
|
||||
margin-top: 10px;
|
||||
border: 1px solid color-mix(in srgb, var(--text-muted) 22%, transparent);
|
||||
border-radius: 10px;
|
||||
padding: 8px 10px 10px;
|
||||
background: color-mix(in srgb, var(--bg-card, var(--ctp-base)) 78%, transparent);
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__phase--nested {
|
||||
margin-left: 10px;
|
||||
margin-right: 2px;
|
||||
padding-top: 6px;
|
||||
background: color-mix(in srgb, var(--bg-card, var(--ctp-base)) 68%, transparent);
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__phase-title {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
user-select: none;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__phase-title::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__cpu {
|
||||
margin: 0 0 10px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid color-mix(in srgb, var(--text-muted) 22%, transparent);
|
||||
border-radius: 10px;
|
||||
background: color-mix(in srgb, var(--bg-card, var(--ctp-base)) 80%, transparent);
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__cpu-title {
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__cpu-row {
|
||||
font-size: 13px;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__subhead {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 2px;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.sidebar-perf-modal__actions {
|
||||
margin-top: 14px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* ─ Playback delay (sleep / delayed start) modal ─ */
|
||||
.playback-delay-modal {
|
||||
max-height: min(85vh, 560px);
|
||||
@@ -6019,6 +6126,7 @@ html.no-compositing .fs-seekbar-played {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Server switch menu is portaled to body (ConnectionIndicator); rules kept for any inline-less use. */
|
||||
.connection-indicator-dropdown-panel {
|
||||
position: absolute;
|
||||
top: calc(100% + 6px);
|
||||
@@ -11129,6 +11237,78 @@ html[data-app-blurred="true"] .spin {
|
||||
animation-play-state: paused !important;
|
||||
}
|
||||
|
||||
html[data-perf-disable-blur="true"] *,
|
||||
html[data-perf-disable-blur="true"] *::before,
|
||||
html[data-perf-disable-blur="true"] *::after {
|
||||
backdrop-filter: none !important;
|
||||
-webkit-backdrop-filter: none !important;
|
||||
}
|
||||
|
||||
html[data-perf-disable-animations="true"] *,
|
||||
html[data-perf-disable-animations="true"] *::before,
|
||||
html[data-perf-disable-animations="true"] *::after {
|
||||
animation: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
html[data-perf-disable-overlay-scroll="true"] .overlay-scroll__rail {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
html[data-perf-disable-mainstage-header="true"] .page-sticky-header,
|
||||
html[data-perf-disable-mainstage-header="true"] .tracks-header {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Home artwork diagnostics: keep images, strip expensive card compositing effects. */
|
||||
.home-lite-artwork .album-card,
|
||||
.home-lite-artwork .song-card {
|
||||
box-shadow: inset 0 0 0 1px var(--border-subtle) !important;
|
||||
transition: none !important;
|
||||
transform: none !important;
|
||||
contain: layout paint;
|
||||
}
|
||||
|
||||
.home-lite-artwork .album-card:hover,
|
||||
.home-lite-artwork .song-card:hover {
|
||||
transform: none !important;
|
||||
box-shadow: inset 0 0 0 1px var(--border-subtle) !important;
|
||||
}
|
||||
|
||||
.home-lite-artwork .album-card-cover img,
|
||||
.home-lite-artwork .song-card-cover img {
|
||||
transition: none !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
.home-lite-artwork .album-card-play-overlay,
|
||||
.home-lite-artwork .song-card-play-overlay {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.home-lite-artwork .album-row-section,
|
||||
.home-lite-artwork .song-row-section {
|
||||
content-visibility: auto;
|
||||
contain-intrinsic-size: 0 340px;
|
||||
}
|
||||
|
||||
/* Home artwork diagnostic mode: keep images, remove rounded clipping/masks. */
|
||||
html[data-perf-disable-home-artwork-clip="true"] .home-lite-artwork .album-card,
|
||||
html[data-perf-disable-home-artwork-clip="true"] .home-lite-artwork .song-card,
|
||||
html[data-perf-disable-home-artwork-clip="true"] .home-lite-artwork .album-card-cover,
|
||||
html[data-perf-disable-home-artwork-clip="true"] .home-lite-artwork .song-card-cover,
|
||||
html[data-perf-disable-home-artwork-clip="true"] .home-lite-artwork .album-card-cover img,
|
||||
html[data-perf-disable-home-artwork-clip="true"] .home-lite-artwork .song-card-cover img,
|
||||
.home-flat-artwork-clip.home-lite-artwork .album-card,
|
||||
.home-flat-artwork-clip.home-lite-artwork .song-card,
|
||||
.home-flat-artwork-clip.home-lite-artwork .album-card-cover,
|
||||
.home-flat-artwork-clip.home-lite-artwork .song-card-cover,
|
||||
.home-flat-artwork-clip.home-lite-artwork .album-card-cover img,
|
||||
.home-flat-artwork-clip.home-lite-artwork .song-card-cover img {
|
||||
border-radius: 0 !important;
|
||||
clip-path: none !important;
|
||||
}
|
||||
|
||||
/* ── Now Playing Info panel ──────────────────────────────────────────────── */
|
||||
.np-info {
|
||||
flex: 1;
|
||||
|
||||
Reference in New Issue
Block a user