Initial Electron desktop app - #1
Merged
Merged
Conversation
Companion app for the kiqr CLI that monitors the local kiqr agent and the WordPress dev environments it proxies, with a live dark dashboard. - electron-vite + React + TypeScript (strict), Biome for lint/format - Main process Docker service (src/main/docker.ts): pure, testable parsers (parseAgentPs, parseStatsLines, classifyStat) with an injectable exec wrapper; graceful "Docker not running" handling - 2s poll loop pushing AgentStatus + ClassifiedStat[] over IPC - Sandboxed preload exposing window.kiqr (onStatus/onStats/refresh) with contextIsolation on and nodeIntegration off - Renderer dashboard: pulsing agent status pill, agent card, grouped project cards, animated CPU/mem meters, CPU sparklines, intentional empty states - Vitest specs for all parsers (no Docker daemon required) - electron-builder config, GitHub Actions CI, README, .gitignore Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The first cut of Kiqr Desktop — a native companion to the kiqr CLI that watches the local kiqr agent and the WordPress dev environments it proxies, in one live dark dashboard.
What's in here
Stack: electron-vite + React + TypeScript (strict), Biome for lint/format (matching the kiqr/cli config — 2-space, single quotes, no bracket spacing, trailing commas), electron-builder for packaging.
Main process — Docker service (
src/main/docker.ts)getAgentStatus()—docker psagainstkiqr-traefik/kiqr-splashto decide if the agent is up.getContainerStats()—docker stats --no-stream --format '{{json .}}', parsed per-line, filtered to kiqr containers (name prefixkiqr-or attached to thekiqrnetwork).parseAgentPs,parseStatsLines,classifyStat) and the exec wrapper is injectable, so the logic is unit-tested without a Docker daemon.pollLooppushes results over IPC. Missing/stopped Docker degrades to a cleardocker-downstatus instead of crashing.Preload — sandboxed
window.kiqrviacontextBridge(onStatus/onStats/refresh),contextIsolationon,nodeIntegrationoff.Renderer — pulsing green/grey/amber agent status pill, an Agent card, grouped Project cards (WordPress / MariaDB / phpMyAdmin), animated CPU/mem meters, CPU sparklines, smooth 2s updates, and intentional empty states ("Agent stopped — run
kiqr up"). Kiqr blue (#3858e9) accent.Tests — Vitest specs for every parser plus the poll loop (24 tests, no Docker needed).
Hygiene — real README,
.gitignore, GitHub Actions CI (npm ci → lint → typecheck → test → build), MIT LICENSE.Gate results (all green locally)
npm install✅npm run typecheck✅ (strict, node + web configs)npm test✅ — 24/24npm run build✅ — main + preload + renderer compilenpm run lint✅ — Biome cleanNot exercised here
This was built in a headless environment with no display and no Docker daemon, so the live GUI and real-docker behavior were not run — only typecheck, build, and unit tests of the pure parsers. Worth trying on your machine, @kjellberg:
npm install && npm run devwith Docker running and akiqr upproject active to see live meters; and with Docker stopped to confirm the amber "Docker not running" state.🤖 Generated with Claude Code