Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(usage): count Pi sessions and group usage by model family #15889

Closedastarktc(GitHub profile, opens in a new tab)wants to merge 11 commits intomain fromrefs/pull/15889/headopened View on GitHub

Showing 47 changed files with 34 additions and 19 deletions (loading 45).

x
0 of 47 viewed, 47 left
15 additions and 10 deletionsapps/mobile/src/features/usage/UsageDailyChart.ios.tsxModified
View file
@@ -5,35 +5,40 @@
import type { DailyTotals } from "@t3tools/shared/usageMerge";
​
import { buildChartDays, type UsageChartMetric } from "./usageChartData";
-import { useProviderColors } from "./usageProviders";
+import type { UsageSeries } from "./usageProviders";
​
export interface UsageDailyChartProps {
readonly days: readonly string[];
readonly daily: readonly DailyTotals[];
+ /** Stacked bottom first: harnesses or model families. */
+ readonly series: readonly UsageSeries[];
readonly metric: UsageChartMetric;
readonly height: number;
​
/**
* Native Swift Charts daily bars. Points sharing an x value stack, so emitting
- * one point per provider per day yields per-provider bands whose stack height
+ * one point per series per day yields per-series bands whose stack height
* is the day's total; changes animate natively.
* Axes are hidden: 30-90 categorical day labels cannot fit on a phone, so the
* screen renders its own edge labels under the chart instead.
*/
-export function UsageDailyChart({ days, daily, metric, height }: UsageDailyChartProps) {
- const colors = useProviderColors();
-​
+export function UsageDailyChart({ days, daily, series, metric, height }: UsageDailyChartProps) {
const data = useMemo((): ChartDataPoint[] => {