open-design/apps/web/tests
Cursor Agent 85beeb58c9
feat(web): native diff-review UI on GenUISurfaceRenderer (Phase 8 entry slice)
Plan Q1 / spec §21.5.

apps/web/src/components/GenUISurfaceRenderer.tsx now ships first-
class branches for the auto-derived diff-review choice surface and
generic single-enum-property choice surfaces.

Diff-review (DiffReviewChoiceSurface):
  - Three top-level buttons: 'Accept all' / 'Reject all' / 'Partial…'.
  - Optional 'Skip' when the host supplies onSkip.
  - Optional notes textarea — forwarded as decision.reason when non-empty.
  - On 'Accept all': submits { decision: 'accept', accepted_files,
    rejected_files: [] } using the touched file list from
    pending.context.touchedFiles. Daemon side default-fills when the
    list is empty.
  - On 'Reject all': symmetric.
  - On 'Partial…': reveals a per-file accept/reject toggle for each
    touched file. Submit refuses locally when ANY file is left
    undecided (mirrors the daemon's 'partial must cover every
    touched file' contract from §3.O5 so the user doesn't ping the
    server with an obviously-invalid payload).
  - Disabled when context.touchedFiles is empty (the daemon's
    default-fill path doesn't help with a partial decision).

Generic choice (GenericChoiceSurface):
  - Detects schemas of shape `{ properties: { <key>: { enum: [...] } } }`
    and renders one button per enum value. Property literally named
    'decision' wins over other enum properties when several are
    declared (so plugin-author-customised diff-review schemas keep
    rendering as accept/reject/partial buttons even if they add
    extra fields).

PendingSurface gains an optional `context: { touchedFiles?: [] }`
field. Future runtime-context entries plug in here without bloating
the GenUISurfaceSpec contract.

Web tests: 586 → 593 (+7 cases on
GenUISurfaceRenderer.diff-review: accept-all default-fill, reject-
all default-fill, partial union, partial blocks on undecided file,
partial disabled when context absent, optional reason forwarding,
generic single-enum choice button group).

Co-authored-by: Tom Huang <1043269994@qq.com>
2026-05-09 15:36:38 +00:00
..
artifacts chore: enforce test directory conventions (#496) 2026-05-05 15:34:22 +08:00
components feat(web): native diff-review UI on GenUISurfaceRenderer (Phase 8 entry slice) 2026-05-09 15:36:38 +00:00
edit-mode Implement manual edit mode (#620) 2026-05-06 16:13:52 +08:00
i18n feat: add Orbit activity summaries (#681) 2026-05-08 14:27:46 +08:00
providers [codex] Optimize Composio connector previews (#907) 2026-05-08 20:01:06 +08:00
runtime feat(desktop): export artifacts directly to PDF (#532) 2026-05-08 23:42:12 +08:00
state feat: add Orbit activity summaries (#681) 2026-05-08 14:27:46 +08:00
utils fix(web): unbreak Create button on plain HTTP / LAN-IP deployments (#849) (#900) 2026-05-08 16:50:59 +08:00
App.test.ts feat: add Orbit activity summaries (#681) 2026-05-08 14:27:46 +08:00
comments.test.ts Add Tweaks mode for HTML previews with picker, pod selection, and batched chat attachments (#513) 2026-05-05 21:09:20 +08:00
quickSwitcherRecents.test.ts feat(web): add Cmd/Ctrl+P quick file switcher (#556) 2026-05-06 10:31:50 +08:00
router-marketplace.test.ts feat(web): MarketplaceView + PluginDetailView + /marketplace routes 2026-05-09 12:28:59 +00:00
sidecar-proxy.test.ts Migrate beta release publishing to R2 (#805) 2026-05-07 19:13:52 +08:00