Skip to content

Phase D5 — KPI panel: scalar and named-tuple cards - #231

Merged
BorisTyshkevich merged 4 commits into
mainfrom
feat/kpi-panel-154
Jul 14, 2026
Merged

Phase D5 — KPI panel: scalar and named-tuple cards#231
BorisTyshkevich merged 4 commits into
mainfrom
feat/kpi-panel-154

Conversation

@BorisTyshkevich

@BorisTyshkevich BorisTyshkevich commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

What & why

Closes #154.

Adds KPI as a first-class saved-query Presentation Spec panel for exact one-row numeric scalars and named tuples. The canonical schema, pure reader/formatter, shared renderer, and panel-owned typed transport are used consistently by workbench, dashboard, and detached reruns.

Highlights:

  • preserves large Int and Decimal precision, including deltas
  • rejects authored top-level FORMAT before a KPI request
  • keeps explicit invalid KPI panels visible without fallback
  • auto-detects KPI conservatively after Logs and before Chart/Table
  • promotes the frozen KPI contract into query-spec-v1 and refreshes generated validators
  • adds an importable Library example and responsive cross-browser coverage

The unrelated parallel cold-start E2E server flake discovered during validation is tracked separately in #230.

Verification

  • npm test — 91 files, 2563 tests, 100% statements/lines
  • npm run build — single-file dist/sql.html
  • npm run test:e2e -- --workers=1 — 96 passed across Chromium, Firefox, and WebKit
  • npx playwright test tests/e2e/kpi.spec.js --workers=1 — 9 passed after final precision fixes
  • npm audit --omit=dev — 0 vulnerabilities
  • independent code review — no remaining correctness findings

Checklist

Add canonical one-row scalar and named-tuple KPI cards with exact typed formatting, shared rendering, panel-owned transport, conservative auto-detection, and consistent workbench, dashboard, and detached execution.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: Codex
@BorisTyshkevich BorisTyshkevich mentioned this pull request Jul 14, 2026
93 tasks
Enable alias-derived tuple member names in the importable example and document both the query setting and explicit named Tuple cast forms.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: Codex
Let the shared KPI panel grow across its dashboard flex host so responsive cards flow horizontally at wide widths while retaining the mobile single-column layout.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: Codex
Bound KPI cards to 220–280px tracks, keep each row at its natural tallest-card height, and let KPI tiles use content height in Report and Full-width dashboard layouts.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: Codex
@BorisTyshkevich
BorisTyshkevich merged commit 8b491e5 into main Jul 14, 2026
6 checks passed
@BorisTyshkevich
BorisTyshkevich deleted the feat/kpi-panel-154 branch August 6, 2026 15:28
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.

Phase D5 — KPI panel: one-row scalar/named-tuple cards, canonical Presentation Spec contract, and shared renderer

1 participant