Commit Graph

67 Commits

Author SHA1 Message Date
Fam Zheng b2d70b2491 write(css): editor-pane 加 grid-template-rows: auto 1fr,title-row 不再占 50%
deploy write / build-and-deploy (push) Successful in 1m52s
2026-05-24 17:20:36 +01:00
Fam Zheng 7b868852d2 write(ui): 三栏宽度可拖拽 + localStorage 持久化
deploy articulate / build-and-deploy (push) Successful in 1m15s
deploy cube / build-and-deploy (push) Successful in 1m40s
deploy karaoke / build-and-deploy (push) Successful in 1m6s
deploy llm-proxy / build-and-deploy (push) Successful in 2m3s
deploy music / build-and-deploy (push) Successful in 2m16s
deploy notes / build-and-deploy (push) Successful in 2m2s
deploy simpleasm / build-and-deploy (push) Successful in 1m30s
deploy werewolf / build-and-deploy (push) Successful in 1m12s
deploy write / build-and-deploy (push) Successful in 1m54s
- sidebar | workspace 拖拽条:调整侧栏宽(180-500px)
- editor | preview 拖拽条:调整源码/预览比例(15%-85%)
- CSS var --sidebar-w / --editor-fr / --preview-fr 驱动 grid-template-columns
- 鼠标 down 开始 drag,move 实时算 px/dx,up 落盘 localStorage
- 移动端(<768px)自动隐藏拖拽条,回到 100% 切 tab 模式
2026-05-24 17:18:37 +01:00
Fam Zheng 9328c01c1b write: 进 cube 仓库 + 接 gitea CI 自动部署
deploy write / build-and-deploy (push) Failing after 4s
- 整 apps/write/ 进 git(含 frontend 源码 + Makefile + systemd unit + k8s service/ingress)
- .gitea/workflows/deploy-write.yml: act_runner fam 用户跑 host shell
    cargo build → npm build → install 到 ~/.local/bin/share/config →
    systemctl --user daemon-reload + restart → kubectl apply svc/ingress
- 前端 3 处"麻薯"字样去掉(思考中 / placeholder × 2)

注意 ~/.config/write/env 已有 passphrase,CI placeholder 逻辑会跳过不覆盖。
2026-05-24 17:16:44 +01:00
Fam Zheng f8a7f31427 notes(ui): 补 actions 按钮组 CSS(之前 commit 漏了 .action-btn 样式)
deploy notes / build-and-deploy (push) Successful in 1m49s
2026-05-18 01:51:51 +01:00
Fam Zheng 3f742352e2 notes(ui): 重跑/删除挪到标题右侧 actions 组,跟元数据分开排版
deploy notes / build-and-deploy (push) Successful in 2m4s
2026-05-18 01:51:12 +01:00
Fam Zheng 3e478228dd notes: done 状态也能 ↻ 重跑;有 transcript 自动跳过 ASR 只重跑 LLM
deploy notes / build-and-deploy (push) Successful in 1m40s
- 前端 retry 按钮去掉 status==failed 限制,总显示(中间态 disabled)
- backend process_recording 启动时看 transcript 有没有,有就直接 cleaning 起步,
  省 30 分钟录音那个 2-3 分钟的 ASR 切片串行
2026-05-18 01:44:11 +01:00
Fam Zheng e072109e91 notes: 加「 清理润色」block + 转写原文默认折叠
deploy notes / build-and-deploy (push) Successful in 1m47s
- backend: schema 加 cleaned 列;process_recording 流程
  ASR → cleaning (LLM 分段+去口语+润色+**加粗高亮**) → summarizing → done
- cleanup LLM 失败不阻塞,继续 summary
- 前端三 block 顺序:纪要 → 清理润色 → 原文(details 折叠)
- 新 status 'cleaning' 也加进 statusLabel / progressText
2026-05-18 01:22:33 +01:00
Fam Zheng ca11a9bda7 notes(asr): ffprobe duration=N/A 时回退用 ffmpeg null-muxer 解码统计
deploy notes / build-and-deploy (push) Successful in 1m58s
浏览器内 MediaRecorder 录的 webm/m4a 经常 metadata 没写 duration
(录到一半浏览器关掉 tab 没正常 finalize 文件)。ffprobe format.duration
返回 N/A。回退跑 `ffmpeg -i input -f null -`,从 stderr 最后一行
"time=HH:MM:SS.MS" parse 出实际秒数。慢一点但永远能拿到。
2026-05-18 00:40:23 +01:00
Fam Zheng a8e5100380 llm-proxy(ui): 修 placeholder token 泄漏 + UI 重做 + λ favicon
deploy llm-proxy / build-and-deploy (push) Successful in 1m46s
- 修:token 输入框 placeholder 之前硬编码了真实 token (`e.g.
  famzheng-llm-2026`),等于明文泄露。改成 `your auth token`
- UI 重做 — 100dvh 锁 viewport(处理移动软键盘)+ grid 布局
  让 thread 永远占中间、footer 永远贴底
- textarea autogrow(最高 200px,超出内部滚)
- 复制按钮 / smooth scroll-to-bottom (double rAF) /
  iOS momentum scroll / safe-area padding
- 错误状态独立 row,monospace + 红底
- λ favicon(紫蓝渐变 + 绿色在线点 + glow)— SVG include_str!
  进 binary,`/favicon.svg` + `/favicon.ico` 同源响应
2026-05-18 00:34:49 +01:00
Fam Zheng a5e97adf85 notes(ui): 加紫色渐变麦克风 favicon(含红色录音圆点)
deploy llm-proxy / build-and-deploy (push) Successful in 2m26s
deploy notes / build-and-deploy (push) Successful in 2m19s
2026-05-18 00:33:03 +01:00
Fam Zheng bcc8c3f484 notes: 启动时 resume 卡在 transcribing/summarizing/pending 的录音
deploy notes / build-and-deploy (push) Successful in 3m9s
pod 重启时 spawn 的 worker 进程内存丢,db 状态停留 → 死循环看不到进度。
启动加一段:扫 status IN (pending,transcribing,summarizing),重置成 pending,
逐个 spawn process_recording 重跑(ASR + LLM idempotent)。
2026-05-18 00:30:37 +01:00
Fam Zheng 1859512976 notes(ui): 选中录音同步到 URL ?id=N(可刷新/分享/前进后退)
deploy notes / build-and-deploy (push) Successful in 3m13s
2026-05-18 00:29:55 +01:00
Fam Zheng 857c0d5481 llm-proxy(app): gemma 反向代理 + token 鉴权 + /chat web UI
deploy articulate / build-and-deploy (push) Successful in 1m29s
deploy cube / build-and-deploy (push) Successful in 1m49s
deploy karaoke / build-and-deploy (push) Successful in 1m18s
deploy llm-proxy / build-and-deploy (push) Successful in 2m41s
deploy music / build-and-deploy (push) Successful in 3m6s
deploy notes / build-and-deploy (push) Successful in 2m40s
deploy simpleasm / build-and-deploy (push) Successful in 2m5s
deploy werewolf / build-and-deploy (push) Successful in 1m41s
新 service,ns `llm-proxy`,域 `llm.famzheng.me`。
- POST /v1/chat/completions — OpenAI 兼容透传到 mochi 同款 backend
  gateway (gemma-4-31b-it);一期强制 stream=false,SSE 留二期
- 鉴权: `Authorization: token <PROXY_AUTH_TOKEN>` 或同款 Bearer;
  常时间比较防 timing;空 expected 一律拒
- GET /chat — 自带极简 HTML chat UI(token 走 localStorage,
  附 curl example details);/ 跳转到 /chat
- Secrets `llm-proxy/proxy-credentials` 已 kubectl 手工创建:
  BACKEND_TOKEN (上游) + PROXY_AUTH_TOKEN (对外)
- 13 个 cargo test 覆盖 auth 多个 scheme / 边界 + body
  改写 (stream=false 强制注入)
2026-05-18 00:21:47 +01:00
Fam Zheng 34fa47f95f notes: 加重命名 — title 旁边 ✏️ 按钮 prompt 改名 (PATCH /api/recordings/:id)
deploy notes / build-and-deploy (push) Successful in 1m53s
2026-05-17 23:28:57 +01:00
Fam Zheng 674011ddf3 notes(feishu): 完整带 ~/.local/share/lark-cli/ 加密 token 进 sidecar
deploy notes / build-and-deploy (push) Successful in 2m4s
之前只 cp config.json (365B 索引),user OAuth token 实际加密存在
~/.local/share/lark-cli/{master.key, appsecret_*.enc, cli_*_*.enc}。
secret 改成捎带全部 4 个文件;initContainer cp 到 PVC 两个子目录;
sidecar mount /root/.lark-cli + /root/.local/share/lark-cli 两路。

