Skip to content

M3-01: Create workbench shell, API client and run state machine #36

Closed

Description

@pillowtalk-Qy
Type: Frontend Foundation
Priority: P0
Initial status: Blocked
Owner: Frontend
Depends on: M2-11 contract; final integration after M2-13
Blocks: M3-02, M3-03, M3-04
Writable: page/layout/globals, workbench-shell, api-client, run-state, tests

唯一目标

建立首屏即工具的稳定 Workbench、typed API client 和无竞态运行状态机。

状态合同

IDLE -> RUNNING -> RESULT | ERROR
one active runId
AbortController/equivalent cancellation
stale response never overwrites newest result
LIVE failure never auto-loads Fixture

验收

[ ] 首屏是可用工具,不是 landing/hero
[ ] API types 来自批准 contract/display model
[ ] active 时 duplicate submit disabled
[ ] stale response 防护有 deterministic test
[ ] abort/timeout/error 状态区分
[ ] loading/result 尺寸稳定
[ ] server secret 不进 client bundle
[ ] result/error 后 focus 可预测
[ ] 无 SAFE/APPROVED state

验证

pnpm vitest run apps/web/test/run-state.test.ts
pnpm --filter @moss-mini-demo/web build
pnpm check

人工验收

连续提交、制造乱序响应、断网,确认只显示最新结果且不自动切 Fixture。

Codex 指令

只搭 shell、typed client 和 state machine;用正式 API contract 的 fake response。
不复制 Schema/Decision 逻辑,不加入 Credential。为 loading/result 定义稳定响应尺寸。

Activity

  1. self-assigned this
    on Aug 8, 2026
  2. pillowtalk-Qy commented on Aug 8, 2026

    @pillowtalk-Qy
    ContributorAuthor

    DEPENDENCY_GATE_CLEARED / IMPLEMENTATION_CLAIMED: direct dependencies #32 and #34 are Closed/Done; baseline main@41a32cabd12702fa4786bdf72160db381fa6f542; Qy is the single active implementation owner.

  3. pillowtalk-Qy commented on Aug 8, 2026

    @pillowtalk-Qy
    ContributorAuthor

    IMPLEMENTATION_AUTHORIZED (single-operator scope): baseline 41a32cabd12702fa4786bdf72160db381fa6f542; exactly 8 paths: apps/web/app/{page.tsx,layout.tsx,globals.css}, apps/web/src/components/workbench-shell.tsx, apps/web/src/client/{api-client.ts,run-state.ts}, apps/web/test/{api-client.test.ts,run-state.test.ts}. No dependency/lockfile change and no M3-02+ controls, evidence, Decision, or Credential UI. Required gates: focused tests, Web build, full check, browser desktop/mobile/manual race/error QA.

  4. pillowtalk-Qy commented on Aug 8, 2026

    @pillowtalk-Qy
    ContributorAuthor

    POST_MERGE_AUDIT_PASS

    Merged as 0cc50e5df15c3a62232338858e7de376ebca0f5d; exact merged-main quality-gate run 31249303808 passed. Main and worktree/branch cleanup are clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions