Review of "Dictation Indicator for Voxtype" version 0.1.0 (1)

Details Page Preview

Shows what Voxtype is doing: a calm orb in the top bar while it is idle, a red trace that follows your voice and a "Listening…" pill at the top of the screen while it records, amber while it transcribes. The top-bar menu starts, stops and cancels dictation, and a settings window controls the orb, the pill, the messages and the motion. Voxtype's own overlay needs wlr-layer-shell, which GNOME's compositor does not implement. This extension reads Voxtype's state file from inside GNOME Shell instead. It never takes keyboard focus, so the dictated text still lands in the window you were typing in. It spawns `voxtype record <verb>` only when you choose a menu item, and it never writes Voxtype's config. When Voxtype is not running, the menu shows the command that starts it; clicking it copies that command to the clipboard. The extension never reads the clipboard. Its settings window changes the GNOME custom shortcuts that run Voxtype only when you ask it to. Requires Voxtype with state_file = "auto" (the default).

Extension Homepage
https://github.com/TheophileDiot/gnome-voxtype-indicator

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) warning 3 manual_review 1

Shexli found 4 issues that may need reviewer attention.

EGO-A-005 manual_review

extensions should not access the clipboard directly

Direct clipboard access via `St.Clipboard.get_default()` requires reviewer scrutiny.

Review Guidelines

  • extension.js:761
    St.Clipboard.get_default()

EGO-L-002 warning

objects created by extension should be destroyed in disable()

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

Destroy all objects

  • extension.js:757
    this._chipIcon = new St.Icon({icon_name: 'edit-copy-symbolic', style_class: 'voxtype-chip-icon'})
  • extension.js:596
    this._header = new PopupMenu.PopupBaseMenuItem({reactive: false, can_focus: false})
  • extension.js:607
    this._headerText = text
  • extension.js:189
    this._label = new St.Label({style_class: 'voxtype-label', y_align: Clutter.ActorAlign.CENTER})
  • extension.js:604
    this._lineLabel = new St.Label({style_class: 'voxtype-line', opacity: 158})
  • extension.js:1040
    this._oneShot = new Clutter.Timeline({actor: Main.layoutManager.uiGroup, duration: tr.ms + tr.extra + 100})
  • extension.js:1247
    this._openTimeline = new Clutter.Timeline({actor: Main.layoutManager.uiGroup, duration: this._openDurationMs})
  • extension.js:1107
            this._orbTimeline = new Clutter.Timeline({
                actor: Main.layoutManager.uiGroup,
                duration: durationMs,
                repeat_count: -1,
            })
  • extension.js:713
    this._pillSwitch = new PopupMenu.PopupSwitchMenuItem('Show pill', this._settings.get_boolean('show-pill'))
  • extension.js:191
    this._probe = new St.Widget({style_class: 'voxtype-orb', visible: false})
  • extension.js:603
    this._titleLabel = new St.Label({style_class: 'voxtype-title'})

EGO-L-005 warning

owned object references should be released in disable()

Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.

Destroy all objects

  • extension.js:166
    this._button = new PanelMenu.Button(0.0, this.metadata.name, false)
  • extension.js:596
    this._header = new PopupMenu.PopupBaseMenuItem({reactive: false, can_focus: false})
  • extension.js:607
    this._headerText = text
  • extension.js:189
    this._label = new St.Label({style_class: 'voxtype-label', y_align: Clutter.ActorAlign.CENTER})
  • extension.js:604
    this._lineLabel = new St.Label({style_class: 'voxtype-line', opacity: 158})
  • extension.js:192
            this._pill = new St.BoxLayout({
                style_class: 'voxtype-pill',
                reactive: false,
                can_focus: false,
                track_hover: false,
                visible: false,
                opacity: 0,
            })
  • extension.js:713
    this._pillSwitch = new PopupMenu.PopupSwitchMenuItem('Show pill', this._settings.get_boolean('show-pill'))
  • extension.js:603
    this._titleLabel = new St.Label({style_class: 'voxtype-title'})

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:714
            this._pillSwitch.connect('toggled', (_item, state) => {
                if (state !== this._settings.get_boolean('show-pill'))
                    this._settings.set_boolean('show-pill', state);
            })

All Versions

Version Status
0.1.0 (1) Unreviewed

Previous Reviews on this Version

theophile_diot posted a review
Hi, I went through the automated findings on 0.1.0, and I don't think any of them needs a code change. EGO-A-005: `extension.js:761` only writes to the clipboard. When Voxtype isn't running, the menu shows the command that starts it, and clicking that row copies it with `set_text`. The extension never reads the clipboard, and the description says so. EGO-L-002 and EGO-L-005: every flagged actor is a child of `this._button` or `this._pill`. `disable()` destroys both at lines 316-317, children included, then sets every reference to `null` at 318-322. The linter doesn't seem to follow chained assignments like `this._label = this._button = ... = null`. The three `Clutter.Timeline` objects aren't actors: `_stopClock()` and `_stopOpenTween()` disconnect, stop and null them (the first also runs `_stopOneShot()`), and `disable()` calls both. EGO-L-003: `this._pillSwitch` belongs to the extension, and `disable()` destroys it with the menu, `toggled` handler included. If you'd rather have an explicit `destroy()` and `null` per object, I'll change it and upload 0.1.1.