Skip to content

About menu: no update status until asked; an available update is named #1675

Done

Description

@vmillet-dev

Context — In the About menu, « Rechercher les mises à jour » shows « ✓ DevNotes est à jour » under it without having been clicked, and kept saying so on an installation that was not up to date. When an update is known, the entry looks struck through: a line crosses its label, and the next entry is drawn against it. Nothing in words says that an update is waiting: only an amber dot. Reported on 1.2.1, with captures.

Change — The entry says nothing until it is clicked; once clicked it says « Recherche… », then « ✓ DevNotes est à jour » or « ✕ Recherche impossible ». When an update is known, the entry reads « Une mise à jour est disponible » (with the version), drawn cleanly with its dot, and a click reopens the offer.

To do

  • The launch check (silent) leaves the menu's status empty: only a check asked from the menu writes « à jour » or « impossible ».
  • A status shown says what was found at that moment: the next opening of the menu starts empty again, or the status is cleared when the check is older than the menu's opening.
  • Known update (has_pending()): the entry's label becomes about.updateAvailable (« Une mise à jour est disponible : {{version}} »); a click reopens the known offer without a new network check.
  • The dots (trigger and entry) are painted without allocating room in the layout.

Tests — kittest in app/update_prompt_tests.rs (the FakeUpdater): after a silent launch check answering nothing, the menu has no about-check-status; after a click it has « à jour »; with an update known, the entry's label names it and its rectangle does not overlap the separator nor the next entry (about-whats-new); a click opens update-prompt. No e2e scenario: the e2e build checks the real release feed, so an update cannot be set up there.


Technical analysis

Cause — the status said unasked. ui/src/app.rs:120 runs state.updates.check(&backend, true) at launch. services/updates.rs check sets CheckState::Checking whatever silent is, and adopt_check sets CheckState::UpToDate on Ok(None) (line 218) whether the check was silent or not; silent only stops the error notification. The menu (titlebar/about_menu/mod.rs:144-157, check_entry) shows any state other than Idle. So a launch that found nothing writes « est à jour » under the entry for the whole session; nothing checks again unless the entry is clicked. An update published while the application stays open is never seen, and the menu still claims « à jour ». This is the likeliest path to the report; to be reproduced with the FakeUpdater (answer nothing at launch, then an update) before fixing.

Fix. Keep CheckState for an asked check alone: in check, set Checking only when !silent; in adopt_check, write UpToDate/Failed only when !silent. The prompt keeps relying on Status (the comment above CheckState already says the prompt must not depend on the check). Clear the status when the menu closes (about_menu's popup closing → an Ask::ClearCheck, or a frame stamp of when it was answered).

Cause — the struck entry. dot (about_menu/mod.rs:119-129) draws the amber dot at the row's top right, then ui.allocate_rect(rect, Sense::hover()) for its accessible node. In egui 0.37 allocate_rect moves the cursor (advance_cursor_after_rect: in a top-down layout cursor.min.y = rect.max.y + item_spacing.y, layout.rs:758). The dot is 6 px tall near the row's top, so the cursor goes back up into the row; super::separator (titlebar/mod.rs:282, a 7 px allocation with a line at its centre) is then laid out over the label: the « strike ». « Nouveautés » follows, against it. The trigger's dot in the title bar (line 62) has the same allocation, in a horizontal layout.

Fix. Paint the dot and give it its node without allocating: ui.interact(rect, id, Sense::hover()) (through widgets::region, which the project uses for this) instead of allocate_rect. With the entry's label naming the update, the dot's own label (about.updateWaiting) can stay on the title bar's trigger only.

Risk. Low: menu drawing and two states. The silent check still sets the offer (Status::Available) and the dot as today.

Activity

  1. added
    bug
    on Nov 27, 2026
  2. added a commit that references this issue on Nov 27, 2026
  3. vmillet-dev commented on Nov 27, 2026

    @vmillet-dev
    OwnerAuthor

    Fixed by #1683, merged into dev/1.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions