Skip to content

补齐 CLI 题型与限时追问支持 - #5

Merged
Shimada666 merged 3 commits into
mainfrom
feat/frontend-question-types
Aug 10, 2026
Merged

补齐 CLI 题型与限时追问支持#5
Shimada666 merged 3 commits into
mainfrom
feat/frontend-question-types

Conversation

@Shimada666

Copy link
Copy Markdown
Collaborator

改动

  • 开放题支持 --follow-up timed --time-budget <minutes>,并校验 0.1–60 分钟及参数组合
  • 量表题补齐 minValue / maxValue,创建时默认 0–10,更新时要求四个配置一起提供
  • 对齐前端题型列表;级联、矩阵、排序、比重题通过完整 --payload 透传
  • --payload 创建题目时不再重复要求 --text;顶层选项继续自动补 UUID
  • 结构题和陈述继续禁止追问

本 PR 只修改 mizzen-cli,不修改后端。

验证

  • bun test(9 passed)
  • bun run typecheck
  • bun run bundle
  • git diff --check

@Shimada666
Shimada666 requested a review from mizzenbot August 10, 2026 10:58

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taste Rating: 🔴 需要改进

Linus-Style Analysis: 新增校验把追问配置视作一组,但更新路径没有提供完整的状态迁移:既破坏了此前公开的 auto 取值,也无法从 timed 状态清除已保存的预算。

[关键问题]

  • 详见两条行内评论。

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM
    变更触及已发布的 CLI 参数语义和问卷持久化配置;现有 auto 调用会失败,限时追问切换后可能残留无效预算。已确认单元测试、类型检查、打包与 diff 检查均通过,但未覆盖这两条状态迁移。

VERDICT:
Needs rework:请保留或迁移 auto,并提供从 timed 切换到其他等级时明确清除 timeBudget 的请求语义及回归测试。

KEY INSIGHT:
追问等级与时间预算是同一持久化配置的两个字段,更新 API 必须支持它们的完整双向状态迁移。

此审查由 AI agent(OpenHands)代表用户生成。


Improve this review? If any feedback above seems incorrect or irrelevant to this repository, you can teach the reviewer to do better:

  1. Add a .agents/skills/custom-codereview-guide.md file to your branch (or edit it if one already exists) with the /codereview trigger and the context the reviewer is missing (e.g., "Security concerns about X do not apply here because Y"). See the customization docs for the required frontmatter format.
  2. Re-request a review - the reviewer reads guidelines from the PR branch, so your changes take effect immediately.
  3. When your PR is merged, the guideline file goes through normal code review by repository maintainers.

Resolve with AI? Install the iterate skill in your agent and run /iterate to automatically drive this PR through CI, review, and QA until it's merge-ready.

Was this review helpful? React with 👍 or 👎 to give feedback.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/MizzenAI/mizzen-cli/actions/runs/31381450365

Comment thread src/commands/questions.ts
Comment thread src/commands/questions.ts
@Shimada666
Shimada666 requested review from mizzenbot and removed request for mizzenbot August 10, 2026 11:04

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taste Rating: 🔴 需要改进

Linus-Style Analysis: 新增题型的创建路径禁止结构题追问,但更新路径允许仅切换题型并保留已有追问配置,状态约束没有覆盖完整迁移。

[关键问题]

  • 详见行内评论。

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM
    该变更影响已保存问卷的 PATCH 状态迁移;用户可将已有开放题改为结构题,同时留下运行时不应存在的追问配置。其余本地验证均通过。

VERDICT:
Needs rework:题型切换也必须保持“结构题无追问”的约束。

KEY INSIGHT:
题型和追问字段共同构成持久化状态,不能只校验本次 PATCH 显式携带的字段。

此审查由 AI agent(OpenHands)代表用户生成。


Improve this review? If any feedback above seems incorrect or irrelevant to this repository, you can teach the reviewer to do better:

  1. Add a .agents/skills/custom-codereview-guide.md file to your branch (or edit it if one already exists) with the /codereview trigger and the context the reviewer is missing (e.g., "Security concerns about X do not apply here because Y"). See the customization docs for the required frontmatter format.
  2. Re-request a review - the reviewer reads guidelines from the PR branch, so your changes take effect immediately.
  3. When your PR is merged, the guideline file goes through normal code review by repository maintainers.

Resolve with AI? Install the iterate skill in your agent and run /iterate to automatically drive this PR through CI, review, and QA until it's merge-ready.

Was this review helpful? React with 👍 or 👎 to give feedback.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/MizzenAI/mizzen-cli/actions/runs/31381879714

Comment thread src/commands/questions.ts
@Shimada666
Shimada666 requested review from mizzenbot and removed request for mizzenbot August 10, 2026 11:09

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Taste Rating: Good taste

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW
    题型、追问和量表配置的客户端校验与文档一致;复杂题型保持完整 payload 透传,未引入依赖或扩大 API 边界。已本地通过 bun test(9 passed)、bun run typecheckbun run bundlegit diff --check

VERDICT:
Worth merging:核心逻辑和回归覆盖符合本次 CLI-only 范围。

KEY INSIGHT:
将常规参数的明确校验与复杂题型的原始 payload 边界分开,避免了 CLI 对后端配置结构作不可靠的推断。

本审查由 AI agent(OpenHands)代表用户生成。


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/MizzenAI/mizzen-cli/actions/runs/31382250166

@Shimada666
Shimada666 merged commit d467e51 into main Aug 10, 2026
1 check passed
@Shimada666
Shimada666 deleted the feat/frontend-question-types branch August 10, 2026 11:16
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