Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ env:
SHELLCHECK_SHA256: "b7af85e41cc99489dcc21d66c6d5f3685138f06d34651e6d34b42ec6d54fe6f6"
CROWDIN_CLI_VERSION: "5.3.0"
CROWDIN_CLI_SHA256: "d3f8e74471b98d47c0964e85c992a04eb411d06138c4239118a4c94d29e3e9e4"
# kcov master after v43: v43 loses bash line tracking after a multi-line
# quoted argument that contains a single quote (fixed upstream in ba175851).
KCOV_COMMIT: "460cd988eaaa2271b682bbf1702443e90fb45c5e"
KCOV_SHA256: "9fdf40cca84ec358f515a90d69b20e8523821cf222f1af3f4c9d17c70b7d862b"

jobs:
changelog:
Expand Down Expand Up @@ -122,27 +126,38 @@ jobs:
coverage:
name: Statement coverage
runs-on: ubuntu-latest
# Ubuntu 24.04 does not package kcov; Arch ships it.
# Arch ships the current build toolchain and kcov's libraries.
container: archlinux:base
timeout-minutes: 40
steps:
- name: Install kcov and test prerequisites
- name: Install build and test prerequisites
# Retried: a single flaky Arch mirror read otherwise fails the job.
run: |
for attempt in 1 2 3; do
pacman -Syu --noconfirm bash curl diffutils git jq kcov python shellcheck sqlite unzip zip && exit 0
pacman -Syu --noconfirm bash binutils cmake curl diffutils elfutils gcc git jq make openssl \
python shellcheck sqlite unzip zip zlib && exit 0
sleep $((attempt * 10))
done
exit 1
- name: Build kcov (verified checksum)
run: |
TARBALL="/tmp/kcov.tar.gz"
curl -fsSL "https://github.com/SimonKagstrom/kcov/archive/${KCOV_COMMIT}.tar.gz" -o "$TARBALL"
echo "${KCOV_SHA256} ${TARBALL}" | sha256sum --check --strict
tar -xzf "$TARBALL" -C /tmp
cmake -S "/tmp/kcov-${KCOV_COMMIT}" -B /tmp/kcov-build -DCMAKE_BUILD_TYPE=Release >/dev/null
cmake --build /tmp/kcov-build --parallel "$(nproc)" >/dev/null
install -m 0755 /tmp/kcov-build/src/kcov /usr/local/bin/kcov
kcov --version
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Statements of the shell adapters and scripts, measured by kcov over every
# non-QML suite; scripts/coverage-report drops the bodies of embedded jq
# programs and heredocs, which kcov reports as unexecuted lines.
- name: Measure coverage (minimum 80%)
- name: Measure coverage (minimum 95%)
env:
AIOC_COVERAGE_MIN: "80"
AIOC_COVERAGE_MIN: "95"
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
scripts/coverage /tmp/coverage
Expand Down Expand Up @@ -765,6 +780,12 @@ jobs:
- name: Integration test — Codex/OpenCode local analytics
run: tests/test-local-analytics.sh

- name: Integration test — release package refusals
run: tests/test-package-release.sh

- name: Integration test — qmlls import tree
run: tests/test-qmlls-setup.sh

