✨ feat(pricing): surface newly discovered models awaiting price sync - #793
Merged
Merged
Conversation
Add read-only runtime model pricing status endpoint in manager-server and low-friction model price attention notifications across Monitoring, Dashboard, and Usage Analytics. - manager-server: expose GET /v0/management/model-prices/runtime-models to discover unpriced models from CPA runtime without mutating database or calling external pricing sources - web: add modelPriceAttention store with localStorage isolation, 30m cache, and tab-focus refresh - web: add unified ModelPriceAttentionLink component and wire into MonitoringActionBar, Dashboard UsageMetricsCard, and Usage Analytics - web: update ModelPricesPage to support ?filter=missing, display pending sync badge, and acknowledge attention on sync - tests: add end-to-end unit and integration tests across server and web
…acknowledgment, and deep-link filter - only acknowledge pending models that actually participated in fallback sync - add scope generation guard against cross-connection races and stale in-flight responses - bind attention snapshots to manager server scope - throttle failed discovery retry attempts to 30 minutes - decouple ?filter=missing from ongoing tab selection in ModelPricesPage - trigger background forced attention re-check after saving manual model price - add regression tests covering fallback acknowledgment, scope switches, and throttle
This was referenced Sep 16, 2026
19 tasks
Link-Start
pushed a commit
to Link-Start/CPA-Manager-Plus_seakee
that referenced
this pull request
Sep 17, 2026
…card ownership PR seakee#793 introduced global model price attention across Monitoring, Dashboard, and Usage Analytics. However, the inline variant rendered variable-length localized text, causing container overflow and truncated titles in high-density cards across different languages. Additionally, UsageSummaryCardView implicitly tied attention visibility to icon === 'cost', leaking alerts into shared components (e.g. Accounts Overview) and creating duplicate attention indicators when multiple cost cards were present. - Lock ModelPriceAttentionLink inline variant to a fixed 24x24px footprint using IconDollarSign with a compact absolute-positioned amber attention dot. - Remove visible localized label text from the inline variant while preserving full tooltip and aria-label semantic attributes. - Keep Monitoring action-bar variant layout and localized label unchanged. - Decouple attention visibility from icon === 'cost' by adding explicit showModelPriceAttention?: boolean to UsageSummaryCard. - Designate exactly one primary cost card per Usage Analytics summary group as the attention owner, eliminating duplicate indicators. - Add flex: 0 0 auto defense on attention containers in Dashboard and Usage Analytics to prevent flex compression across viewport breakpoints. - Update and expand unit, integration, and builder test suites.
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
Surfaces newly discovered runtime models awaiting price sync across Monitoring, Dashboard, and Usage Analytics with low friction.
Unifies model price attention notifications to indicate that newly discovered models have not yet undergone a price sync check, strictly decoupled from cost calculation logic.
Scope
Changes
modelprice):GET /v0/management/model-prices/runtime-modelsto discover runtime models without database writes or external pricing calls.DiscoverRuntimeModels(ctx)and implementRuntimeModelPricingStatus(ctx)with model normalization, sorting, 5s timeout, and unpriced detection against existing prices.apps/web/src/features/model-price-attention):ModelPriceAttentionStorewith localStorage isolation (cpamp-model-price-attention-v1) keyed by manager server base URL.runtimeModels,unpricedModels,pendingModels,loading,lastCheckedAtMs) when the base URL changes, allowing fresh checks on the new connection.ModelPriceAttentionSnapshot) to avoid acknowledging pending models across different environments.lastAttemptAtMs, while allowingforce: trueto bypass throttling.apps/web):ModelPriceAttentionLinkcomponent supportingaction-barandinlinevariants with Amber status dots and tooltips.MonitoringActionBar, DashboardUsageMetricsCard, and Usage AnalyticsUsageSummaryCards.ModelPricesPage:?filter=missingdeep link as an initial selection without locking ongoing tab switching.resolveAcknowledgedPendingModelsAfterSync: when runtime discovery fails and sync falls back to known models, only acknowledgependingSnapshot ∩ syncModelsto prevent falsely clearing runtime-only pending models.en,zh-CN,zh-TW, andru.User Impact
Users will see an amber dot indicator next to "Model Prices" when newly discovered runtime models have not yet been checked for pricing. Clicking the link takes them to the Model Prices page with the missing filter active. Clicking "Sync Prices" executes price discovery and sync, immediately clearing the global indicator once synced.
Compatibility / Runtime Notes
/v1/modelsfrom CPA runtime using the existing 5s timeout and CPA discovery credentials.AuthorizePanelto protect the read-only status endpoint.Data / Security Notes
No database migration, no secret credentials exposed, and no new background schedulers. The discovery status endpoint is strictly read-only and cached client-side.
Risk / Rollback
Risk level: Low
Rollback notes: Reverting this PR restores previous behavior where newly discovered models do not trigger proactive sync attention. No database migrations to undo.
Verification
Commands / evidence:
Screenshots / Recordings
N/A (covered by comprehensive unit and integration tests)
Docs
Docs decision: Internal UI feature addition; release notes will be generated automatically during standard release flow.
Related
Refs #515
Refs #792