Skip to content

feat(overlay): 插入后注明未润色的原因 - #110

Merged
sunerpy merged 1 commit into
mainfrom
feat/overlay-refine-reason
Oct 5, 2026
Merged

sunerpy merged 1 commit into
mainfrom
feat/overlay-refine-reason

Conversation

@sunerpy

@sunerpy sunerpy commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

User request (2026-10-05): the overlay should also say why a take was not polished. Until now only the home page notice and the history detail did, and a dictation into another app shows only the pill.

  • packages/ui Pill has a new note prop. In the inserted state it is a tag after the label with a small warning lamp. The text uses the pill's own colours, because the warning colour alone is below contrast for 10 px text on the light pill.
  • The overlay passes notRefinedText(refine_failure) when a done take asked for polish and did not get it: 「未润色 · 服务繁忙」, 「未润色 · 额度已用完」 and so on (the kinds from feat(refine): 内置润色服务繁忙时提示改用自己的服务商 #106). The note goes with the pill after its usual 2.5 s; nothing shows for a polished take or one that asked for none.
  • notRefinedText in @voltip/shared is the one sentence for both places; refineModelText (history detail) now uses it.
  • The mock backend gets simulateRefineFailure(kind | null), so the dev preview and the tests can run a take whose polish is turned down: the raw text, refined: false, the kind on done and in the history, no preset recorded.
  • Docs: docs/dictation.md §3.6, the user pages AI 润色与预设 / AI polish and 云端服务 / Cloud services in both languages, and docs/acceptance.md. The same section also corrects an earlier bullet: the 「· 未润色」 suffix belongs to the onboarding trial line, not a status bar.

Verification

  • make verify on 7e64c0b: every gate, dirty_paths=0, overall_exit=0.
  • New tests:
    • Overlay.test.tsx 「a take whose polish was turned down says why on the inserted pill」 runs a whole take through the mock. It fails with the overlay's note wiring removed, which was checked;
    • Pill.test.tsx: the note shows only in the inserted state;
    • mock-backend.test.ts covers simulateRefineFailure, and labels.test.ts covers notRefinedText.
  • No screenshot shows the new state; it appears only when polish fails.

🤖 Generated with Claude Code

要求润色但未生效时,悬浮窗插入后的胶囊在标签后注明「未润色 · 服务繁忙」等原因,
带黄色指示灯,与胶囊一起消失。历史详情与悬浮窗共用同一句说明。
@sunerpy
sunerpy merged commit d25db09 into main Oct 5, 2026
14 of 15 checks passed
@sunerpy
sunerpy deleted the feat/overlay-refine-reason branch October 5, 2026 07:00
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant