Skip to content

sysmon: fix wrong process icons - #4140

Merged
bbedward merged 3 commits into
duxlabs-dev:masterfrom
Conava:sysmon-process-icons
Nov 5, 2026
Merged

bbedward merged 3 commits into
duxlabs-dev:masterfrom
Conava:sysmon-process-icons

Conversation

@Conava

@Conava Conava commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

The system monitor could show the wrong app icon for a process, because process names went through a search that also matches parts of words. For example sh could show an IntelliJ or CLion logo. Process names are now matched exactly.

A process without an icon of its own now shows the icon of its closest parent, so a command run in a terminal shows the terminal's icon instead of a letter. The name in the row stays the process's own.

Also fixes a big performance issue when scrolling the process list

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

Process names went through the app id search, whose last step matches
parts of words, so sh got any app with "share" in its Exec line. Look
process names up exactly instead, and let a process without an icon
show the one of its closest parent that has one. Only the icon comes
from the parent; the row keeps the process's own name.
@github-actions github-actions Bot added fix ui Quickshell UI under quickshell/ labels Nov 5, 2026
@bbedward

bbedward commented Nov 5, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Claude review

One retained-memory issue. The rest looks good.

  • The icon memo keeps the full process snapshot after the process view closes, quickshell/Modules/ProcessList/ProcessListMetrics.qml:141
    Checked: the exact-name icon lookup, the parent-chain fallback, cache keys and resets, binding updates in ProcessRow and ProcessDetailStrip, null/empty process handling, and deprecated shims. Model: claude-opus-5-5.

The icon lookup kept the last process list after DgopService released
it. Drop it whenever the list is emptied, which also covers a bar
widget keeping polling active.
@bbedward

bbedward commented Nov 5, 2026

Copy link
Copy Markdown
Member

/claude review

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

The earlier retained-memory issue is fixed. One new issue: the icon cache can go stale.

  • The icon memo is not reset when the icon theme or app id substitutions change, so the list keeps old icons while polling stays active, quickshell/Modules/ProcessList/ProcessListMetrics.qml:136
    Checked: the fix for the previous snapshot finding, exact-name icon lookup, the parent-chain fallback and its depth limit, memo keys and resets, binding dependencies in ProcessRow and ProcessDetailStrip, empty and kernel-thread process names, and deprecated shims. Model: claude-opus-5-5.

Reset the icon cache when the icon theme or app id substitutions change.
Programs replaced by an update report a path ending in " (deleted)", and
scripts or versioned binaries have an executable name unrelated to the
process name, so strip the suffix and try the process name first like
before, which also keeps its substitutions working.
@Conava

Conava commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

The icons now update when the icon theme or an app id substitution changes.

Ran my own claude review to counter the next one and also fixed a bug where programs replaced by an update lost their icon until they restarted, and processes are looked up by their shown name again, so substitutions on that name work like before.

@bbedward

bbedward commented Nov 5, 2026

Copy link
Copy Markdown
Member

/claude review

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

Both earlier findings are fixed. No new issues found.
Checked: the icon memo resets on icon index, substitution, desktop entry and polling changes; clearing the process snapshot when allProcesses empties; exact-name icon lookup including (deleted) executables and dashed names; the parent-chain fallback and its depth limit; binding dependencies in ProcessRow and ProcessDetailStrip; empty and kernel-thread processes; idle cost and retained memory; deprecated shims. Model: claude-opus-5-5.

@bbedward
bbedward merged commit c4b6303 into duxlabs-dev:master Nov 5, 2026
5 checks passed
dux-ci Bot pushed a commit that referenced this pull request Nov 5, 2026
port 2.1

(cherry picked from commit c4b6303)
@Conava Conava mentioned this pull request Nov 6, 2026
2 of 12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants