feat: distinguish expired/invalid tokens from generic errors on limit gauges#67
Merged
nigel-dev merged 1 commit intomaintokentopapp/tokentop:mainfrom Mar 8, 2026
feat/issue-29-error-categoriestokentopapp/tokentop:feat/issue-29-error-categoriesCopy head branch name to clipboard
Merged
feat: distinguish expired/invalid tokens from generic errors on limit gauges#67nigel-dev merged 1 commit intomaintokentopapp/tokentop:mainfrom feat/issue-29-error-categoriestokentopapp/tokentop:feat/issue-29-error-categoriesCopy head branch name to clipboard
nigel-dev merged 1 commit intomaintokentopapp/tokentop:mainfrom
feat/issue-29-error-categoriestokentopapp/tokentop:feat/issue-29-error-categoriesCopy head branch name to clipboard
Conversation
This was referenced Mar 8, 2026
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.
Summary
Replace the generic red
ERRindicator on provider limit gauges and provider cards with category-specific labels, colors, and icons so users can diagnose token/auth issues at a glance without leaving the dashboard.Changes
src/utils/error-category.tswithProviderErrorCategorytype,classifyProviderError()string classifier, andgetErrorCategoryDisplay()shared display helperLimitGauge.tsxto render category-specific error states:AUTH(yellow, ⚷ icon),RATE(yellow, ⧗),TIME(yellow, ⧗),CRED(yellow),NET(red),ERR(red, fallback)ProviderCard.tsx(Providers page) with the same category-aware treatment — status icon, status color, and error body all reflect the error categoryProviderLimitsPanel.tsxto passerrorCategorythrough toLimitGaugein all 3 layout modes (compact, normal, wide)RealTimeDashboard.tsxto computeerrorCategoryvia the classifier and pass it to the limits panelsrc/utils/__tests__/error-category.test.tscovering real error strings from all 11 provider pluginsType
feat— New featurefix— Bug fixrefactor— Code change that neither fixes a bug nor adds a featuredocs— Documentation onlychore— Build, deps, CI, or toolingtest— Adding or updating testsRelated issues
Closes #29
Testing
bun testpasses (109 tests, 0 failures)bun run typecheckpasses (0 errors)Error classification is tested against real error strings from all 11 provider plugins (Anthropic, OpenAI, Gemini, GitHub Copilot, Perplexity, Codex, Antigravity, Z.ai, MiniMax, Chutes, OpenCode Zen). Visual verification requires running with an expired/invalid token to trigger the new indicators.
Screenshots / captures
No captures yet — visual changes are best verified by running
ttopwith an expired OAuth token or invalid API key. The before/after:Before (all errors identical):
After (category-specific):