fix: remove all-time usage stats from functions, sites, and storage#3013
fix: remove all-time usage stats from functions, sites, and storage#3013HarshMN2345 wants to merge 4 commits intomainfrom
Conversation
…d storage The *Total fields returned by the API represent all-time entity counts (databases, buckets, files, deployments) that do not change with the selected date range. Showing these alongside period selectors caused customer confusion when comparing against billing stats. - Remove Usage tab and page content for functions, sites, and storage sections where only all-time counts were displayed - Keep databases usage page with reads/writes (period-specific) - Keep individual function usage page with executions and GB hours (period-specific) - Fix typo in function header tab event name (sage -> usage)
Greptile SummaryThis PR removes all-time entity-count usage stats (deployments, buckets, files) from functions, sites, and storage — fixing customer confusion when these non-time-ranged totals appeared alongside period selectors. It also fixes a typo (
Confidence Score: 4/5Safe to merge for functions/sites/storage changes, but the databases reads/writes removal contradicts the stated intent and should be confirmed before merging. One P1 finding: databases reads/writes (period-specific) are removed despite the PR description explicitly saying to preserve them. All other changes (functions, sites, storage) are clean and well-scoped. databases/database-[database]/usage/[[period]]/+page.svelte, databases/usage/[[period]]/+page.svelte, databases/database-[database]/header.svelte, databases/header.svelte Important Files Changed
Reviews (2): Last reviewed commit: "fix: remove databases reads/writes usage..." | Re-trigger Greptile |
Stop unnecessary API calls on usage routes that no longer render anything. Replace each loader with an empty return and remove leftover export let data bindings from the page components.
| <script lang="ts"> | ||
| import { Container, UsageMultiple } from '$lib/layout'; | ||
|
|
||
| export let data; | ||
|
|
||
| $: reads = data.databaseReads; | ||
| $: readsTotal = data.databaseReadsTotal; | ||
|
|
||
| $: writes = data.databaseWrites; | ||
| $: writesTotal = data.databaseWritesTotal; | ||
| import { Container } from '$lib/layout'; | ||
| </script> | ||
|
|
||
| <Container databasesMainScreen> | ||
| <UsageMultiple | ||
| title="Reads and writes" | ||
| showHeader={false} | ||
| total={[readsTotal, writesTotal]} | ||
| count={[reads, writes]} | ||
| legendNumberFormat="abbreviate" | ||
| legendData={[ | ||
| { name: 'Reads', value: readsTotal }, | ||
| { name: 'Writes', value: writesTotal } | ||
| ]} /> | ||
| </Container> | ||
| <Container></Container> |
There was a problem hiding this comment.
Databases reads/writes removed despite PR description
The PR description explicitly states "Keep databases usage page with reads/writes (period-specific)", but both the individual database usage page (this file) and the top-level databases/usage/+page.svelte have been emptied, and their nav tabs removed from both databases/database-[database]/header.svelte and databases/header.svelte. Unlike the all-time entity counts removed from functions/sites/storage, database reads and writes are period-specific and directly meaningful for billing comparison — exactly the data the PR says should be preserved.
There was a problem hiding this comment.
@eldadfux should I remove them?
They are correct and are from time period 1st-30th of each month
The *Total fields returned by the API represent all-time entity counts (databases, buckets, files, deployments) that do not change with the selected date range. Showing these alongside period selectors caused customer confusion when comparing against billing stats.
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)