server.py 撤回 --as user(带上 token 后能调 docs:document:create scope)。
2026-05-17 23:19:21 +01:00
Fam Zheng e7912f3547 notes(asr): LLM 顺手出会议标题,覆盖默认时间戳 title
deploy notes / build-and-deploy (push) Successful in 1m50s
prompt 加要求:第一行 `TITLE: <主题>` + `---` + 正文;backend parse
头两行,覆盖 recordings.title;summary 字段不含 title 行。
失败 fallback 不动 title。前端 sidebar/主视图自带 5s 轮询自动刷新。
2026-05-17 23:01:28 +01:00
Fam Zheng d964b46dbe cube(chat): apps.json 成 SSOT,注进 chatbot system prompt
deploy cube / build-and-deploy (push) Successful in 1m22s
前端 apps.ts 之前是 source of truth,后端 chatbot 只能用硬编码的
"werewolf / articulate / karaoke / music / simpleasm 等" 句式糊
弄 + 靠训练知识猜。改成 apps.json 当 SSOT:
- 前端 apps.ts 改为 import data from './apps.json'
- 后端 include_str! 同一份 → 解析渲染 markdown bullet 列表
  注进 system prompt,附带 slug / status / desc / url
- prompt 显式约束:只能基于列表事实回答,不存在的 app 直说没有
- 兜底:JSON 解析失败把 raw 文本喂 LLM,不让 chatbot 因为
  ssot 坏掉 500
- 10 个 cargo test(多覆盖 render_apps_list / prompt 含 apps)
2026-05-17 22:56:31 +01:00
Fam Zheng 1ee35b4d19 notes(asr): overlap 切片 + LLM 拼接去重
deploy notes / build-and-deploy (push) Successful in 2m7s
- ffmpeg 用 -ss/-t 顺序切 65s 段,stride 55s(10s overlap);单段 ≤70s 整段不切
- 串行喂外部 ASR 后,把全部 chunk_texts 喂一次 LLM 让它去重 + 修边界字
- 单段直接返回 naive,LLM 失败也 fallback naive,不卡流程
- sidecar 注入 LLM_GATEWAY/LLM_MODEL/LLM_TOKEN env
2026-05-17 22:47:06 +01:00
Fam Zheng 688ccdc76f notes(asr): 切片串行 ASR 绕单文件大小限制
deploy notes / build-and-deploy (push) Successful in 3m40s
ASR server 直接 500 拒绝大文件 (15MB / ~15min 4.7s 即返回 500),不是
处理超时。改成:sidecar 装 ffmpeg → /transcribe endpoint 把音频切 60s
段 → 串行调外部 ASR → 拼接 transcript。notes 主容器 call_asr 改成 POST
到 sidecar /transcribe(timeout 1h 给长录音留余地)。

