You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(container-indicator): add live performance, configuration, and terminal access - #511
Show live CPU, memory, and disk throughput for each running container, derived from two container stats samples, and chart the recent samples in the configuration window.
Add an ⓘ button that opens a frosted floating configuration window with the full container list configuration (resources, runtime, network, process, and environment variable names only).
Add one-click terminal access for running containers (container exec -it) and machines (container machine run -n), opened through a terminal chosen in settings.
Details
CPU percentage is relative to the container's configured cores, so 100% means the whole allotment is busy.
container stats --format json --no-stream is skipped entirely when nothing runs, avoiding its internal two-second sampling delay.
A failed stats read keeps the previous numbers visible and reports the failure; hiding the panel clears the sample baseline.
The controller retains up to 150 samples per running container (about twelve minutes at the five-second poll). Stopped containers lose their series, and pausing monitoring restarts it rather than bridging an unsampled gap.
The configuration window draws CPU, memory, and disk I/O as Swift Charts sparklines with hidden axes. Hovering a chart shows a rule, the nearest point, and that sample's time and value in place of the latest reading.
Terminal scripts are written as .command files in the user's temporary directory, validated before writing, and opened through LaunchServices.
The terminal picker lists the system default plus installed apps only, persists the choice, and prefers an installed tab-capable terminal. Ghostty and iTerm open a new tab through AppleScript; Terminal.app and other apps open a new window through their document handling.
The configuration window uses NSVisualEffectView glass with a transparent titlebar and is ordered above the menu-bar popover.
Environment values are masked in the configuration window because container list exposes secrets such as database passwords.
Validation
make test TEST_FILTER=ContainerIndicatorPluginTests — 44 tests passed.
make validate-changelog — passed.
make run — Debug app and plugin installed; live charts and hover readouts verified manually.
Thanks for adding these improvements! I reviewed 9d396cb2 and found two issues I recommend fixing before merging:
Terminal launches can block interaction with the whole app. AppleScript execution and waiting for the external process currently happen synchronously on the main thread. A slow launch can delay input throughout MacTools, including other plugins. Please run the launch asynchronously with a timeout, and update the UI on the main thread when it finishes.
The detail window can show stale readings as live data. When a stats read fails, it keeps the previous numbers and charts, but the error is only shown in the main panel. Please also show the failure and the last successful sample time in the detail window, clearly marking retained data as out of date.
Thanks again! These changes would make the new features more reliable.
Thanks for the review — both issues are fixed in a472fbb.
Terminal launch no longer blocks the app.ContainerTerminalLaunching.launch is now async. The controller starts it from a main-actor task and only publishes the error when it finishes, so input in other plugins stays responsive. The default launcher runs /usr/bin/open and NSAppleScript on background queues and resumes after a 10-second timeout (terminating a still-running open process), so a stalled terminal cannot leave the action pending forever.
Stale readings are marked in the detail window. When statsFailure is set, the live section now shows an orange banner with the failure message and the last successful sample time; the retained cards and charts stay visible but are explicitly labeled as out of date. The retained sample keeps its original sampledAt, covered by a test.
make test TEST_FILTER=ContainerIndicatorPluginTests — 44 tests passed.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
container statssamples, and chart the recent samples in the configuration window.container listconfiguration (resources, runtime, network, process, and environment variable names only).container exec -it) and machines (container machine run -n), opened through a terminal chosen in settings.Details
container stats --format json --no-streamis skipped entirely when nothing runs, avoiding its internal two-second sampling delay..commandfiles in the user's temporary directory, validated before writing, and opened through LaunchServices.NSVisualEffectViewglass with a transparent titlebar and is ordered above the menu-bar popover.container listexposes secrets such as database passwords.Validation
make test TEST_FILTER=ContainerIndicatorPluginTests— 44 tests passed.make validate-changelog— passed.make run— Debug app and plugin installed; live charts and hover readouts verified manually.