Skip to content

feat(content): show what the content is, and demote the three-value key (split Step 2) - #128

Merged
wu908 merged 1 commit into
mainfrom
feat/taxonomy-split-step2-display
Sep 17, 2026
Merged

wu908 merged 1 commit into
mainfrom
feat/taxonomy-split-step2-display

Conversation

@wu908

@wu908 wu908 commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Step 2 of the taxonomy split (#126). Step 1 (#127) recorded an AI-named form; this step is the display layer that reads it.

The complaint this answers: 「内容意图为什么要设定为三个枚举型,这样不会导致内容的局限吗?」 Three values were opening every piece — 产出架卡片「分享」、列表行「分享内容」、工作台表头「这是一条分享内容:…」、确认动作「确认这是一条“分享”内容吗?」. They were the machine's routing key, but they read as three kinds of content.

What changed

  • 产出架卡片 / 内容列表 / 工作台进度:AI 命名的形态先显示;三值只在没有名字的旧数据上兜底
  • 拾取面板:确认框上方一行「AI 把它读成「水彩作品展示」」,并说明三值真正决定什么(接下来问什么、怎么组织内容、发布后看哪些信号)
  • 确认面板:标题改为开放问题「这篇要读者拿走什么?」,读者变化排到前面,三值降级到下面
  • 工作台表头只说"这是什么",读者变化交给下面「这篇内容要完成什么」——该块改为优先显示项目自己那句,两处不再重复
  • 说明文案与字段值的真实来源一致(项目已记下的方向 vs. 类别通用方向)

顺带修掉两个真问题(都在真实栈上验证时暴露)

  1. 产出视图新增字段没有同步响应契约(DeliverableView 是 StrictModel,extra=forbid)→ discard/pickup 全部 500,报 Extra inputs are not permitted;输出侧刻意不设长度上限
  2. 复用待办动作时返回的是行里存的旧标题 → 用户仍会读到旧句,且本地那行的标题写着项目已不再是的「解决」。标题是派生标签,现在复用时会与当前规格对齐(回退该修复,新测试即失败)

验证:后端 507 passed / ruff 干净;前端 vitest 全绿含覆盖率门禁;tsc、eslint 干净;真实栈 1280 与 390 走查(frontend/scripts/taxonomy-step2-shots.mjs,截图在 browser-screenshots/taxonomy-step2/),无横向溢出。那次走查里的认领是真实的:content_form 从产出带到项目,工作台表头渲染的就是它。

未做:Step 3(rubric 改名)、Step 4(只在出现第四种行为时才扩 CHECK)。

按约定,这一步先看截图再合并,PR 保持打开状态。

@wu908
wu908 force-pushed the feat/taxonomy-split-step2-display branch from c0c4f2f to f1e0d67 Compare September 16, 2026 09:55
…ey (split Step 2)

Step 1 (8985c01) started recording an AI-named form on the deliverable and carried it
onto the project at pickup, but nothing read it. The interface still opened every piece
by asserting one of three behaviours: the shelf card said 「分享」, the list row said
「分享内容」, the workspace header said 「这是一条分享内容:…」, and the confirm action
asked 「确认这是一条“分享”内容吗?」. That is what the creator pushed back on — three
values read as three kinds of content, so the machine's routing key looked like a limit
on what they were allowed to make.

This step changes the display layer, not the data:

- shelf card, content list, workspace outline: the AI-named form leads; the three-value
  label only remains as a fallback for drafts and projects written before the field existed
  (the two are shown side by side on the local shelf, and the list shows both cases).
- pickup panel: 「AI 把它读成「水彩作品展示」」 above the confirmation, plus one line saying
  what the three values actually decide — which questions come next, how the piece is
  structured, which signals are watched. They do not constrain what it can be.
- confirm panel: the heading is the open question 「这篇要读者拿走什么?」, the reader change
  is asked first, and the behaviour select is demoted below it.
- workspace header: states the identity line only (「这篇是「水彩作品展示」。」); the reader
  change moves to 「这篇内容要完成什么」, which now prefers the project's own sentence over
  the per-intent generic one, so the two blocks stop saying the same thing twice.
- the audience-change helper now says where that sentence came from (the project's own
  direction vs. the class's generic one) instead of always calling it a generic direction.

Also splits task from question on that step: the action card now reads 「先把这篇的目的定下来」
while the panel asks 「这篇要读者拿走什么?」. They were briefly the same sentence, which put
three identical headings on one screen — the E2E strict-mode locator caught it (and it read
badly, too). The starter-flow spec asserted the old heading and was updated with it.

Two defects found while verifying on the real stack:

- the new deliverable view key was added without the response contract (DeliverableView is
  a StrictModel), so discard/pickup answered 500 with 「Extra inputs are not permitted」.
  The API suite caught it. The field is declared without a length cap on purpose: capping
  on the output side would turn one slightly long AI name into a 500.
- reusing a pending action returns its stored title, so users would keep reading
  「确认这是一条“解决”内容吗?」 after this change — and the row on the local server still
  named an intent (解决) the project no longer had (分享). A title is a derived label, not
  user input, so reusing an action now realigns title/reason with the current spec.
  Verified by reverting the fix: the new test fails without it.

Verification: backend 507 passed (ruff clean), frontend vitest all passed with the
coverage gate, tsc clean, eslint clean. Real-stack pass at 1280 and 390 with no overflow
(frontend/scripts/taxonomy-step2-shots.mjs; screenshots in browser-screenshots/taxonomy-step2).
The pickup in that pass was a real one: content_form travelled from the deliverable to the
project, and the workspace header rendered it.

Step 3 (rubric renaming) and Step 4 (widening the CHECK constraints, only if a fourth
behaviour appears) are untouched.
@wu908
wu908 force-pushed the feat/taxonomy-split-step2-display branch from f1e0d67 to 14b5684 Compare September 16, 2026 10:15
@wu908
wu908 merged commit 85c2011 into main Sep 17, 2026
2 checks passed
@wu908
wu908 deleted the feat/taxonomy-split-step2-display branch September 17, 2026 01:05
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