- feishu sidecar Dockerfile + ffmpeg + requests
- server.py 加 TranscribeReq;fallback -c copy 失败时 re-encode AAC
- main.rs 删除 asr_url/asr_token 字段(now sidecar concern)
- k8s manifest: ASR_URL/ASR_TOKEN 从主容器移到 feishu sidecar env
2026-05-17 22:38:05 +01:00
Fam Zheng e5a87cc65f notes(feishu): lark-cli config 从 secret cp 到 PVC 子目录,可读可写 + 重启保留
deploy notes / build-and-deploy (push) Successful in 1m50s
initContainer cp /secrets/lark-cli/config.json → /data/lark-cli/config.json
(已存在不覆盖,保留运行时 refresh 过的 token);feishu sidecar 主容器
subPath mount data PVC 的 lark-cli/ 到 /root/.lark-cli,lark-cli 写 cache、
refresh 都落 PVC。
2026-05-17 22:28:19 +01:00
Fam Zheng e56e2138a8 notes(feishu): Dockerfile 加 curl(lark-cli npm postinstall 依赖)
deploy notes / build-and-deploy (push) Successful in 2m40s
2026-05-17 22:23:57 +01:00
Fam Zheng 68671784f6 notes: 加一键转飞书文档 (sidecar markdown-to-feishu)
deploy notes / build-and-deploy (push) Failing after 2m2s
- backend: POST /api/recordings/:id/feishu → 拼 markdown (总结在最上 + 附件链接到转录/录音 + 转写全文) → 写 /data/feishu-tmp/<id>/ → HTTP POST 到 feishu sidecar
- 复用:已有 feishu_doc_id 时 --update 同一个 doc,前端按钮文案变「↻ 重新生成」
- schema 加 feishu_doc_id + feishu_url 两列(ALTER TABLE 兼容旧 db)
- LLM prompt 改:行动项用 markdown checkbox `- [ ] 谁·做什么·何时`
- sidecar apps/notes/feishu: node:20 + python3 + python3-markdown + @larksuite/cli + COPY 自己的 markdown-to-feishu script + FastAPI /convert
- k8s: deployment 加 feishu container 共享 PVC;lark-cli-creds Secret 挂 /root/.lark-cli/config.json
- CI: 主 image --no-cache(cube 规矩),sidecar 保留 layer cache(chromium-free,但 apt/npm 也大)
- 前端: content 头部加「📤 一键转飞书文档」按钮;已转过显示飞书链接 + 按钮变重生成
2026-05-17 22:16:13 +01:00
Fam Zheng 3a34fbdfd8 notes(ui): polling 静默 refresh + 增量更新 list/selected,不再闪动
deploy notes / build-and-deploy (push) Successful in 1m50s
2026-05-17 22:08:42 +01:00
Fam Zheng eb7cd81395 notes: 回滚讲话人猜测 prompt,保持简单纪要格式
deploy notes / build-and-deploy (push) Successful in 1m58s
2026-05-17 22:08:08 +01:00
Fam Zheng 93039457a7 notes: title 全空时用「录音 YYYY-MM-DD HH:MM」;LLM 加猜讲话人 prompt
deploy notes / build-and-deploy (push) Successful in 1m43s
2026-05-17 22:03:20 +01:00
Fam Zheng 44652eb398 notes(record): 加浏览器内直接录音(绕 iOS 录音机 App 文件不可见)
deploy notes / build-and-deploy (push) Successful in 2m11s
- 「🎙️ 直接录」按钮:navigator.mediaDevices.getUserMedia({audio:true}) → MediaRecorder
- 录音中按钮变红 + 计时器 + 脉冲;点 ⏹ 停止自动上传
- mimeType 探测:Safari 用 audio/mp4,Chrome 优先 audio/webm/opus
- 文件名 录音-YYYY-MM-DD-HH-MM-SS.{m4a|webm}
- 原 + 文件 入口保留小型,作为电脑端兜底
2026-05-17 21:55:39 +01:00
Fam Zheng c2c0c6999d notes(ui): empty 提示箭头反过来
deploy notes / build-and-deploy (push) Successful in 2m19s
2026-05-17 21:53:39 +01:00
Fam Zheng 61abd3f560 notes: 新建 notes.famzheng.me — 录音 → ASR → LLM 会议纪要
deploy articulate / build-and-deploy (push) Successful in 1m21s
deploy cube / build-and-deploy (push) Successful in 1m44s
deploy karaoke / build-and-deploy (push) Successful in 1m13s
deploy music / build-and-deploy (push) Successful in 2m23s
deploy notes / build-and-deploy (push) Successful in 2m16s
deploy simpleasm / build-and-deploy (push) Successful in 1m44s
deploy werewolf / build-and-deploy (push) Successful in 1m7s
- 后端 axum + sqlite (recordings 表):上传 multipart 流式落 PVC;spawn worker pending → transcribing (调 mochi 那边 ASR endpoint, fireredasr2 token, Whisper-style multipart) → summarizing (调 gemma-4-31b-it OpenAI 兼容接口) → done
- 鉴权 middleware:Authorization: token <PASSPHRASE>;audio 流播放 ?token= query 兜底;passphrase 走 k8s Secret 不写死
- 前端 Vue3:首次访问弹 passphrase modal;sidebar 录音列表(带状态 chip)+ content 选中显示音频 + 转写 + markdown 纪要;5s polling 进度
- k8s manifest: ns cube-notes / PVC 30Gi / Ingress notes.famzheng.me / bodylimit 600M;Secret notes-creds = {passphrase, asr_token, llm_token}
- portal apps.ts 加 notes entry
2026-05-17 21:43:44 +01:00
Fam Zheng 802d5beae9 cube(portal): 加 chatbot + create_issue tool
deploy articulate / build-and-deploy (push) Successful in 1m27s
deploy cube / build-and-deploy (push) Successful in 1m52s
deploy karaoke / build-and-deploy (push) Successful in 1m20s
deploy music / build-and-deploy (push) Successful in 2m29s
deploy simpleasm / build-and-deploy (push) Successful in 1m38s
deploy werewolf / build-and-deploy (push) Successful in 58s
入口页右下角浮动 chat — 走 mochi 同款 LLM gateway (gemma-4-31b-it),
单步 tool calling 实现 `create_issue` 调 gitea API 建 fam/cube issue。
LLM_API_TOKEN + GITEA_TOKEN 走 ns 内 secret `chat-credentials`
(kubectl 手工创建,不进 git);gateway URL / model / 仓库地址走 env。
8 个 cargo test 覆盖 prompt / tool schema / tool_call 解析 / 错误。
顺手 git rm --cached 之前漏掉的 tsbuildinfo(已 gitignore)。
2026-05-14 16:46:59 +01:00
Fam Zheng af697ea6d0 cube(portal): werewolf / articulate / karaoke 改 live
deploy cube / build-and-deploy (push) Successful in 58s
2026-05-14 16:11:11 +01:00
Fam Zheng bcdf6c6ba4 cube(portal): list werewolf / articulate / karaoke (pending)
deploy cube / build-and-deploy (push) Successful in 1m22s
deploy articulate / build-and-deploy (push) Successful in 1m26s
deploy karaoke / build-and-deploy (push) Successful in 1m22s
deploy music / build-and-deploy (push) Successful in 2m32s
deploy simpleasm / build-and-deploy (push) Successful in 1m35s
deploy werewolf / build-and-deploy (push) Successful in 59s
三个 partiverse 移植 app 入口,先标 pending — CI 跑过 + k8s rollout
成功后再改 live。
2026-05-14 15:32:28 +01:00
Fam Zheng fbd6e3cb9c karaoke(app): port single-device playlist from partiverse + tests
点歌单本地管理 — 添加/上移/下移/置顶/删除 + 10 秒撤销倒计时 + YouTube 一键
搜,无 room / 无 ws。删掉了 partiverse 那套 yopu 和弦抓取 / LLM 聊天点歌 /
QR 码(依赖后端,对单机无意义)。logic 全 immutable,21 个 vitest 覆盖
边界(首位上移 noop / 末位下移 noop / 缺失 id / 不变性)。
2026-05-14 15:32:22 +01:00
Fam Zheng 78f84d4225 articulate(app): port single-device word game from partiverse + tests
中英猜词派对 — 选主题 / 难度 / 词数 → 大字模式描述给队友猜,无 room / 无 ws。
15 个 preset 主题(wordlists 已在 scaffold 时就位)+ 3 档难度 + 已看词跨场
记忆(localStorage,cap 5000)+ Enter/Space/Esc 键盘。pickWords 优先未看过
再 fallback 见过的。logic 层 24 个 vitest(解析 / 抽词 / 确定性 rng)。
2026-05-14 15:32:15 +01:00
Fam Zheng 0b22691b3d werewolf(app): port single-device dealer from partiverse + tests
单机发牌器 — 一台手机轮流传,无 room / 无 ws。30 个角色 + 4 档默认预设
(8/9/10/12 人) + 配置历史(dedup + cap 50)+ 4x 偏好加权 + swipe-to-reveal
+ tap-to-confirm + 3D card flip + 死亡标记,全部本地 localStorage。
RNG 注入,logic 层 29 个 vitest(含 2000 次蒙特卡洛验证偏好命中率 > 40%、
均匀分布 ±5%)。也把 *.tsbuildinfo 加进 .gitignore。
2026-05-14 15:31:58 +01:00
Fam Zheng cdbf8308d1 music(player): 变速播放 + AB Loop
deploy articulate / build-and-deploy (push) Failing after 1m42s
deploy cube / build-and-deploy (push) Successful in 2m5s
deploy karaoke / build-and-deploy (push) Failing after 2m2s
deploy simpleasm / build-and-deploy (push) Successful in 2m21s
deploy music / build-and-deploy (push) Successful in 4m2s
deploy werewolf / build-and-deploy (push) Failing after 58s
- 变速:底部 1× 圆形按钮循环切 0.5/0.75/1/1.25/1.5;preservesPitch=true(浏览器 native 保音高);localStorage 持久化全局
- AB Loop:A B 两按钮在当前位置打点,🔁 开关;进度条上绿色高亮 A↔B 区段;timeupdate 触发 ≥B 跳回 A;切歌自动清 A/B
2026-05-10 21:40:19 +01:00
Fam Zheng 5674be1cfd music(ui): 简化只留「和弦谱」一个抓取 tab,简谱/字母版废弃
deploy music / build-and-deploy (push) Successful in 1m54s
2026-05-10 21:32:49 +01:00
Fam Zheng e5f3a95aa9 music(ui): 统一命名 — 和弦谱(字母版) / 简谱(级数版)
deploy music / build-and-deploy (push) Successful in 1m54s
2026-05-10 16:09:56 +01:00
Fam Zheng 5c0d860666 cube(portal): guitar → music (live)
deploy cube / build-and-deploy (push) Successful in 53s
2026-05-10 15:54:53 +01:00
Fam Zheng 26b99d7405 fix(inspire): placeholder 里的中文弯引号会被 vue parser 当 attribute 边界
deploy music / build-and-deploy (push) Successful in 1m54s
2026-05-10 15:52:34 +01:00
Fam Zheng ccb5ad05ce music(inspire): 加「💡 今天练什么」灵感推荐 modal
deploy music / build-and-deploy (push) Failing after 1m50s
- 后端 POST /api/inspire 流式 SSE:随机 keyword 池(23 个)+ 用户曲库画像(recent/top/least)+ Tavily 热点搜索 → gemma stream(temperature=1.0)
- Tavily key 走 k8s Secret tavily-creds(复用 mochi config 同一 token)
- 每次按按钮:keyword 随机 + 用户可输 hint("想练快歌" / "陪儿子" / "新东西")
- 输出强制格式:4 首歌('补回来' 2 + '试试新' 2),每首歌名-歌手 + 一句理由
- 前端 topbar 加 💡 按钮,modal 流式渲染(极简 md:**bold** + 列表)
2026-05-10 15:52:00 +01:00
Fam Zheng f7fac352a5 music(player): 加音量条 + 静音按钮(localStorage 持久化)
deploy music / build-and-deploy (push) Successful in 1m48s
2026-05-10 15:39:30 +01:00
Fam Zheng 9ce3b66810 ci(music): docker build --no-cache 主 image,根治 binary stale
deploy music / build-and-deploy (push) Successful in 1m44s
之前 cargo build 有跑出新 musl binary 但 docker build 时
'Step 2/5 : COPY target/.../music — Using cache' 命中旧 layer,
把历史 binary 套进新 sha tag 的 image。结果 main.rs 改动悄悄丢失。

