sync: auto-sync from GURU-5070 at 2026-06-07 08:15:08

Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-07 08:15:08
This commit is contained in:
2026-06-07 08:15:11 -07:00
parent 261988956d
commit 8f6f7cabb2
6 changed files with 64 additions and 409 deletions

View File

@@ -163,3 +163,67 @@ Ran the **3-way Multi-AI review** (Gemini via `agy` + Grok + Claude Code Review
- Real second-model backends: `@google/gemini-cli` (`gemini` npm, v0.45.2, Google OAuth) via `ask-gemini.sh`; grok 0.2.22 via `ask-grok.sh`. Both verified `OK`.
- Memory added: `reference_antigravity_agy_not_headless.md`.
- ff.py: `.claude/scripts/ff.py`, daemon `localhost:9333`, profile `~/.claude/ff-profile`.
---
## Update: 2026-06-07 08:13 PDT — GuruRMM beta dashboard: alert-count fix (prod) + 3 sidebar features (rail expand, light-mode theming, resizable spine)
### Summary
Merged the prior session's infra-spine hitbox + pin branch to gururmm `main` (auto-built to beta). Mike then reported the Alerts page summary chips disagreed with the lists they open. Diagnosed TWO predicate mismatches making the list >= the chip: (1) the Critical/Warning chips counted `status != 'resolved'` but clicked `status:""` (all statuses incl. resolved), and (2) `get_alert_summary` scoped counts to the last 7 days while the alert list has NO time window. Fixed both — chips now click `status:"unresolved"`, and dropped the 7-day window from the summary SQL so all four chips deterministically equal their lists. Code Review APPROVED. Merged `6b4cee4`: the dashboard half to beta, the server `get_alert_summary` change to the SHARED API (= prod immediately).
Mike reported Warning still wrong post-deploy. Diagnosed via the live API + a `gururmm` RMM-agent tail of `/var/log/gururmm-build.log` as DEPLOY TIMING, not a bug: the fast Vite dashboard deployed first while the slow Rust server didn't restart with the dropped window until **14:31:33 UTC** (after he looked). Confirmed corrected: `summary.warning` 2->4, `total` 104->152 (the 2 "missing" warnings were just >7 days old; 0 resolved).
Built three sidebar features (Howard/Mike requests), each Coding-Agent-built + reviewed, each on its own branch -> build-verify -> merge to beta:
- **Rail expand** (`a6d355f`): the far-left FunctionRail gets a persistent toggle (localStorage `gururmm.rail.expanded`, cross-tab) widening it w-12->w-52 with inline labels; expanded mode inlines the "More" items; collapsed unchanged. Code Review APPROVED.
- **Sidebar light-mode theming** (`d2c9236`): the left panes were hardcoded always-dark. Gave the light theme a soft-grey `--sidebar-bg` (95%) / border (88%) and swapped sidebar-surface `text-white/N` -> `text-foreground/N` (1:1 opacity) across FunctionRail/InfrastructureSpine/ContextTree, PRESERVING the white-on-red alert badges + the dark hover tooltip. Dark mode unchanged.
- **Resizable spine** (`3c210e0`): drag the spine's right edge (180-480px, persisted `gururmm.spine.width`); width via inline style, transition off mid-drag; `setPointerCapture` + a teardown ref close the release-outside-window and unmount-mid-drag edge cases; keyboard arrows on the handle. Code Review APPROVED + the 2 robustness fixes applied.
### Key Decisions
- **Alert fix Part 2 = Option B (drop the 7-day window), Mike-approved despite prod impact** (the summary SQL is on the shared API; there is no separate beta API server). `status:"unresolved"` == the summary's `status != 'resolved'` because only 3 statuses exist (active/acknowledged/resolved — verified against schema + every write path).
- **Each sidebar feature is self-contained in its component** (FunctionRail/InfrastructureSpine self-manage state; no Layout.tsx change), reflowing via the existing flex row.
- **Theming preserves white-on-colored** (badge, tooltip) — only sidebar-surface text/bg/border became `foreground` tokens.
- **Did NOT promote beta -> prod** (Mike still reviewing); only the unavoidable server alert-count change is live on prod.
- Deferred the review's FunctionRail DRY (hoist PRIMARY_ITEMS) + `aria-current` nits to a future sidebar touch.
### Problems Encountered
- **Warning chip stale post-deploy** — deploy timing (slow Rust server restart at 14:31:33 UTC after the fast dashboard), not a logic bug. Confirmed via live API + RMM build-log tail.
- **First RMM dispatch failed** (`jq: Invalid numeric literal`) from nested JSON escaping in the command payload; rebuilt with `jq -n --arg` per the /rmm skill.
- Every feature branch needed a rebase onto `main` (CI version-bump commits advance `main` after each merge); each was a clean ff/rebase.
### Configuration Changes (submodule `projects/msp-tools/guru-rmm`, repo `azcomputerguru/gururmm` — NOT the claudetools repo)
- `dashboard/src/pages/Alerts.tsx` + `server/src/db/alerts.rs``6b4cee4` (alert chips + drop 7-day window)
- `dashboard/src/components/FunctionRail.tsx``a6d355f` (rail expand)
- `dashboard/src/index.css` + `FunctionRail.tsx`/`InfrastructureSpine.tsx`/`ContextTree.tsx``d2c9236` (theming)
- `dashboard/src/components/InfrastructureSpine.tsx``3c210e0` (resizable)
- All on `origin/main` (gururmm), deployed to beta; the `alerts.rs` change also on prod. The claudetools submodule pointer is left at pinned `226ba9f` (lagging — expected; not bumped).
### Infrastructure & Servers
- gururmm server `172.16.3.30:3001`; webhook build pipeline -> version bumps -> dashboard (beta web root `/var/www/gururmm/dashboard-beta`) + server (shared API restart). Server restarted **14:31:33 UTC** for the alert fix.
- `gururmm` RMM agent id `5e5a7ebc-95ea-40c8-b965-6ec15d63e157` (the server's own agent; used to tail the build log with no SSH).
- Alert data snapshot (2026-06-07): total 152, critical 23, warning 4 (3 active + 1 acknowledged), 0 resolved warnings.
### Commands & Outputs
- Alert diag: `GET /api/alerts/summary`, `GET /api/alerts?severity=warning&status=unresolved&limit=500` (JWT from vault `infrastructure/gururmm-server.sops.yaml credentials.gururmm-api.*`).
- RMM build-log tail: `POST /api/agents/<id>/command` with a `jq -n --arg`-built shell payload, then poll `/api/commands/<id>`.
- Per feature: `git checkout -b` -> Coding Agent -> Code Review Agent -> `npm run build` (exit 0) -> `git push origin <branch>:main` (ff) -> beta.
### Pending / Incomplete Tasks
- **Promote dashboard beta -> prod** (`sudo /opt/gururmm/promote-dashboard.sh --confirm` on `.30`) when Mike's happy — ships the whole redesign + these 4 dashboard changes. The server alert-count change is already on prod.
- FunctionRail DRY refactor (hoist `PRIMARY_ITEMS`) + `aria-current` (deferred review nits).
- Light-sidebar shade (95%) is a default — tweak after Mike's visual review on beta.
- `ff.py` visual verification of the light-mode sidebar offered (needs that Firefox profile logged into beta).
- Alert list `limit:200` pagination edge (a bucket >200 would show a chip number larger than the visible list) — pre-existing, noted.
- Carried: dev_admin re-login for credential reveal; Robert Wolkin printer type; vault GuruRMM `DATABASE_URL`; SPEC-018 errors; rotate MSP360 key.
### Reference Information
- gururmm `origin/main` this segment: `6b4cee4` alerts, `a6d355f` rail expand, `d2c9236` theming, `3c210e0` resizable spine (on top of prior `fa495ed`/`82e91c8` spine pin/hitbox, also merged this segment).
- New localStorage keys: `gururmm.rail.expanded`, `gururmm.spine.width` (+ `gururmm.spine.pins` from prior).
- beta `https://rmm-beta.azcomputerguru.com`; prod `https://rmm.azcomputerguru.com`.