chore: land in-progress workspace changes before 1.16.2

The tree carried uncommitted work from several areas (web push, mobile
screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed
as one commit so the release pipeline can start from a clean tree; the
desktop transcript-correction behaviour shipped in the previous commit and
is unchanged here.
This commit is contained in:
Yun Chan 2026-11-05 21:58:44 +09:00
parent 9c2b6a9782
commit 7fe49c437e
144 changed files with 3760 additions and 4523 deletions

View file

@ -1,60 +0,0 @@
'use client'
// apps/admin/src/components/charts/dau-chart.tsx
// DAU/활성 유저 추이 — Line chart
import {
ResponsiveContainer,
LineChart,
Line,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
} from 'recharts'
import { Box } from '@mui/material'
import { d3roPalette, d3roFontMono } from '@d3ro/ui/theme'
interface DauRow {
date: string
active_users: number
}
interface DauChartProps {
data: DauRow[]
}
export function DauChart({ data }: DauChartProps): React.ReactElement {
return (
<Box sx={{ width: '100%', height: 250 }}>
<ResponsiveContainer>
<LineChart data={data}>
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
<XAxis
dataKey="date"
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
tickFormatter={(val: string) => val.slice(5)}
/>
<YAxis tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }} />
<Tooltip
contentStyle={{
background: d3roPalette.bg.card,
border: `1px solid ${d3roPalette.border.default}`,
fontFamily: d3roFontMono,
fontSize: 11,
color: d3roPalette.text.primary,
}}
/>
<Line
type="monotone"
dataKey="active_users"
stroke={d3roPalette.accent.main}
strokeWidth={2}
dot={{ fill: d3roPalette.accent.main, r: 3 }}
name="Active Users"
/>
</LineChart>
</ResponsiveContainer>
</Box>
)
}

View file

@ -1,88 +0,0 @@
'use client'
// apps/admin/src/components/charts/feature-usage-chart.tsx
// feature별 일간 API 호출 — StackedBar
import {
ResponsiveContainer,
BarChart,
Bar,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
Legend,
} from 'recharts'
import { Box } from '@mui/material'
import { d3roPalette, d3roFontMono } from '@d3ro/ui/theme'
interface FeatureUsageRow {
date: string
feature: string
total_count: number
unique_users: number
}
interface FeatureUsageChartProps {
data: FeatureUsageRow[]
}
const FEATURE_COLORS: Record<string, string> = {
llm_haiku: d3roPalette.accent.main,
llm_sonnet: d3roPalette.tag.green,
llm_opus: d3roPalette.tag.purple,
stt_transcribe: d3roPalette.tag.blue,
translate: d3roPalette.tag.blue,
}
const DEFAULT_COLOR = d3roPalette.text.secondary
export function FeatureUsageChart({ data }: FeatureUsageChartProps): React.ReactElement {
// Pivot: group by date, features as columns
const features = [...new Set(data.map(d => d.feature))]
const dateMap = new Map<string, Record<string, string | number>>()
for (const row of data) {
const existing = dateMap.get(row.date) ?? { date: row.date }
existing[row.feature] = row.total_count
dateMap.set(row.date, existing)
}
const chartData = [...dateMap.values()].sort((a, b) =>
String(a.date).localeCompare(String(b.date))
)
return (
<Box sx={{ width: '100%', height: 300 }}>
<ResponsiveContainer>
<BarChart data={chartData}>
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
<XAxis
dataKey="date"
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
tickFormatter={(val: string) => val.slice(5)}
/>
<YAxis tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }} />
<Tooltip
contentStyle={{
background: d3roPalette.bg.card,
border: `1px solid ${d3roPalette.border.default}`,
fontFamily: d3roFontMono,
fontSize: 11,
color: d3roPalette.text.primary,
}}
/>
<Legend wrapperStyle={{ fontFamily: d3roFontMono, fontSize: 11 }} />
{features.map((feature) => (
<Bar
key={feature}
dataKey={feature}
stackId="a"
fill={FEATURE_COLORS[feature] ?? DEFAULT_COLOR}
/>
))}
</BarChart>
</ResponsiveContainer>
</Box>
)
}

View file

@ -1,65 +0,0 @@
'use client'
// apps/admin/src/components/charts/top-users-chart.tsx
// 유저별 사용량 Top 20 — Horizontal bar
import {
ResponsiveContainer,
BarChart,
Bar,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
} from 'recharts'
import { Box } from '@mui/material'
import { d3roPalette, d3roFontMono } from '@d3ro/ui/theme'
interface TopUserRow {
user_id: string
name: string | null
total_count: number
feature_count: number
}
interface TopUsersChartProps {
data: TopUserRow[]
}
export function TopUsersChart({ data }: TopUsersChartProps): React.ReactElement {
const chartData = data.map(row => ({
name: row.name ?? row.user_id.substring(0, 8),
total: row.total_count,
features: row.feature_count,
}))
return (
<Box sx={{ width: '100%', height: Math.max(250, data.length * 28) }}>
<ResponsiveContainer>
<BarChart data={chartData} layout="vertical">
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
<XAxis
type="number"
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
/>
<YAxis
type="category"
dataKey="name"
width={100}
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
/>
<Tooltip
contentStyle={{
background: d3roPalette.bg.card,
border: `1px solid ${d3roPalette.border.default}`,
fontFamily: d3roFontMono,
fontSize: 11,
color: d3roPalette.text.primary,
}}
/>
<Bar dataKey="total" fill={d3roPalette.accent.main} name="Total Calls" />
</BarChart>
</ResponsiveContainer>
</Box>
)
}