回退之前迂回的 cargo clean -p / rm binary(治不到 docker 那层),
直接给主 image 加 --no-cache。chord-fetcher 那个 sidecar 保留 cache(chromium apt 拉一次 200MB+,每次重 build 太慢)。
2026-05-10 15:23:37 +01:00
Fam Zheng 9640abe102 ci(music): cargo clean -p 强制每次 link,act_runner workdir 复用导致 main.rs 改动不生效
deploy music / build-and-deploy (push) Successful in 1m46s
2026-05-10 15:18:16 +01:00
Fam Zheng fd80116168 music(chord): 拆两个 tab + 抓两种 (letters/functional)
deploy music / build-and-deploy (push) Successful in 1m54s
- yopu 切 /song?title=&artist= 搜索(避免歌手词被搜糊)
- 抓的版本按搜索结果 nier-snippet svg <text> 数区分:
  >0 = 字母谱 (G/Em7/C 弹唱谱);==0 = 功能谱 (1/4/5/6m 数字级数)
- sidecar fetch/status/state/image 都走 (id, mode) 维度,文件落 /data/chord-fetch/{id}-{mode}.png
- backend chord_fetch / chord_status 接 ?mode=letters|functional,import 时 role 分别为 chord_letters / chord_functional
- 前端 chord tab 拆「吉他谱」+「功能谱」,state/error/poll 各自独立;旧 role='chord' 显示在「吉他谱」兼容历史 import
- verified 标记探测:匿名访问 yopu HTML 里 0 hits(要登录可见),暂时只能按 svg_text 区分
2026-05-10 15:10:03 +01:00
Fam Zheng f836c8dab7 music: 乐谱图点击全屏(再点 / ESC 退出)
deploy music / build-and-deploy (push) Successful in 1m48s
2026-05-10 14:59:07 +01:00
Fam Zheng eed5e88dc0 music(chat): 去掉麻薯人格 prompt,只注入曲目 context
deploy music / build-and-deploy (push) Successful in 1m44s
2026-05-10 14:57:36 +01:00
Fam Zheng c0d6e37325 music: 加 LLM chat、笔记 tab 化、歌单/标签
deploy cube / build-and-deploy (push) Successful in 1m8s
deploy music / build-and-deploy (push) Successful in 2m15s
deploy simpleasm / build-and-deploy (push) Successful in 1m25s
chat(右边栏):
- chat_messages 表 per piece,OpenAI 兼容 /v1/chat/completions stream:true
- backend SSE forward delta,结束时落库 user + assistant
- system prompt 注入曲目 (title/artist/category/notes/lyrics 截 4KB)
- 网关同 mochi/config.yaml: gemma-4-31b-it on 3.135.65.204:8848,token 走 k8s Secret chat-creds
- reqwest client 去掉全局 timeout(chat 流可能跑很久),chord sidecar 调用改 per-request timeout

