Commit Graph
12 Commits
Author SHA1 Message Date
Tam Nhu Tran ca58cb5a08 fix(cliproxy): harden quota guards and review follow-ups 2026-02-22 02:35:07 +07:00
Tam Nhu Tran 8d9d4987dc feat(quota): add GitHub Copilot quota checks for ghcp and copilot 2026-02-20 22:32:27 +07:00
Tam Nhu Tran 945db1d690 feat(cliproxy): clarify codex effort mapping and preset UX 2026-02-14 11:31:18 +07:00
Tam Nhu Tran 40512fe338 fix(codex): stabilize code review window labeling 2026-02-14 06:28:48 +07:00
Tam Nhu Tran 1d2ee827fe fix(codex): infer code review cadence from reset window 2026-02-14 06:09:36 +07:00
Tam Nhu Tran f8af5a8c3c fix(codex): align quota display to 5h and weekly windows 2026-02-14 05:57:06 +07:00
kaitranntt 0b8635d3ba test(ui): add comprehensive tests for quota utility functions
Address PR review feedback - add tests for:
- getMinCodexQuota() / getCodexResetTime()
- getMinGeminiQuota() / getGeminiResetTime()
- getProviderMinQuota() / getProviderResetTime()
- Type guards (isAgyQuotaResult, isCodexQuotaResult, isGeminiQuotaResult)

Covers: empty arrays, null/undefined, edge cases (0%/100%/negative),
provider dispatch logic, and type discrimination.
2026-01-29 22:44:09 -05:00
kaitranntt 84ec43430d fix: resolve test import paths and vi.mock hoisting issues
- Fix import paths (5 '../' → 4 '../' for src imports)
- Fix test-utils import path (2 '../' → 3 '../')
- Fix vi.mock hoisting by inlining mock function
- Fix mockData scope in Privacy Mode test
- Fix test assertions (getByRole → querySelector, getByText → getAllByText)
- Add barrel export for getProjectDisplayName utility
2026-01-23 16:17:23 -05:00
Joseph Mearman c5911dde38 test: add project name display tests
- Add comprehensive tests for getProjectDisplayName function
- Test various path structures including worktrees, nested projects, and edge cases
- Include regression tests for the reported bug cases
- Create separate utility file for better testability

Fixes session stats display where wrong fragments were shown
Related to: #348 (quota display), #103 (context display)
2026-01-22 07:17:38 +00:00
kaitranntt 7b80dccdd3 fix(persist): add rate limiting, tests, and code quality improvements
- Add express-rate-limit to restore endpoint (5 req/min)
- Add JSDoc documentation to RestoreMutex class
- Extract magic numbers to named constants in BackupsSection
- Add unit tests for persist-routes.ts (23 tests)
- Add unit tests for BackupsSection component (28 tests)

Addresses PR #339 code review feedback.
2026-01-14 17:59:15 -05:00
kaitranntt a011908b3c fix(ui): show min Claude quota instead of avg all models
Main quota bar now displays minimum of Claude model quotas rather
than averaging all models. Accurately reflects primary constraint.

Changes:
- Add getMinClaudeQuota() utility in utils.ts (DRY)
- Apply fix to both account-card.tsx and account-item.tsx
- Add comprehensive test suite (23 tests covering edge cases)

Before: 99% (avg of Claude 95% + Gemini 100%...)
After: 95% (min of Claude models)
2026-01-01 14:44:30 -05:00
kaitranntt 3fca9338f9 test(ui): add vitest testing infrastructure with 99 unit tests
- add vitest, jsdom, testing-library, msw dependencies
- create test setup: vitest-setup.ts, test-utils.tsx, msw-handlers.ts
- add 99 unit tests covering settings, analytics, auth-monitor utils
- configure 90% coverage thresholds on pure-logic files
- add test scripts: test, test:run, test:coverage, test:ui
2025-12-21 03:28:34 -05:00