c6ad61448f0d42d89e3ccad2439820a0bbacf287
The apps list rebuilt its rows by writing into the maps held by the menu's items and itemOrder var properties. Writing into an object owned by a QML var property is not reliable: the same row object written into a plain JS object always lands, but written through the property it occasionally arrives with the key created and the value undefined. One write per rescan was lost, on a different app each time. A lost write left an id in itemOrder with no item behind it. The old purge only deleted app rows it could find in items, so the orphan survived the next merge, the add loop appended a second row for the same app, and the list grew by one -- permanently, and again on every later rescan. Touching a single desktop file fires around a dozen merges, because the entry model emits valuesChanged per insert and removal while it reconciles, so duplicates piled up quickly: nine YouTube rows on the reporting machine, and Alacritty doubled before that. The bookkeeping moves into MenuModel as two pure functions that build fresh maps for the caller to assign in one shot, so the fragile write disappears. They also make the merge self-healing rather than merely correct-when-nothing-is-lost: an id with no item is dropped instead of carried forward, and an id is listed once even when two desktop entries claim it -- so no single dropped write can compound into a duplicate row again. The bash-backed providers behind the font and power profile lists had the same latent bug and get the same treatment. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TJQJfHXXApUk6En8EZisHg
Omarchy
Omarchy is a beautiful, modern & opinionated Linux distribution by DHH.
Read more at omarchy.org.
License
Omarchy is released under the MIT License.
Languages
Shell
58.8%
QML
29.8%
JavaScript
4%
Python
3.1%
Go Template
2.3%
Other
2%