笔记: 从右 sidebar 移到独立 tab "笔记"

歌单 + tag:
- playlists / playlist_pieces / tags / piece_tags 表,CRUD API
- PATCH piece 接 tags 数组(按名字 upsert)
- list pieces 加 ?tag/?playlist 过滤 + 返回 tags 列表
- 顶 bar filterbar:歌单 + 标签 chip 切换;"+ 新歌单" prompt 创建
- EditView 加 tag 编辑(chip + 自动补全)+ 加入/移除歌单
2026-05-10 14:51:53 +01:00
Fam Zheng 9623e298b7 music(chord): 关掉 row 切换的 dump + 噪音 log,搜索阶段选功能谱已经够
deploy music / build-and-deploy (push) Successful in 1m57s
2026-05-09 23:19:16 +01:00
Fam Zheng ceaa2cc839 music(chord): 选搜索结果里的功能谱(数字级数版本),不要字母谱
deploy music / build-and-deploy (push) Successful in 1m50s
yopu 搜索结果同一首歌通常有多个版本,区分方式:
- 字母谱:nier-snippet 里 SVG <text> 渲染 chord 字母(G/Em7/C 等)
- 功能谱:nier-snippet 里没 SVG <text>,直接 HTML/CSS 显示 1/4/5/6m

按 svgTextCount === 0 优先选第一个功能谱,没功能谱才 fallback 到字母谱。
view 页里没有「谱面样式」「和弦样式」row(要登录 APP 才有),所以这是唯一可行路径。

实测 独家记忆/倔强/Casablanca 三首都拿到正确的功能谱截图。
2026-05-09 23:15:41 +01:00
Fam Zheng 05df371435 music(chord): yopu UI 升级修 selector + 加 PVC override 与调试 dump
deploy music / build-and-deploy (push) Successful in 1m59s
- yopu 现在搜索结果默认全是和弦谱(不再标「和弦谱」字样),改成直接取第一个 a.post-main
- chord_server 启动时把 /data/chord-overrides/ 加到 sys.path 优先级最高,方便后续不 rebuild image 直接 cp yopu.py 热修
- 失败路径 dump HTML + 截图到 /data/chord-debug,view 页 selector 失败也能事后看
2026-05-09 23:02:34 +01:00