- name: Branch coverage suites (pi analytics and per-adapter edge cases)
run: |
tests/test-coverage-report.sh
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ find providers -type f -print0 | xargs -0 shellcheck -S warning
shellcheck -S warning tests/*.sh scripts/check-metadata scripts/check-dco scripts/package-release \
scripts/qmlls-setup scripts/reload-plugin scripts/render-contributors .githooks/pre-push
for test in tests/test-*.sh; do bash "$test"; done
AIOC_COVERAGE_MIN=80 scripts/coverage # kcov statement coverage (CI: Statement coverage)
AIOC_COVERAGE_MIN=95 scripts/coverage # kcov statement coverage (CI: Statement coverage)
QT_FORCE_STDERR_LOGGING=1 qmllint *.qml # exit code is the signal; without a TTY
# messages go to journald, not stderr
actionlint
Expand Down
13 changes: 7 additions & 6 deletions AiOverviewDashCard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ DashCardComponent {
// A square card shows one large number; larger cards list as many
// providers as fit under the heading.
readonly property bool compact: !wide && !tall
readonly property real rowHeight: Theme.fontSizeSmall * 1.4 + 3 + 4 + Theme.spacingS
readonly property real rowHeight: Theme.fontSizeSmall * 1.4 + Theme.spacingXS + Theme.spacingS + Theme.spacingS
readonly property int rows: {
if (compact)
return 1;
const fit = Math.max(1, Math.floor((height - heading.height) / rowHeight));
// The card pads its content, so fit rows into the content area.
const fit = Math.max(1, Math.floor((heading.parent.height - heading.height) / rowHeight));
const wanted = Number(options.count ?? 0);
return wanted > 0 ? Math.min(wanted, fit) : fit;
}
Expand Down Expand Up @@ -150,7 +151,7 @@ DashCardComponent {
Column {
required property var modelData
width: parent.width
spacing: 3
spacing: Theme.spacingXS

Item {
width: parent.width
Expand Down Expand Up @@ -187,14 +188,14 @@ DashCardComponent {

Rectangle {
width: parent.width
height: 4
radius: 2
height: Theme.spacingS
radius: height / 2
color: root.chipColor

Rectangle {
width: modelData.error ? 0 : Math.max(height, parent.width * (Number(modelData.percent) || 0) / 100)
height: parent.height
radius: 2
radius: height / 2
color: root.usageColor(modelData.percent)
}
}
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
- **Vercel AI Gateway** (`AI_GATEWAY_API_KEY`): AI Gateway Credits balance and total used from the official `/v1/credits`.
- **Gemini**: with a Gemini CLI sign-in, the card shows per-model daily quota from the Code Assist API the CLI uses, for accounts with a Code Assist Standard or Enterprise project (`GOOGLE_CLOUD_PROJECT` selects one). Google no longer offers Code Assist for individuals to the Gemini CLI; such an account now shows Google's reason instead of "Gemini CLI authenticated". An expired CLI token is renewed in memory and never written back. A configured API key still produces the key-check card.

### Fixes
- The DankDash card fits its provider rows into the padded content area, so the last row no longer runs into the bottom edge, and its usage bars use the theme's height, rounding and spacing like the DMS example cards.

### Documentation
- The README states "40+ providers", which only changes at the next ten, lists provider examples that match the coverage matrix, points at the 2.1 notes and links the development gates.
- `TODO.md` is grouped into the next release, partial work with its follow-up, blocked and candidate providers, CI and project health, and the roadmap adds live verification of the new spend providers and the kcov upstream report.
- `TODO.md` lists only open work again, with the date of the last upstream check for each blocked provider and the measured coverage gaps. The roadmap now plans the ClinePass usage windows, which the Cline dashboard reads from a read-only endpoint.
- Troubleshooting covers a missing or empty DankDash card and a refused limit reset, and the architecture guide describes the DankDash snapshot, the reset helper and the shared helper scripts added in 2.1. The NVIDIA notes reflect that build.nvidia.com replaced trial credits with rate limits.

### Quality
- Statement coverage counts a multi-line command as covered when kcov records its hit on the closing line, and new tests cover the missing-prerequisite results of every provider health check, the Copilot helper hand-off, a failed Antigravity token refresh (the refresh token never reaches the output) and Hermes analytics cache recovery. `docs/development-gates.md` notes the kcov limitation that still understates the Hermes and OpenCode analytics files.
- Statement coverage rises to 97.8% and the CI gate to 95%. The Hermes analytics and summary, limit resets, OpenCode, local analytics, quota alert, history export, 9Router and package checks now reach 100%. CI builds kcov from a pinned, checksum-verified commit that keeps line tracking after multi-line SQL, and the coverage report no longer counts lines bash never traces (empty case branches, array continuations, redirected block ends).

## 2.1.1 - 2026-10-26

Expand Down
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Every AI quota you pay for, live in your DankBar.**

A [DankMaterialShell](https://github.com/duxlabs-dev/dux-shell) plugin that tracks
quota, billing, authentication, and local usage for 43 AI providers — locally, honestly,
quota, billing, authentication, and local usage for 40+ AI providers — locally, honestly,
with no external service.

[![Release](https://img.shields.io/github/v/release/bernardopg/AiOverviewControl?color=8B5CF6&label=release)](https://github.com/bernardopg/AiOverviewControl/releases/latest)
Expand Down Expand Up @@ -55,7 +55,7 @@ invented percentages.
<tr>
<td width="50%" valign="top">

**📊 One dashboard, 43 providers**<br />
**📊 One dashboard, 40+ providers**<br />
Quota, balance, analytics, and auth status side by side, with a fleet overview
of average load, hottest provider, and next reset.

Expand All @@ -73,7 +73,7 @@ and reset time. Crowded bar? Drop the names and tighten the spacing.
<td valign="top">

**🤖 Deep local telemetry**<br />
Claude, Codex, 9Router, pi, and Hermes add token, cost, model, and project
Claude, Codex, OpenCode, 9Router, pi, and Hermes add token, cost, model, and project
analytics with a seven-day chart — read from data already on your disk. Track
several Claude accounts side by side, each from its own `CLAUDE_CONFIG_DIR`.
Claude and Codex also show credits, extra usage and limit resets, and can
Expand Down Expand Up @@ -152,14 +152,14 @@ Prefer a release archive or a git checkout? See [Installation](./docs/installati

## 🧩 Providers

| Coverage | What you get | Examples |
| ------------------ | ---------------------------------------- | ------------------------------------------------------- |
| **Quota** | Real usage % and reset time | Codex, Copilot, Antigravity, OpenRouter, Z.ai, GLM, xAI, Gemini CLI |
| **Balance** | Remaining prepaid credit | Kimi, DeepSeek, Neuralwatt, Cline, Ollama Cloud, Vercel AI Gateway |
| **Analytics** | Tokens, cost, and models from local data or spend reports | Claude, 9Router, pi, Hermes, Cloudflare, Anthropic API, OpenAI API |
| **Authentication** | Credential check, no usage numbers | Gemini, Mistral, Qwen, Groq, Cohere |
| **Local runtime** | Local models and sessions | Ollama, Vertex AI |
| **Informational** | A link to the official usage page | Cursor, Kiro, Warp, Perplexity |
| Coverage | What you get | Examples |
| ------------------ | --------------------------------------------------------- | ---------------------------------------------------------------------- |
| **Quota** | Real usage % and reset time | Codex, Copilot, Cursor, Antigravity, OpenRouter, Z.ai, xAI, Gemini CLI |
| **Balance** | Remaining prepaid credit | Kimi, DeepSeek, Neuralwatt, Cline, Ollama Cloud, Vercel AI Gateway |
| **Analytics** | Tokens, cost, and models from local data or spend reports | Claude, 9Router, pi, Hermes, Cloudflare, Anthropic API, OpenAI API |
| **Authentication** | Credential check, no usage numbers | Mistral, Qwen, Groq, Cohere, NVIDIA |
| **Local runtime** | Local models and sessions | Ollama, Vertex AI |
| **Informational** | A link to the official usage page | Kiro, Warp, Perplexity, Amp |

The full list, data sources, and credentials are in [Providers](./docs/providers.md).

Expand All @@ -172,26 +172,29 @@ The full list, data sources, and credentials are in [Providers](./docs/providers

## 📚 Documentation

For the latest release, start with the [2.0.0 changes guide](./docs/releases/2.0.0.md).
New in 2.1: credits, extra usage, limit resets and the DankDash card — see the
[2.1.0 notes](./docs/releases/2.1.0.md). Coming from DMS 1.6? Read the
[2.0.0 upgrade guide](./docs/releases/2.0.0.md).
See [cost currency and privacy](./docs/currency.md), [runtime module boundaries](./docs/refactoring.md),
and [protected PR/release rules](./docs/repository-rules.md).

| | |
| -------------------------------------------- | ---------------------------------------------------- |
| [Usage](./docs/usage.md) | Pill, popout, cards, keyboard, IPC, history, privacy |
| [Installation](./docs/installation.md) | Store, archive, and git installs; upgrades |
| [Configuration](./docs/configuration.md) | Every setting, environment variables, health checks |
| [Providers](./docs/providers.md) | Coverage matrix and per-provider data sources |
| [Troubleshooting](./docs/troubleshooting.md) | Missing cards, credentials, notifications |
| [Architecture](./docs/architecture.md) | Runtime flow and the adapter contract |
| [Translations](./docs/i18n-crowdin.md) | Locales and Crowdin |
| [Contributing](./CONTRIBUTING.md) | Local checks and conventions |
| [Governance](./GOVERNANCE.md) | Decisions, roles, code review, continuity |
| [Roadmap](./docs/roadmap.md) | What is planned for the next year, and what is not |
| [Security model](./docs/security.md) | Security requirements and assurance case |
| [Security policy](./.github/SECURITY.md) | Reporting vulnerabilities, verifying releases |
| [Code of conduct](./CODE_OF_CONDUCT.md) | Contributor Covenant 2.1 |
| [Changelog](./CHANGELOG.md) | Release history |
| | |
| ------------------------------------------------ | ---------------------------------------------------- |
| [Usage](./docs/usage.md) | Pill, popout, cards, keyboard, IPC, history, privacy |
| [Installation](./docs/installation.md) | Store, archive, and git installs; upgrades |
| [Configuration](./docs/configuration.md) | Every setting, environment variables, health checks |
| [Providers](./docs/providers.md) | Coverage matrix and per-provider data sources |
| [Troubleshooting](./docs/troubleshooting.md) | Missing cards, credentials, notifications |
| [Architecture](./docs/architecture.md) | Runtime flow and the adapter contract |
| [Translations](./docs/i18n-crowdin.md) | Locales and Crowdin |
| [Contributing](./CONTRIBUTING.md) | Local checks and conventions |
| [Development gates](./docs/development-gates.md) | Tests, statement coverage, fuzzing and CI gates |
| [Governance](./GOVERNANCE.md) | Decisions, roles, code review, continuity |
| [Roadmap](./docs/roadmap.md) | What is planned for the next year, and what is not |
| [Security model](./docs/security.md) | Security requirements and assurance case |
| [Security policy](./.github/SECURITY.md) | Reporting vulnerabilities, verifying releases |
| [Code of conduct](./CODE_OF_CONDUCT.md) | Contributor Covenant 2.1 |
| [Changelog](./CHANGELOG.md) | Release history |

## 💜 Support the project

Expand Down
31 changes: 17 additions & 14 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ the coverage-measurement fix and the 2.1 documentation.
`plugins/bernardopg-aioverviewcontrol.json`, so DMS 1.6 users keep 1.22.0.
Open as
[duxlabs-dev/dux-plugin-registry#1095](https://github.com/duxlabs-dev/dux-plugin-registry/pull/1095),
waiting for the registry maintainers. It states 39 providers: update the
description to 43 after 2.2.0 ships. `S · ★★★`
waiting for the registry maintainers. The description says "40+ AI
providers", so it only changes when the catalog reaches 50. `S · ★★★`
- [~] **Live check of the new spend providers** — Anthropic API, OpenAI API,
Ollama Cloud and Vercel AI Gateway are tested against the documented example
responses only; no account was available. Run each card once with a real key
Expand All @@ -38,18 +38,11 @@ the coverage-measurement fix and the 2.1 documentation.
accounts since 2026), but the per-model buckets of a Code Assist Standard or
Enterprise project are only fixture-tested from the CLI's
`RetrieveUserQuotaResponse` type. Verify with a licensed account. `S · ★★`
- [~] **Weakest coverage files** — total shell statement coverage is 90.13%
(gate 80%). Below 80%, measured 2026-10-26:
`providers/get-hermes-analytics` 66.67%, `providers/native/hermes.bash`
71.88%, `providers/reset-provider-limits` 71.88% (Claude sign-in and HTTP
error branches), `providers/native/opencode.bash` 72.22%,
`providers/get-local-analytics` 75.00%. The Hermes and OpenCode figures are
understated by the kcov limitation below. `M · ★★`
- [ ] **Report the kcov line-tracking bug upstream** — kcov loses line
tracking after a command whose multi-line quoted argument contains a single
quote; reproducers are in `docs/development-gates.md`. File it at
SimonKagstrom/kcov, then drop the caveat when a fixed kcov reaches Arch.
`S · ★`
- [~] **Last uncovered statements** — total statement coverage is 97.8%
(gate 95%). The rest are hard-to-reach paths: killing a stuck Codex
app-server, a 10 s exchange-rate lock timeout, curl network failures in
`get-claude-usage`, and Antigravity and xAI account-error branches. Cover
them when a test can fake the condition cheaply. `M · ★`

## Providers — Data & Auth

Expand Down Expand Up @@ -98,6 +91,11 @@ No work starts until a read-only source exists. Last check: 2026-10-26.
"Handler was registered but will not be used" for the extra ones. IPC works;
register the handler from one instance only to silence it. `S · ★`

- [ ] **Packaged kcov** — CI builds kcov from a pinned commit after 43,
which fixed lost bash line tracking after a multi-line quoted argument with
a single quote. Switch back to the Arch package once kcov 44 ships, and
update the local build note in `docs/development-gates.md`. `S · ★`

## Project health

- [ ] **Account successor** — designate a GitHub account successor for the
Expand All @@ -115,6 +113,11 @@ No work starts until a read-only source exists. Last check: 2026-10-26.
refresh and Hermes cache tests (#81).
- [x] **New providers** — Anthropic API, OpenAI API, Ollama Cloud and Vercel
AI Gateway, plus Gemini CLI quota and the ineligible-account reason (#82).
- [x] **Coverage to 97.8%** — the files below 80% (Hermes analytics and
summary, limit resets, OpenCode, local analytics) now at 100%; CI measures
with a kcov build that tracks multi-line SQL, and the gate rises to 95%.
- [x] **README refresh** — "40+ providers" prose, provider examples matching
the coverage matrix, 2.1 notes and the development gates.
- [x] **Dash plugin surface** — `AiOverviewDashCard.qml`, shipped in 2.1.0.

## Decided against
Expand Down
Loading
Loading