forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'worktree-agent-a01382798be1a504b'

Browse files at this commit

0563cbfec08046b75ca933b5b9909fd656d3ea9fAhmet Kaan GümüşParent: 8b8fd1e0501b2a
crates/app/src/export_ui.rsmodified+9 -4
@@ -47,7 +47,10 @@ pub(crate) fn sample_rate_choices(current: Option<u32>) -> Vec<ChoiceRow> {
4747 let mut rows = vec![(
4848 Choice::SampleRate(None),
4949 "Source".into(),
50- "the first audio source's own rate".into(),
50+ // A state word, the resolution list's rule: the six-word phrase this
51+ // row wore ran past `MENU_W` and was cut mid-word like the size
52+ // list's was. Nothing is resampled -- that is what the row means.
53+ "unchanged".into(),
5154 current.is_none(),
5255 )];
5356 rows.extend(SAMPLE_RATES.into_iter().map(|rate| {
@@ -338,9 +341,11 @@ pub(crate) fn resolution_choices(current: (u32, u32), native: (u32, u32)) -> Vec
338341 Choice::Size(w, h),
339342 format!("{h}p").into(),
340343 match (w, h) == native {
341- // Short enough to sit beside the label inside `MENU_W`:
342- // the longer phrase lost its last word to the truncation.
343- true => format!("{w}x{h} · the media's own"),
344+ // A state word, not prose (DESIGN §8): "· the media's own"
345+ // lost its last word to `MENU_W` on the row a user read
346+ // ("word cut"). `source` is the word the sample-rate list
347+ // already says the same fact in.
348+ true => format!("{w}x{h} source"),
344349 false => format!("{w}x{h}"),
345350 }
346351 .into(),
crates/app/src/tests/cards.rsmodified+43 -2
@@ -1393,9 +1393,10 @@ fn a_choice_list_offers_every_value_and_fits_the_smallest_window() {
13931393 assert_eq!(*picked, *size == (1280, 720));
13941394 }
13951395 // The media's own size says so: it is the one rung a person cannot read
1396- // off a number they chose.
1396+ // off a number they chose -- in the one word the sample-rate list says
1397+ // the same fact in, since prose gets cut by `MENU_W` (user: "word cut").
13971398 let (.., native_detail, _) = &rows[3];
1398- assert!(native_detail.contains("the media's own"), "{native_detail}");
1399+ assert!(native_detail.ends_with(" source"), "{native_detail}");
13991400 // A project at a size nobody listed still gets the whole list, with
14001401 // nothing marked rather than a wrong row marked.
14011402 assert!(
@@ -2093,3 +2094,43 @@ fn the_seat_probe_is_not_keyed_on_the_budget() {
20932094 "the export no longer writes at the budget on the row"
20942095 );
20952096 }
2097+
2098+/// DESIGN §8, the class behind the user's "word cut" (2026-09-09): a picker
2099+/// row's tail is a *state word* -- at most two -- because the plate is
2100+/// `MENU_W` wide and prose loses its last word to the truncation on exactly
2101+/// the row a reader is looking at (the resolution list's checked row read
2102+/// "3840x2160 · the medi…"). The same rule for the settings page's own row
2103+/// values: a value slot carries the state, never the door's noun elided to
2104+/// an ellipsis ("Subtitle font Font…", "Mix Tracks…").
2105+#[test]
2106+fn picker_row_tails_are_state_words_and_settings_values_carry_no_ellipsis() {
2107+ let lists = [
2108+ resolution_choices((1280, 720), (3840, 2160)),
2109+ pending_resolution_choices(Some(RESOLUTIONS[1])),
2110+ pending_fps_choices(Some(FRAME_RATES[0])),
2111+ sample_rate_choices(None),
2112+ ];
2113+ for (.., detail, _) in lists.iter().flatten() {
2114+ let words = detail.split_whitespace().count();
2115+ assert!(
2116+ words <= 2,
2117+ "picker row tail {detail:?} is {words} words -- `MENU_W` cuts prose"
2118+ );
2119+ assert!(
2120+ !detail.contains('\u{2026}') && !detail.contains('\u{b7}'),
2121+ "picker row tail {detail:?} carries prose punctuation"
2122+ );
2123+ }
2124+ // Code lines only: the comments above the two rows this fixed quote the
2125+ // strings the bug shipped as.
2126+ let settings = src_text("ui/settings_stance.rs");
2127+ for line in settings
2128+ .lines()
2129+ .filter(|l| !l.trim_start().starts_with("//"))
2130+ {
2131+ assert!(
2132+ !line.contains('\u{2026}'),
2133+ "a settings row value is elided with an ellipsis again: {line}"
2134+ );
2135+ }
2136+}
crates/app/src/ui/settings_stance.rsmodified+26 -9
@@ -373,14 +373,25 @@ fn project_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElemen
373373 None,
374374 content_ink,
375375 ))
376- .child(row(
377- "settings-mix",
378- "Mix",
379- "Tracks…",
380- "a fader per track and the limiter over the sum of them",
381- player,
382- cx.listener(|this, _: &ClickEvent, _, cx| this.open_mix(None, cx)),
383- ))
376+ // A door row's value is the state behind the door, never the door's
377+ // own noun: `Tracks…` read as a cut word and said nothing (user:
378+ // "word cut"). No project, no tracks -- the page's one empty state.
379+ .child({
380+ let (mix_val, mix_ink) = match player.mix_lanes().len() {
381+ 0 => ("\u{2014}".to_string(), INK4()),
382+ 1 => ("1 track".to_string(), INK1()),
383+ n => (format!("{n} tracks"), INK1()),
384+ };
385+ row_ink(
386+ "settings-mix",
387+ "Mix",
388+ mix_val,
389+ "a fader per track and the limiter over the sum of them",
390+ player,
391+ cx.listener(|this, _: &ClickEvent, _, cx| this.open_mix(None, cx)),
392+ mix_ink,
393+ )
394+ })
384395 }
385396
386397 /// EDITOR: this window's own decode/import policy and this person's own
@@ -431,10 +442,16 @@ fn editor_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement
431442 this.open_picker(Pick::Theme, event.position(), cx)
432443 }),
433444 ))
445+ // The family in force, said (user: "Subtitle font Font…" -- the
446+ // value slot carried the door's noun, elided, never the pick). With
447+ // nothing picked the window draws its own, which is one word.
434448 .child(row(
435449 "settings-subtitle-style",
436450 "Subtitle font",
437- "Font…",
451+ player
452+ .sub_family
453+ .clone()
454+ .unwrap_or_else(|| "default".to_string()),
438455 "the cue plate's own font and size -- kept in ~/.config/edith, never in a project",
439456 player,
440457 cx.listener(|this, _: &ClickEvent, _, cx| this.open_subtitle_style(cx)),