<feed xmlns='http://www.w3.org/2005/Atom'>
<title>strategy-lab.git/frontend/src/components, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>http://git.somhairle.bid/strategy-lab.git/atom?h=main</id>
<link rel='self' href='http://git.somhairle.bid/strategy-lab.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/'/>
<updated>2026-09-18T10:11:53+00:00</updated>
<entry>
<title>[实现方案] Status 组件升级 round6 三态模板：Skeleton 加载 / Alert 错误+重试 / 空态 CTA</title>
<updated>2026-09-18T10:11:53+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T10:11:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=63098a260dadf9e5d01650afb02570343abe20d9'/>
<id>urn:sha1:63098a260dadf9e5d01650afb02570343abe20d9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[变更性质] feat(frontend)</title>
<updated>2026-09-18T07:49:44+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T07:49:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=a7aab01f051487327e5ce52b6a8905208c546e8c'/>
<id>urn:sha1:a7aab01f051487327e5ce52b6a8905208c546e8c</id>
<content type='text'>
[新增功能] 12 页面组件全量 shadcn：Card/Button/Table/Tabs/Select/Alert；375 底部 Tab Bar 改用 Tabs 组件实现
[实现方案] 页面级手写 class 全部移除（.btn/.banner/table.data/.badge/.tabs/.metric-row/.m-tile/.hint 等改为 shadcn + tailwind 工具类）；Modal/DatasetWizard/DatasetCard/DiffView/CodeEditor/Status/Layout 同步
[影响范围] src/pages/*.svelte、src/components/*.svelte
</content>
</entry>
<entry>
<title>[变更性质] feat(frontend)</title>
<updated>2026-09-18T04:03:32+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T04:03:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=61f5c545953bb4ee20b123bf9671ac35d7f1f3c1'/>
<id>urn:sha1:61f5c545953bb4ee20b123bf9671ac35d7f1f3c1</id>
<content type='text'>
[新增功能] round3 页面组件全量迁移 shadcn-svelte（12 页面 + Modal/DatasetWizard/DatasetCard/Status）
[实现方案] .btn→Button、.banner→Alert、table.data→Table.Root、.badge→Badge、.tabs→Tabs.Root、.metric-card/form.card→Card.Root；ProjectStrategyTab div 配对修复
[影响范围] src/pages/*.svelte、src/components/*.svelte
</content>
</entry>
<entry>
<title>fix(frontend): AI 用量卡回归真实 /api/ai/usage totals.requests</title>
<updated>2026-09-18T02:05:56+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T02:05:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=47f8f15493f839e45d2176563397f25c40125fc4'/>
<id>urn:sha1:47f8f15493f839e45d2176563397f25c40125fc4</id>
<content type='text'>
[变更性质] 文案/注释更正（Leader 验收问题 3），无行为变化。
[问题说明] 复核 server/src/ai.rs list_ai_usage：端点本就返回 totals.requests（ai_usage COUNT）；前端 dashboardMetrics 一直消费该字段，此前 doc-todo 文案误称后端缺字段。
[修复方案] 更正 metric 卡 data-todo 与 dashboardMetrics 注释；占位 - 仅在端点未返回 totals 时兜底；本轮生产 usageRequests=0 → 显示"0 次"。
[影响范围] ProjectMetricRow.svelte、dashboardMetrics.ts 注释；vitest 75/75 不变。
</content>
</entry>
<entry>
<title>feat(frontend): 图表增强——网格、hover 当日净值/回撤、回测区间阴影带</title>
<updated>2026-09-18T01:51:10+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T01:51:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=ac55af50d93427b91db9f52415c3e7a749943420'/>
<id>urn:sha1:ac55af50d93427b91db9f52415c3e7a749943420</id>
<content type='text'>
[变更性质] 图表层能力扩展，前端重设计第二轮之三。
[新增功能] Chart 网格线使用主题 border 色；hover 手柄提示补充"当日净值+回撤"；回测区间 belowMarks 渲染半透明阴影带（bandShaded 可关）；series 支持 dashed/opacity，Area 填充渲染；equity 行内合并回撤列，drawdown 图改为百分比格式化。
[实现方案] 基于 layerchart marks/belowMarks 泳道与自定义 tooltip snippet（lcExtras 透传绕开字面量类型检查），宽度扩展点保持 resolvedWidth 合同不变。
[影响范围] Chart.svelte、ProjectResultsTab.svelte；图表 probe 断言（svgs 渲染、溢出为 0）不变。
</content>
</entry>
<entry>
<title>feat(frontend): 375px 底部 Tab Bar、窄标题栏与项目面包屑</title>
<updated>2026-09-18T01:50:57+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T01:50:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=4390ca3472b8a4a201835e358ad0ad2065e8b7c6'/>
<id>urn:sha1:4390ca3472b8a4a201835e358ad0ad2065e8b7c6</id>
<content type='text'>
[变更性质] 新增移动端导航形态，前端重设计第二轮之二。
[新增功能] ≤767px 呈现底部 Tab Bar（projects/datasets/runs/account 徽标+标签+aria-current）与窄标题栏（品牌/面包屑/账户），≥768px 原桌面布局不变；ProjectPage 顶部新增"我的项目/项目名/功能页"面包屑。
[实现方案] matchMedia('(max-width: 767px)') 反应式驱动的 （Safari &lt;14 兼容addListener 回退），tests 以 matchMedia stub 驱动真实渲染断言；保留 900px 既有断点结构以兼容 mobileCss.test.ts 正则。
[影响范围] Layout.svelte、ProjectPage.svelte；新增 mobileTabbar.test.ts。
</content>
</entry>
<entry>
<title>feat(frontend): 首页指标卡与项目行 sparkline（前端重设计第二轮之一）</title>
<updated>2026-09-18T01:50:37+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T01:50:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=0b1ad75571b312dd60f9ae0099b47cc02ac54c78'/>
<id>urn:sha1:0b1ad75571b312dd60f9ae0099b47cc02ac54c78</id>
<content type='text'>
[变更性质] 新增能力，不动后端。
[新增功能] dashboardMetrics 聚合（项目/数据集/实验/AI 用量统计 + 最近回测首末净值），实盘数据优先、缺数以占位符 '-' 兜底；ProjectMetricRow 渲染 4 张 metric-card；Sparkline 组件输出 up/down 方向线段与端点圆点。
[实现方案] 聚合逻辑与展示组件分离，sparkline 仅依赖 first/last 两个字段，无图表库依赖。
[影响范围] frontend/src/lib 与 components；配套 5 组单测（dashboardMetrics/sparkline/metricRow）。
</content>
</entry>
<entry>
<title>feat(frontend): 结果/实验/策略/数据页迁移 shadcn 与新 Chart API</title>
<updated>2026-09-18T00:26:57+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T00:26:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=45ecb4e9dfe225bc982e9af9315590bcb0783df7'/>
<id>urn:sha1:45ecb4e9dfe225bc982e9af9315590bcb0783df7</id>
<content type='text'>
[变更性质]
四个业务标签页与数据集卡片迁移 shadcn 组件，图表消费切换到
layerchart 长格式 API，功能与数据语义不变。

[新增功能]
结果页权益曲线（策略权益/现金/基准，基准可缺省）与回撤曲线（desc
面积）改由 Chart.svelte data/series 渲染；实验记录页多回测归一对比
曲线改为快速长格式行构造。空数据行允许 undefined 列（基准缺口），
Chart data 类型放宽 [key:string]: string|number|undefined。

[实现方案]
RunsPage：查看入口改 shadcn Button（href 语义保留 hash 路由），
对比图数据由 compareOption（echarts option）化为 compare。
ProjectResultsTab：图表开关、日志折叠用 Button；equityData/
drawdownData $derived 计算峰值回撤。ProjectStrategyTab：快照输入、
冲突/AI/版本操作迁移 Button/Input。ProjectDataTab 与 DatasetCard：
shadcn 组件 + 保留 banner error/warn/info、retry-row 等 legacy class，
"使用相同请求重新获取"重试入口与 onRecreated 逻辑不变，配套
datasetCardRetry/datasetCardWarnings/projectDataTabRecreated 回归
测试。resultsAccounting.test.ts：layerchart 在 jsdom 挂载约 3 秒，
suite 全量下易撞默认 5s 超时，首测提高至 20s。

[影响范围]
npm run check 0 error、58 tests 全绿、npm run build 通过；真浏览器
375/768/1440 图表页零溢出（artifacts/ui-shadcn 截图与探针 JSON）。
</content>
</entry>
<entry>
<title>feat(frontend): 图表层从 echarts 迁移 layerchart（新长格式 Chart API）</title>
<updated>2026-09-18T00:26:47+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T00:26:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=33cac3eef7d9962d8803cd812553549d6f555516'/>
<id>urn:sha1:33cac3eef7d9962d8803cd812553549d6f555516</id>
<content type='text'>
[变更性质]
图表渲染引擎替换，渲染输出保持同等信息（曲线/图例/轴），删除
echarts 在后续页面迁移后正式退场。

[新增功能]
新 Chart.svelte 封装 layerchart LineChart，API 为长格式 data（
{i, date, ...columns}）+ series（key/label/value/color/dashed/area）。

[实现方案]
宽度语义与旧 echarts 包装一致：ResizeObserver 实测宿主宽度优先，
width prop 只是初始/测试尺寸，640 为无布局回退——SVG 永远跟随宿主，
绝不粘滞桌面宽度。runes 模式的关键坑：measured 必须 $state，否则 RO
回调触发的宽度更新不会重渲染（旧 echarts 版本为命令式 API 无此问题）。
chartResize.test.ts 以 layerchart 真渲染重写 4 个合同用例：jsdom 真实
SVG、width prop 跨视口变更、无重挂载的 in-place RO 收缩、零布局宿主
RO 回调不抛错。test-setup.ts 增加 window.matchMedia shim（layerchart
settings 上下文需要）并移除因此失效的 @ts-expect-error。

[影响范围]
回测结果/对比曲线等消费方在后续页面提交中切换到本 API；svelte-check
对 layerchart 复杂泛型以 as never 收口，0 error。
</content>
</entry>
<entry>
<title>feat(frontend): 布局/认证/项目页迁移 shadcn 并修复 375px 溢出</title>
<updated>2026-09-18T00:26:37+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-18T00:26:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/strategy-lab.git/commit/?id=60640dfa981e419cf86413c924fd26822bd42327'/>
<id>urn:sha1:60640dfa981e419cf86413c924fd26822bd42327</id>
<content type='text'>
[变更性质]
本提交为 UI 迁移与移动端布局修复，产品功能不变。

[新增功能]
Leader 第 2 轮验收的失败项：AuthPages 在 375px 视口横向溢出 47px，
原因为 .auth-card 固定 400px 宽度。

[实现方案]
AuthPages：.auth-wrap 改为 flex 包裹，.auth-card 改用
width:min(400px,100%)，三档视口下登录/注册/重置均零溢出。
Layout.svelte 重写为 shadcn Button（退出按钮）+ Tailwind 主题变量，
同时保留 .layout/.content/.navlink/.brand 等 legacy class 以维持
mobileCss.test.ts 的断言语义。ProjectsPage 迁移 shadcn Card/Table 等
（保留 p-name 链接语义），新增 projectsPageLoad.test.ts 回归项目列表
加载失败时的错误呈现。

[影响范围]
frontend/src/components/Layout.svelte、pages/AuthPages.svelte、
pages/ProjectsPage.svelte；视觉验证覆盖 375/768/1440 全零溢出。
</content>
</entry>
</feed>
