Commit gráf

13 Commit-ok

Szerző SHA1 Üzenet Dátum
hariel1985
9810987155 Bump version to 1.2.0 (4)
Adds the CPU temperature on Apple Silicon and replaces the process table
with an NSTableView, which fixes the memory growth noted as a known issue
in 1.1.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:08:58 +02:00
hariel1985
c50443bdbc Draw the process list with NSTableView instead of SwiftUI's Table
On macOS 26 SwiftUI's Table retained AutoLayout and view-graph objects on
every data update, on top of an NSHostingView per cell: tens of MB an hour
while the window was visible. Measured side by side (6 min, window
visible, scrolling), heap growth fell from ~600 KB/min to ~35 KB/min and
the starting footprint from 67 MB to 49 MB.

Cells are reused AppKit views and an update rewrites only the changed
fields of rows on screen. Column widths and order are remembered; the
context menu, double-click, Delete key and sort directions match the old
table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:06:18 +02:00
hariel1985
15c8b18b48 Show the CPU temperature on Apple Silicon
Power & Storage only had macOS's thermal state (a level, no degrees) and
the battery temperature. The CPU die sensors are now read through
IOHIDEventSystemClient (no root or entitlement needed outside the
sandbox): "PMU tdie*" from M2 on, "pACC/eACC MTR Temp Sensor*" on M1.
System Status shows the hottest one, with the average and sensor count in
the tooltip, coloured from 80/90/100 °C. Intel Macs have no such sensors
and the row stays hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 21:51:42 +02:00
hariel1985
1767491076 Keep the app version in project.yml so XcodeGen can't reset it
project.yml declared `info: path: TopManager/Info.plist` without
properties, so every `xcodegen generate` rewrote Info.plist with
XcodeGen's defaults, 1.0 (1). That silently undid the version bump in
cf88044: its message says 1.1.1 (3), but the commit actually set
Info.plist back to 1.0 (1).

The version now lives in MARKETING_VERSION / CURRENT_PROJECT_VERSION in
project.yml, and the generated Info.plist references them. Regenerating
is idempotent and the built app reports 1.1.1 (3).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 15:26:28 +02:00
hariel1985
6f60dd7ad8 Pause view updates while no window is visible; fix zero-value flicker
The window left open all day grew the app by ~360 MB in 24 h even after
the .tabItem fix. Isolating each piece in lab builds showed the growth is
the sum of several small framework leaks on macOS 26.6 that fire on every
view update: SwiftUI Table cell updates, AppKit text-cell KVO
dependencies (NSKeyValueDependency) and an ObservationRegistrar created
inside DesignLibrary. With the window closed every counter stayed flat;
minimized or fully covered, SwiftUI kept updating and kept leaking.

- WindowVisibility tracks whether any TopManager window is on screen
  (occlusion state; the status item's host window is ignored).
- SystemMonitor records into an always-current LiveState and only
  mirrors it into the @Published properties while something is visible.
  Resuming publishes everything at once, so views catch up immediately.
  Metrics history, alerts and the menu bar keep running while paused.
- MenuBarStatus carries the pre-formatted menu-bar strings, republished
  only when the visible text changes.
- AlertCenter assigns healthScore/diagnosis only when they change.
- Monitoring now starts in applicationDidFinishLaunching instead of the
  main window's onAppear, so it also runs when the app launches with no
  window (state restoration after the window was closed).

Also fixes a visible bug: ProcessMonitor's lightweight refresh (2 of
every 3 fetches) emitted 0 for memory, CPU and threads instead of the
last known values, so ~90% of rows showed "Zero KB" most of the time.

Verified in an isolated lab instance: minimized or covered, all leak
counters stay flat while the menu-bar title keeps updating; a partially
visible window updates every tick. Growth while the window is actually
visible (~190 KB/min) is unchanged — those leaks are in Apple's
frameworks. 58/58 tests pass, including a regression test that fails on
the old code (472 of 487 own processes reported 0 memory).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 13:53:10 +02:00
hariel1985
2e3574f6e3 Increment 5: Settings, launch-at-login & rich menu-bar HUD
- AppSettings (@MainActor, UserDefaults-persisted): refresh interval, menu-bar
  metric, notifications toggle, CPU/disk/low-battery alert thresholds,
  launch-at-login; pushes changes into live services; nonisolated clampInterval
- LoginItem via SMAppService (macOS 13+), register/unregister with error catch
- SystemMonitor: runtime-configurable refresh cadence (was hardcoded 3s)
- SettingsView (⌘,): General (login, interval, menu-bar metric) + Alerts
  (notifications + thresholds) tabs
