Skip to content

Feature/widget - #4

Open
luisdaniellaserna wants to merge 8 commits into
marksxiety:mainfrom
luisdaniellaserna:feature/widget
Open

luisdaniellaserna wants to merge 8 commits into
marksxiety:mainfrom
luisdaniellaserna:feature/widget

Conversation

@luisdaniellaserna

Copy link
Copy Markdown

Adds a Windows desktop widget that runs alongside the existing terminal UI and displays the same CPU, memory, and disk metrics using the existing collectors and 3-hour trend history.

The widget includes all 11 existing themes and is built with Wails v2, using a Vue 3 + uPlot frontend rendered through WebView2.

The existing TUI remains unchanged. All terminal call sites, behavior, and tests are preserved.

The palettes lived in components, which imports lipgloss, so the desktop widget could not reuse them without linking a terminal renderer.

components stays as a thin adapter, leaving the terminal UI call sites and behaviour unchanged.
SaveTheme rewrote the whole file from an in-memory copy, so the terminal UI changing the theme wiped the widget's saved window position, and vice versa. UpdateConfig re-reads from disk before merging.

The config now holds multiple keys, and access is guarded by a mutex because the widget reaches it from several goroutines at once (webview methods, close handler, second-instance launch).
Sampler records at most one sample per interval across the three metrics, skipping collectors that have not reported yet, so a lagging collector cannot push a phantom zero into the trend. Series summarises a history for display and Percent keeps the percentage maths in one place.

All three are free of UI and platform dependencies, so the tests run on every platform rather than only on Windows.
A frameless, fixed-size, always-on-top monitor built with Wails v2 and a Vue 3 + uPlot frontend. It reuses the existing collectors and history model, replacing the Bubble Tea update loop with a one-second push of a downsampled snapshot to the webview.

The package is gated on the windows build tag so the Linux lint and test jobs skip it rather than needing Wails' GTK dependencies. Run it with 'wails dev' from desktop/, or see desktop/README.md.
Covers the desktop widget, the theme package extraction, and the config write fixes.
The root .gitignore only covered *.exe, so 'go build -o pulse-agent ./agent' left a 6.8 MB binary that a broad git add would have committed.
Adds Getting started and a Desktop widget section, shows both frontends in the architecture diagram, and adds a Key Components note on why the widget pushes rather than polls.

Also corrects the stated Go version from 1.21+ to 1.26.1+, which is what go.mod has declared since before this branch.
Shows the widget in the root README's Desktop widget section and at the top of the widget's own README.

Also brings desktop/README.md in line with the fixed-size frame change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant