Skip to content

sysmon: keep one history for every chart - #4313

Merged
purian23 merged 1 commit into
duxlabs-dev:masterfrom
Conava:sysmon-history
Nov 18, 2026
Merged

purian23 merged 1 commit into
duxlabs-dev:masterfrom
Conava:sysmon-history

Conversation

@Conava

@Conava Conava commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Description

Part of the system monitor widgets redesign. All charts now read from one shared history instead of keeping a separate history per surface. Whatever is already being measured anyway, for example by a desktop widget or a bar widget, now also shows up in the system monitor's charts, so they open with history instead of starting empty every time.

The history keeps the last 30 minutes of every value that was measured. Nothing is polled for it, it only records what something else already asked dgop for, and it is freed 30 minutes after nothing measures anymore. The desktop widget's graph time range now uses it directly instead of its own sampling timer.

The old DgopService.cpuHistory, memoryHistory, networkHistory and diskHistory are still kept, but deprecated in favor of DgopService.history().

Stretches where nothing was measured should be shown in the chart instead of drawing a straight line across it. That needs the DSparkline change in dux-qml-common: duxlabs-dev/dux-qml-common#54

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

DgopService now records every sample it receives into one shared store
(a ring buffer per series on one timeline, 30 minutes) instead of each
surface keeping its own copy. Whatever is already being measured, for
example by a desktop widget or a bar widget, fills the system monitor's
charts too, so they open with history instead of starting empty.

Charts read time-bucketed ranges from the store, so the desktop widget's
graph time range is a real range query and its own sampling timer is
gone. Nothing is polled for the store itself. When polling stops, the
store is freed after the retention window.

Stretches where nothing was measured show as gaps instead of a straight
line (needs the DSparkline change in dux-qml-common).

Claude-Session: https://claude.ai/code/session_01DQu2E4BboXnuoPrnnmViJ7
@github-actions github-actions Bot added feature internal ui Quickshell UI under quickshell/ labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: SysmonHistory ring/bucketing/gap logic, DgopService recording, pruning and 30 min retention timer, binding dependencies of history(), NaN handling in PerformanceCard, desktop widget canvas, DSparkline and rateAxisMax, removed deviceHistory/threadHistory/addToHistory callers, deprecated legacy history properties, module refs of the desktop widget. Model: claude-opus-5-5.

@purian23
purian23 merged commit e8d860e into duxlabs-dev:master Nov 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature internal ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants