feat(rectification): start from an offer card in the consultation, come back to it (BUG-1247~1251)

TASK-rectification-in-chat-step1-20261006, direct execution.

- The homepage 生时校正 pill and the text trigger (isRectificationHandoffQuestion)
  are gone. The consult agent decides (RECTIFICATION_OFFER_RULE, one
  definition) and calls offer-birth-time-rectification; the server decides
  whether a card may show (self, product on, no case in progress,
  feature_pricing price). The offer is stored with the answer and travels on
  run.completed; the card hangs under that answer.
- Opening from the card binds the offer to the case in the consultation's own
  messages (no table change); GET/POST /api/rectification/cases/[caseId]/source
  find the source and go back: one divider (time changed or not), earlier
  answers captioned 按校正前的时间, and a 按新时间重新看 button that sends only
  when clicked. Auto-return after the post-adopt check or a terminal case, only
  for work done in this view.
- Model history skips the divider and notes answers written with the old time.

Full suite 4987 / fail 24, identical to 6ec8efd5 (4973 / 24), no test name
lost; tsc 0; lint 0 errors; build keeps / Static, first-load gzip +0.20%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
Jesse_Chen
2026-10-07 12:58:58 +08:00
co-authored by Claude Opus 5.5
parent 328f919d5d
commit 6ad0bea320
51 changed files with 1487 additions and 243 deletions
+14 -2
View File
@@ -1,5 +1,16 @@
# Jyotisha Web Design System
## 生时校正从对话进入、做完回到原对话(2026-10-07,BUG-1247~1251,在途)
首页不再有「生时校正」pill,`.starter-entries` 只剩今日星语一枚(`.starter-entry-hint` 那句「生时校正暂时只支持本人。」随之删除)。入口在对话里:
- **提议卡**(`.rectification-offer-card`):挂在提议了校正的那条回答下面,与追问 chip 同一缩进(`--assistant-content-inset`),浅底细边圆角卡,一句说明(大约几题、几点、答第一题时才扣)+ 一个实心按钮「开始核对出生时间」。校正已开始时同一张卡改成「出生时间核对已经开始。」+ 描边按钮「继续核对出生时间」;回来之后卡片消失。对话进行中(loading / 取消中)按钮不可点。
- **回到刚才的对话**:从对话进来的校正,在校正面输入框上方一行描边小按钮(`.rectification-return-row`);没有来源对话的校正(历史里打开的、之前开的)不出这一行。采用后核对结束、或 case 结束时,在这个视图里做过操作的校正 2.5 秒后自动回去;从历史打开一个已结束的校正不会自动跳走。
- **分隔线**(`.rectification-return-divider`):回到原对话后追加一行居中小字「出生时间改为 HH:MM(生时校正)」或「出生时间没有改」,不是一条消息、没有操作行;改了时间时下面一个描边按钮「按新时间重新看:「原问题」」,点了才发送(普通一轮,照常计费)。
- **按校正前的时间**(`.message-before-change`):改了时间后,分隔线之前的每条回答上方一行灰色小字;原文不动。
不新增等待动画;打开校正沿用既有一次揭幕。
## 用量页分段计时(2026-10-05,在途)
`/admin/usage` 在原表格上多一列「分段」。格子里四行:分类耗时、第 0 步、第 1 步、第 1 步开始到第一个正文字符。每步带推理、输出、输入、缓存输入 token。供应商没返回的数显示「—」。不新开页面,不改表,数字来自 `usage_ledger.metadata` 里已有的 JSON。没有新的等待动画或输入框。
@@ -701,12 +712,13 @@ page. Three parts now, in reading order:
`--session-column-width` in both states — the empty-state composer used to be
1040px against the session's 760px, so the input visibly narrowed the moment
a conversation started.
- **Entry pills** (`.starter-entry`): the two product entrances, rendered inside
- **Entry pills** (`.starter-entry`): the product entrance(s), rendered inside
`.composer-wrap` *below* the composer. The visual pill is 36px tall
(`min-height: 36px`). The transparent hit area is the `::after` box with
`inset: -4px`, so the touch target is 44px. One word each, accent icon 15px:
lucide `MoonStar` for 今日星语 (was `Sparkles`, the same glyph as the credits
button) and `Clock3` for 生时校正. The header credits button uses lucide
button). The 生时校正 pill (`Clock3`) was removed on 2026-10-07 (BUG-1247):
rectification starts from an offer card under a consultation answer. The header credits button uses lucide
`Coins`; its accessible name is unchanged. Below the pills there is normally
**nothing**: a hint line (`.starter-entry-hint`) appears only when the user has
something to do, and an accuracy-boundary line appears when no natal minute is