- MenuBarLabel: user-selectable menu-bar metric (CPU/Memory/Health/Download)
- Menu-bar dropdown: Top CPU Consumers with one-click quit
- 3 new tests (55 total); smoke: runs clean, Settings… menu registered

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:25:43 +02:00
hariel1985
bc494af363 Increment 4: alerts engine, notifications & System Health score
- HealthModel (pure): 0-100 score + plain-language diagnosis + rating
- SystemAlert/AlertKind/AlertThresholds + pure AlertEvaluator (sustained-breach)
- AlertCenter (@MainActor): per-cycle health + alert evaluation, de-dup by kind,
  inbox (capped), native UserNotifications on transition into a condition
- Covers: sustained high CPU, critical memory pressure, disk full, thermal,
  runaway process, low battery
- Wire evaluate() into SystemMonitor; request notif auth on launch
- HealthCardView (score ring + diagnosis) + AlertsInboxView in Power & Storage;
  health score + alert badge in menu bar
- Renamed model Alert->SystemAlert to avoid SwiftUI.Alert shadowing
- 10 new tests incl. AlertCenter de-dup integration (52 total green)
- Visual smoke: Energy + Disk I/O columns render with live data under load

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:20:24 +02:00
hariel1985
9b92fb715a Increment 3: battery health + power monitoring (IOKit)
- PowerInfo model + BatteryMath (health %, condition, watts, time fmt) — unit-tested
- PowerMonitor reads AppleSmartBattery via IORegistry (no root/entitlements):
  charge, cycles, design/raw-max capacity, temperature, voltage, amperage,
  time-to-empty/full, adapter watts; graceful no-battery (desktop) path
- Wire powerInfo into SystemMonitor (every 3rd cycle)
- Battery & Power section in Power & Storage tab; battery in menu-bar dropdown
- 10 new tests (42 total); cross-checked vs pmset/ioreg: health 96.9%, 114 cycles,
  30.8C, matches ground truth exactly

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:12:20 +02:00
hariel1985
1390eda468 Increment 2: deep per-process data + process inspector
- ProcessItem: disk read/write rate + cumulative bytes, energy-impact score,
  executable path; equality now tracks energy/disk so the table refreshes
- ProcessMonitor: disk I/O + idle-wakeup rates from rusage_info_v4; full path
  capture; on-demand KERN_PROCARGS2 args + PROC_PIDLISTFDS open-file count
- EnergyModel heuristic + pure ProcArgs parser (both unit-tested)
- ProcessView: sortable Energy + Disk I/O columns (icon folded into Name to stay
  within SwiftUI's 10-column limit); Get Info (double-click / ⌘I) opens inspector
- ProcessInspectorSheet: live stats, path, args, open files, Reveal/Copy Path
- 10 new tests (32 total green); smoke: stable under CPU+disk load

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:08:15 +02:00
hariel1985
222638fc98 Increment 1: persistent metric history + extended time-range charts
- MetricsStore: thread-safe on-disk ring buffer (Application Support), throttled
  background saves, flush on quit/background, 24h/20k cap
- MetricsMath: pure trim + downsample (unit-tested)
- HistoryRange (Live/5m/30m/1h/24h) + HistoryRangePicker + MetricTrendChart
- Wire recording into SystemMonitor; range picker in CPU/Memory/Network tabs
- Fix durability: flush history on applicationWillTerminate + scenePhase.background
- 8 new tests (30 total green); runtime smoke: no crash, 7 samples persisted

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 19:59:05 +02:00
hariel1985
d59bf2b7b0 Increment 0: add XCTest target, testing process & 10x value plan
- Add TopManagerTests unit-test target (hosted, @testable import)
- 14 baseline tests for formatters and model math (all green)
- scripts/test.sh build+test loop driver
- docs/TESTING.md (5-gate process), docs/VALUE_PLAN.md (10x rubric)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 19:51:47 +02:00
hariel1985
5ec09d9279 Aláírás: céges Apple Team ID (P3663392R2) + entitlements javítás
- DEVELOPMENT_TEAM beállítva a céges fiókra (InstaSoft, P3663392R2).
- A project.yml-ből kivéve a target `entitlements:` blokk, amely
  `properties` nélkül üres entitlements fájlt generált és felülírta a
  kézzel karbantartott TopManager.entitlements-et (app-sandbox=false).
  A CODE_SIGN_ENTITLEMENTS beállítás marad. Release build ellenőrizve.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 19:26:29 +02:00
hariel1985
41010541a7 Initial commit: TopManager macOS system monitor
A native SwiftUI app for monitoring macOS system resources:
- Processes tab with sorting, filtering, and process control
- Apps tab for running applications
- Performance tab with CPU, memory, and network charts
- Power & Storage tab with system info, GPU, storage, and network

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 23:56:51 +01:00