Review of "Battery Session Timer" version 1

Details Page Preview

Battery session timer with record saving for GNOME Shell

Extension Homepage
https://github.com/Gluk41/battery-session-timer

No comments.

FAQ

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental)

Shexli did not find any issues.

All Versions

Version Status
1 Unreviewed

Previous Reviews on this Version

Gluk41 posted a review
New submission, version 1. This supersedes the pending submission battery-session-timer@local (v18), which I have withdrawn — same code base, only the UUID changed to a domain-based one. Please review this one and ignore/close the old entry. Since v18: - The session record is now actually persisted to disk (was memory-only and lost on restart). - Record reset survives restart: a `recordSuppressed` flag is stored in session.json, so the resume logic no longer restores the reset value. - Fewer disk writes: state saved on transitions and throttled (session.json ≤1 write / 15 s, record ≤1 write / 30 s, serialized queue); previously session.json was written every second. - Session end is detected on AC power too (charge growth); the check used to require onBattery and never fired on AC. - Active panel position is marked with PopupMenu.Ornament.CHECK. - Duration units are localized ("1ч 30м" / "1h 30m"). - "UPower unavailable" state is reachable: loading has a 5 s timeout. - Pending indicator creation (before-tray) cancelled in destroyIndicator(); async init guarded against enable/disable race. - Constants (PANEL_POSITIONS, PANEL_PLACEMENT) moved to one module; duplicated validators removed. Verification: - GNOME Shell 50.1 (Wayland): install, enable, 5× disable/enable cycles, no exceptions; session restored after re-login. - All I/O asynchronous (Gio *_async); no sync file access, no console.log, no Gtk/Lang/Mainloop, no setTimeout/setInterval; disable() is synchronous. - 25 unit tests for the tracker logic pass. - UPower and logind used read-only over the system bus; no new permissions. --- Новая заявка, версия 1. Заменяет непроверенную заявку battery-session-timer@local (v18), которую я отозвал: код тот же, изменён только UUID на доменный. Прошу проверять эту заявку, старую закрыть.