Show what has actually been installed

Automatic updates leave no other trace. The Flatpak that sat here as "1 update
available" installed itself at 00:14 this morning and nothing on the machine
would have said so.

Both sources are asked in their own machine-readable form and merged on time, so
the answer reads as one history rather than two lists to interleave by eye.

Two parsing traps worth recording next to the code. flatpak's --json prints
timestamps as "Aug 20 08:07:46" with no year in them, so the year is inferred
and a date that would land in the future is read as last year's. And dnf5's
start_time is epoch UTC while its own history table prints that same value as
though it were local -- checked against rpm, and the local rendering here is the
correct one.

The contract asserts entries are newest first, that none is dated in the future,
and that both sources parse; it was verified to fail by breaking the year
inference so every flatpak entry landed tomorrow.

Loaded on demand rather than with the page, because it reads both full
transaction logs.

Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
This commit is contained in:
Gabriel Brown
2026-08-20 11:30:31 -04:00
parent de45f205ad
commit 4cbab01ae2
4 changed files with 216 additions and 0 deletions
@@ -266,4 +266,45 @@ SettingsPage {
divider: false
}
}
// Worth showing because automatic updates leave no other trace. Something
// that installed itself overnight is invisible until you look here.
SettingsCard {
title: "Recently installed"
subtitle: Updates.historyLoaded
? "Packages and applications, newest first, from both sources at once."
: "Asks dnf and flatpak for their transaction logs."
ActionRow {
visible: !Updates.historyLoaded
label: "Show what has been installed"
detail: "Not loaded with the page: it reads the whole history from both sources"
action: Updates.loadingHistory ? "Reading…" : "Show"
enabled: !Updates.loadingHistory
divider: false
onTriggered: Updates.loadHistory()
}
Repeater {
model: Updates.history
delegate: TextRow {
required property var modelData
required property int index
width: parent.width
label: String(modelData.summary ?? "")
detail: Updates.agoText(Number(modelData.at ?? 0))
value: Updates.describeHistory(modelData)
divider: index < Updates.history.length - 1
}
}
TextRow {
visible: Updates.historyLoaded && Updates.history.length === 0
label: "Nothing recorded"
detail: "Neither dnf nor flatpak has a transaction history here."
value: ""
divider: false
}
}
}