ADORSYS-GIS / ADORSYS-GIS/converse-frontends
[Ticket]: Honest unavailable states on every usage panel
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 49 phút
- Pull request đã merge (30 ngày)
- 253
Mô tả
### Type
Feature
### Summary
Render an explicit inline status when the usage backend is unreachable or unconfigured.
### Intent
So an operator is never shown a chart that implies zero usage when the truth is unknown.
### Source of truth (links)
- `apps/console/src/app/api/usage/[...path]/route.ts` (already answers 503 by design)
### Current Behavior
The proxy already returns a deliberate 503 when `USAGE_URL` is unset, but no panel renders that state.
### Expected Behavior
Every usage panel distinguishes unavailable from zero, in words.
### Acceptance Criteria
- [ ] A 503 renders an inline status line naming the reason
- [ ] Zero usage and unknown usage are visually distinct
- [ ] Empty states are inline status lines, not centered placards
- [ ] No spinner persists indefinitely on a failed request
### Out of Scope
Retry or caching behaviour.
### Technical Context
House design rule: empty states are inline status lines unless the screen has nothing else to do.
### Risks
This is the failure mode the whole epic exists to avoid. An empty chart presented as data is a wrong answer, not a missing one.
### Test Plan
Component test with the proxy forced to 503; assert the status text renders and no chart is drawn.
### Verification evidence
- [ ] Test added and proven to fail before the change
- [ ] `just all-checks` green
- [ ] Every new or changed `src` file is <= 200 LoC
### Human accountable owner
@stephane-segning
### AI Usage Declaration
Ticket drafted with AI assistance from a verified repo audit.
Structure and estimates drafted with AI from a verified repository audit (file
line counts, config keys, and dependency state were read from the actual tree,
not assumed). A human owns intent, scope, and the release commitment.
### Human verification completed
- [ ] I can explain this work without referring to the AI-generated text
- [ ] Acceptance criteria are testable
- [ ] Source of truth is a real link, not boilerplate
Governance: https://adorsys-gis.github.io/ai-governance/
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with apps/console/src/app/api/usage/[...path]/route.ts, then locate the usage-panel components and their component-test entry points. Force the proxy to return 503 and verify each panel renders an inline reason, distinguishes zero from unknown usage, draws no chart, and stops loading; run just all-checks afterward.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100