Repository navigation
Description
Context — On a cold start the passphrase screen shows first; a few seconds later, when the launch check finds a new version, the « Mise à jour disponible » dialog opens over it. Someone used to the application types the passphrase straight away and is cut off mid-typing by the dialog (the focus leaves the field). Reported on 1.2.1.
Change — While the passphrase screen is shown, no update dialog opens. The unlock card says, under its form, that a version is available, with an « Installer maintenant » button; the passphrase field keeps the focus and Enter still unlocks. Once the library is unlocked, the offer stays reachable from the About menu (its dot and its entry).
To do
-
update_prompt::showdraws nothing while the gate is shown (!state.gate.is_open()). - Gate card: one line under « Phrase oubliée ? » — « {{app}} {{version}} est disponible » and a quiet « Installer maintenant » button; nothing moves in the form when it appears (its room is the card's bottom).
- « Installer maintenant » from the gate: the same
Ask::Installas the dialog; the download progress is shown in that line; nothing is open, so leaving for the installer needs no closing. - A silenced update (
updateNotificationsoff, or the skipped version) shows no line, as it shows no dialog today. - After unlocking with the offer unanswered: no dialog; the About menu's dot and entry name the update (About menu: no update status until asked; an available update is named #1675).
Tests — kittest in gate/tests.rs with the FakeUpdater: the check answers while the gate is shown → no update-prompt, a gate-update line, the focus still in vault-passphrase; typing then Enter unlocks; « Installer maintenant » starts the download. kittest in app/update_prompt_tests.rs: with the library open the dialog still opens. No e2e scenario: the e2e build checks the real release feed, so an update cannot be set up there.
Technical analysis
Cause. ui/src/app.rs:117-120 asks the gate (state.gate.ask) and, on the same frame, starts the launch check state.updates.check(&backend, true): the check runs on the compute queue while the gate is on screen. When it answers, adopt_check sets Status::Available, so offered() is Some. titlebar::dialogs (titlebar/mod.rs:168) calls update_prompt::show every frame, over everything, with no regard to the gate: widgets::dialog opens a modal that takes the focus from PassphraseField. The gate's drawing (gate/draw.rs:15, show(ui, gate, view, language, actions)) knows nothing of updates.
Fix. In update_prompt::show, return early while the gate is not open. Give gate::show what it needs to draw the line: the offered version and the download progress (state.updates.offered(), progress(), is_busy()), passed as a small read-only value from the caller, and a gate Action::InstallUpdate mapped to Asked::Menu(Action::Update(Ask::Install)) where the gate's actions are applied. The line is drawn below submit (draw.rs:231), inside the card, so the field and the button keep their place; the card's height is measured each frame already (gate-height), so it re-centres once. Installing from the gate is safe: no library is open, the « last thing the process does » rule holds without closing anything.
Decided. After unlocking with the offer unanswered, no dialog opens: the user saw the line on the unlock screen and chose to unlock. The About menu's dot and its entry keep the update within reach (the release notes and « Ne plus me proposer » are in the dialog the entry reopens). The offer stays known, but no longer opens the dialog on its own: the status it is held in must tell « offered at the gate, not answered » from « to show », so that unlocking does not open it.
Risk. Low to medium: the focus order of the gate must not change (an e2e step types the passphrase in every scenario: 01_first_launch and all others go through vault-passphrase); check that the line does not take the focus when it appears.
Activity
Captures: 1.2.2 #1676, before and after
Captures: 1.2.2 #1676, the update line in amber
Captures: 1.2.2 #1676, amber under its own name
vmillet-dev commentedon Nov 27, 2026
Fixed by #1684, merged into
dev/1.2.2.