From e1b4567e59e84522e159062090a9f8eeef3e8877 Mon Sep 17 00:00:00 2001 From: aiongg Date: Sun, 15 Nov 2026 04:46:09 +0000 Subject: [PATCH] top-w5: net change of 4 commits - top-w5: written by an agent - top-w5: review fixes (review-1.md) - top-w5: read_last_update doc follows the updater arm (review-1 item 2) - top-w5: the opening card's progress bar is named by the card's title (top run round) --- crates/ui-shell/src/shell/opening.rs | 72 ++++- crates/ui-shell/src/shell/opening/stories.rs | 30 ++ crates/ui-shell/src/shell/recent.rs | 20 +- crates/ui-shell/src/shell/start.rs | 281 ++++++++++++------- crates/ui-shell/src/shell/start/stories.rs | 116 ++++---- crates/ui-shell/tests/it/shell/mod.rs | 3 + crates/ui-shell/tests/it/shell/opening.rs | 51 ++++ crates/ui-shell/tests/it/shell/start.rs | 76 +++++ crates/update/src/updater.rs | 29 +- crates/update/src/updater/tests.rs | 32 +++ 10 files changed, 529 insertions(+), 181 deletions(-) create mode 100644 crates/ui-shell/src/shell/opening/stories.rs create mode 100644 crates/ui-shell/tests/it/shell/opening.rs create mode 100644 crates/ui-shell/tests/it/shell/start.rs diff --git a/crates/ui-shell/src/shell/opening.rs b/crates/ui-shell/src/shell/opening.rs index 0baab5bd3..412cc01e0 100644 --- a/crates/ui-shell/src/shell/opening.rs +++ b/crates/ui-shell/src/shell/opening.rs @@ -1,27 +1,37 @@ //! `OpeningCard`: the card shown in the document area while a file opens. -use crate::contract::Pattern; -use crate::runtime::env::Label; -use egui::{Response, Ui}; +use super::words::ShellWords; +use crate::buttons::Button; +use crate::contract::{Gap, Outcome, Pad, Pattern, Props as _, Show as _, ShowContainer as _, Sizing, clicked}; +use crate::display::{Elide, Progress, Shade, Text}; +use crate::layout::RowAlign; +use crate::layout_components::{Row, Stack}; +use crate::runtime::env::{Env, Label}; +use crate::style::{SurfaceKind, TypeRole}; +use egui::{Layout, Response, Ui, UiBuilder}; + +#[cfg(feature = "testing")] +mod stories; /// A centred card: "Opening {name}…" elided on one line with the full text on hover, the muted message, a progress bar /// (indeterminate without a fraction), the percentage at the start and Cancel at the end of the last row. Job UI /// only: the fraction and the cancel answer come from the app's engine job. +/// +/// The card takes the room it is shown in and sits at its centre; its height follows its content. Cancel reports +/// `cancelled` in the pass of the click only, so a second pass in the same frame, which gets no input, reports none. #[must_use = "show the card with `show`"] #[derive(Pattern)] pub struct OpeningCard { - #[allow(dead_code)] // P3(top-w5): tp.T31 name: Label, - #[allow(dead_code)] // P3(top-w5): tp.T31 message: Option