Добавить глобальную настройку показа 7-дневных трендов - #154
Merged
Conversation
showUsageTrends в AppSettingsStore/LimitsViewModel (default true) и Toggle в DisplaySettingsSection. Гейтинг — в PopupContentBuilder: при выключенном флаге .sparkline заменяется компактной .note-строкой, .window (remaining/reset) не трогается. Темы и ProviderOverview про флаг не знают — один переключатель действует на все четыре темы и обе поверхности без правок в UI-слое. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Analysis CompleteGenerated ECC bundle from 1 commits | Confidence: 50% View Pull Request #155Repository Profile
Changed Files (12)
Top hotspots
Top directories
Analysis Depth Readiness (commit-history, 21%)ECC Tools uses this to decide whether recommendations should stay at commit-history/setup guidance or expand into CI, security, harness, reference-set, AI-routing, and team backlog work.
Reference Set Readiness (0/7, 0%)
Likely Future Issues (1)
Suggested Follow-up Work (1)
Copy-ready bodies test: add budget evidence for CLAUDE.md ## Summary
- Add budget or usage-limit validation for the recently changed AI routing or model-call surface.
## Why
- Backfill cost, token, or usage-limit validation before another model-routing change lands on the touched surface.
## Touched paths
- `CLAUDE.md`
## Validation
- Add or extend budget, token, usage-limit, or model-routing regression coverage for the changed path.
- Verify the route still enforces plan limits, retry caps, fallback behavior, or explicit cost controls.Generated Instincts (5)
After merging, import with: Files
|
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.
Закрывает bd mac-limits-tracker-gld.4 (P2), эпик mac-limits-tracker-gld.
График за 7 дней полезен для анализа, но в компактном попапе и на dashboard с несколькими провайдерами занимает много вертикального места. Нужен один способ его скрыть — без разных настроек и разного поведения в каждой теме.
Что сделано
AppSettingsStore.showUsageTrends— persistedBool, дефолтtrueчерезobject(forKey:) as? Bool ?? true, чтобы отсутствующий ключ был отличим от сохранённогоfalse. Тот же паттерн, что уautoRefreshEnabled.LimitsViewModel.showUsageTrends(@Published) плюсsetShowUsageTrends(_:)— только персистит и обновляет состояние, refresh и сеть не трогает. UI кUserDefaultsне обращается.showTrendsпрокинут черезPopupContentBuilder.section/sections/rows/usageRows/windowRows. Приfalseстрока.sparklineзаменяется компактной.note. Темы иProviderOverviewпро флаг не знают вовсе — поэтому одна настройка одинаково действует на все четыре темы и обе поверхности..ok— «7d: старт% → текущий%»; для sparse/gap/stale — тот жеfallbackText, что показываетUsageTrendViewрядом с маркерами;.emptyпо-прежнему молчит, чтобы не шуметь. Строка с remaining/reset от флага не зависит.Toggle("Show 7-day usage trends")вDisplaySettingsSectionс accessibility label, в существующем порядке контролов и surface-aware плотности.CLAUDE.md— механизм описан в «Conventions & Patterns».Тесты
13 новых, TDD:
AppSettingsStoreTests— дефолтtrue, round-trip, сохранённыйfalseне откатывается кtrue.LimitsViewModelDisplaySettingsTests— дефолт, чтение при инициализации, сеттер обновляет@Publishedи персистит, и отдельноtest_setShowUsageTrends_doesNotTriggerRefreshсо счётчикомfetch().PopupContentBuilderShowTrendsTests— по умолчанию вставляется.sparkline; приshowTrends: falseпоявляется компактная note; строка окна идентична независимо от флага; sparse-данные дают тот жеfallbackText; отсутствие истории молчит в обоих режимах.swift test --disable-sandbox— 585 тестов, 0 сбоев.Границы
Приложение не запускалось, скриншотов и AX-прогонов нет — по правилу эпика визуальная проверка выполняется только в mac-limits-tracker-gld.5. Туда же остаётся проверить перенос компактной строки на длинных подписях окон в узкой menu-bar плотности и озвучку нового переключателя.
🤖 Generated with Claude Code