feat(slint): HiFi wizard usability — clickable checkbox rows, queue guardrail, test hint

- Checkboxes are now whole-row clickable (new CheckRow primitive, HTML <label>
  behavior): clicking the text toggles it, not just the box. Applied to the
  welcome accept + the three Configure progress checks.
- "Use my current queue" guards an empty queue: it checks get_all_queue_tracks
  and shows "Your queue is empty — add some tracks first, or press Play test."
  instead of sitting on a dead read-back.
- Welcome step gains a "What to test with" notice recommending one track of each
  bit-depth/sample-rate (16/44.1, 24/44.1, 24/96, 24/192) so users who bring
  their own queue exercise every rate.

cc
This commit is contained in:
vicrodh committed 2026-06-16 13:23:12 -06:00
1 parent f0deed2b44
commit bac0e8ca76
3 files changed
+81 -49

No files matched your search

+12
View File
@@ -516,6 +516,18 @@ pub fn end_test(window: &AppWindow) {
window.global::<DacWizardState>().set_test_playing(false);
}
/// Guardrail: "Use my current queue" with an empty queue — show a hint instead
/// of starting a read-back that would just sit on "Nothing playing".
pub fn queue_empty_notice(window: &AppWindow) {
let st = window.global::<DacWizardState>();
st.set_test_playing(false);
st.set_test_rate_matched(false);
st.set_test_negotiated_label("".into());
st.set_test_requested_label(
"Your queue is empty — add some tracks first, or press Play test.".into(),
);
}
/// Apply one poll: the rate QBZ requested vs the DAC's real negotiated rate (N6).
pub fn apply_poll(
window: &AppWindow,
+21 -4
View File
@@ -11491,11 +11491,28 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// tracks — the user plays whatever they want; the poll reads the rate.
let runtime = app_runtime.clone();
let weak = window.as_weak();
let handle = tokio_rt.handle().clone();
window.global::<DacWizardActions>().on_verify_own(move || {
if let Some(w) = weak.upgrade() {
dac_wizard::begin_test(&w);
}
let _ = runtime.core().resume();
let Some(w) = weak.upgrade() else {
return;
};
let runtime = runtime.clone();
let weak2 = w.as_weak();
handle.spawn(async move {
// Guardrail: don't start a read-back on an empty queue.
let (tracks, _) = runtime.core().get_all_queue_tracks().await;
let empty = tracks.is_empty();
if !empty {
let _ = runtime.core().resume();
}
let _ = weak2.upgrade_in_event_loop(move |w| {
if empty {
dac_wizard::queue_empty_notice(&w);
} else {
dac_wizard::begin_test(&w);
}
});
});
});
}
{