fix(dashboard): show every Supabase plan limit on the provider card
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- supabase, typescript
Hướng nghiên cứu
Start with allowanceGroups and buildAllowances in src/lib/dashboard/aggregate.ts, then read the Supabase metric keys in docs/providers/supabase.md. Add a unit test with two supabase.plan.* included allowances for one account in both row orders, and check Resend’s limit and used pairing. Done when every Supabase plan limit appears in stable order and Resend still shows one allowance with its used amount.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A Supabase provider card shows one plan limit per project, picked at random, and drops the rest.
The Supabase adapter stores up to seven included allowance metrics per project, all under the same supabase.plan. prefix (docs/providers/supabase.md, "Keys StackDash reads": supabase.plan.audit_log_retention, supabase.plan.log_retention, supabase.plan.edge_functions, supabase.plan.realtime_concurrent_users, supabase.plan.storage_max_file_size, plus the estimated supabase.plan.disk_size or supabase.plan.database_size and supabase.plan.monthly_active_users).
allowanceGroups (src/lib/dashboard/aggregate.ts, around line 435) groups included_allowance, remaining_allowance, and usage rows of one external account by the metric key without its last segment. Every supabase.plan.* key has the prefix supabase.plan, so all of a project's plan limits land in one group, and group.included ??= row keeps only the first. buildAllowances then emits one allowance per project from that row. Row order comes from loadSnapshots (src/lib/data/dashboard.ts, order("snapshot_date", desc).order("id", asc)), and id is a random UUID, so which limit a project shows depends on the ids its rows were given.
Seen while capturing evidence for a pull request: two workspaces with the same simulated Supabase data (same seed, same stored values for every supabase.plan.* row, checked in the database) showed different cards. One showed "Edge Functions" for Example app and "Monthly active users (estimated)" for Example app staging; the other showed "Realtime concurrent users" for both. Every other plan limit was missing from both cards.
The same grouping feeds allowancesToWatch and the quota projections, so they read the same one random limit per project.
Expected
Each stored Supabase plan limit is its own allowance on the card, in a stable order, as buildAllowances sorts them (account name, then label).
Fix (suggested)
Either give each Supabase plan limit a key whose prefix is unique to it (for example supabase.plan.edge_functions.limit), which needs a migration of stored keys and the docs table, or make the pairing rule treat an included_allowance with no matching used or remaining row as its own allowance keyed by its full metric key. The second keeps stored keys as they are; check that Resend's <prefix>.limit with <prefix>.used pairing still holds.
Acceptance criteria
- A Supabase project with N stored
supabase.plan.*included allowances shows N allowances on its provider card, whatever the row ids. - A unit test over
allowanceGroupsorbuildAllowanceswith twosupabase.plan.*rows for one account, in both row orders, gets both allowances. - Resend's paired allowance (limit with used) still shows as one allowance with its used amount.
Model: anthropic/claude-opus-5-5 | Reasoning effort: not reported by the harness
- Ngôn ngữ chính
- TypeScript
- Star
- 13
- Fork
- 2
- Merge trung bình
- 5 giờ 20 phút
- Pull request đã merge (30 ngày)
- 287
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eddiejaoude/StackDash#798 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ops documentation priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eddiejaoude/StackDash#796 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: docs documentation impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eddiejaoude/StackDash#790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ops bug impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eddiejaoude/StackDash#785 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: connections enhancement impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
eddiejaoude/StackDash#768 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eddiejaoude/StackDash
Issue tương tự
-
bot:ai-assisted component:midnight-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midnightntwrk/midnight-js#1790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:vscode bug has repro platform:macos platform:vscode regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
effort/l priority/p1 risk/high triage/core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
iflytek/skillhub#1188 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày