Review of "Tracker" version 19

Details Page Preview

Simple time tracking extension for Gnome 45-50. - Start/Pause with a single click - Workspace-based tracking: optionally associate timers with specific workspaces to automatically start/pause them upon switching - Window-based tracking: optionally associate timers with specific windows titles to automatically start/pause on focus change - Screen locking and sessions: automatically pauses all active timers on screen locking and resumes them on unlocking - Persistent storage: timers are automatically saved and restored between sessions - Automatic backup: automatically export timers to CSV at configurable intervals - Export current timers to CSV manually - Reset individual timers or all of them at once - Selection: choose specific timers or display the total time - Edit name and time - Set color of active timers

Extension Homepage
https://github.com/aliakseiz/tracker

No comments.

Diff Against

Files

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

Shexli (experimental) warning 3

Shexli found 3 issues that may need reviewer attention.

EGO-A-004 warning

extension files should not contain excessive ungated console logging

File contains 7 ungated console.log/warn/error calls (threshold: 5).

No excessive logging

  • extension.js:222
    console.log(`Error performing backup: ${err.message}`)
  • extension.js:261
    console.log(`Error creating backup file path: ${err.message}`)
  • extension.js:290
    console.log(`Error: UI elements not found for timer "${timer.name}"`)
  • extension.js:1091
    console.log(`Warning: UI elements not found for timer "${timer.name}"`)
  • extension.js:1338
    console.log(`Error: cannot open file: ${err.message}`)
  • extension.js:1347
    console.log(`Error: cannot open directory: ${err.message}`)
  • extension.js:1354
    console.log(`Error: failed to export CSV: ${err.message}`)

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:75
            this._textColorChangedHandler = this._settings.connect('changed::text-color', () => {
                this._textColor = this._settings.get_string('text-color');
                this._updateActiveTimerColors();
            })
  • extension.js:132
            this._settings.connect('changed::backup-enabled', () => {
                this._backupEnabled = this._settings.get_boolean('backup-enabled');
                if (this._backupEnabled) {
                    this._startBackupTimer();
                } else {
                    this._stopBackupTimer();
               
  • extension.js:153
            this._settings.connect('changed::backup-filename-format', () => {
                this._backupFilenameFormat = this._settings.get_string('backup-filename-format');
            })
  • extension.js:145
            this._settings.connect('changed::backup-frequency', () => {
                this._backupFrequency = this._settings.get_string('backup-frequency');
                if (this._backupEnabled) {
                    this._stopBackupTimer();
                    this._startBackupTimer();
                }
            })
  • extension.js:141
            this._settings.connect('changed::backup-path', () => {
                this._backupPath = this._settings.get_string('backup-path');
            })
  • extension.js:739
            timerMainRow.actor.connect('enter-event', () => {
                timerMainRow.actor.add_style_pseudo_class('highlighted');
            })
  • extension.js:979
                entry.clutter_text.connect('key-press-event', (actor, event) => {
                    let symbol = event.get_key_symbol();
                    let state = event.get_state();
    
                    if (symbol === Clutter.KEY_Escape) {
                        cancelEdit();
                        // Prevent the
  • extension.js:742
            timerMainRow.actor.connect('leave-event', () => {
                timerMainRow.actor.remove_style_pseudo_class('highlighted');
            })
  • extension.js:80
            this.menu.connect('menu-closed', () => {
                this._onMenuClosed();
            })
  • extension.js:1334
                notification.connect('activated', _notification => {
                    try {
                        Gio.AppInfo.launch_default_for_uri(`file://${filePath}`, null);
                    } catch (err) {
                        console.log(`Error: cannot open file: ${err.message}`);
                    }
       

EGO-L-006 warning

preferences classes should not retain window-scoped objects on instance fields without close-request cleanup

Preferences code stores window-scoped objects on the exported prefs class without `close-request` cleanup.

Destroy all objects

  • prefs.js:29
    this._timerGroup = this._getTimerGroupFromPage(timersPage)
  • prefs.js:32
            this._timerChangedHandler = settings.connect('changed::timers', () => {
                this._updateTimersPage();
            })

All Versions

Previous Reviews on this Version

fmuellner active