oficina / equipo Public

native: decode Design feedback fields without change

A fixture copies task-detail/full.json and fills the protocol 39
fields: direction options with direction, page and captures (label,
viewport, path, full_page), note_needed, two rounds, preview_refused,
and a step design. The test decodes it as ThinTask and checks the
direction's preview fields and that the whole task equals the
full.json decode. No Swift source change was needed.

Test: swift test --filter TaskDetailModelTests
Result: Test run with 19 tests in 1 suite passed, including
designFeedbackFieldsDecodeWithoutChangingTheTask; exit 0 (Apple Swift
6.4.2). Run on Tito Studio by the controller; EquipoKit does not
build on Linux.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev bc703c92dc89aaa69ac7aedf9d77daa1e81cc7e3 parent cfa50d4
2 files changed, +885 −0
  • native/apple/Tests/EquipoKitTests/Fixtures/task-detail/design-feedback.json +867 −0
  • native/apple/Tests/EquipoKitTests/TaskDetailModelTests.swift +18 −0
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/task-detail/design-feedback.json b/native/apple/Tests/EquipoKitTests/Fixtures/task-detail/design-feedback.json
new file mode 100644
index 00000000..6128b85c
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/task-detail/design-feedback.json
@@ -0,0 +1,867 @@
+{
+ "stopping": true,
+ "move_hold_reason": "move_hold_reason fixture",
+ "preparing_project": true,
+ "moving": true,
+ "earlier_steps": [
+ {
+ "base_checks": "base_checks fixture",
+ "id": "id fixture",
+ "revision": 7,
+ "task_id": "task_id fixture",
+ "index": 7,
+ "specialist": "specialist fixture",
+ "state": "state fixture",
+ "reason": "reason fixture",
+ "attempt": 7,
+ "base_sha": "base_sha fixture",
+ "candidate_sha": "candidate_sha fixture",
+ "pushed": true,
+ "terminated": true,
+ "summary": "summary fixture",
+ "headline": "headline fixture",
+ "log_tail": "log_tail fixture",
+ "started_at": "2026-11-26T10:00:00Z",
+ "finished_at": "2026-11-26T10:00:00Z",
+ "round": 7,
+ "family": "family fixture",
+ "account": "account fixture",
+ "model": "model fixture",
+ "verdict": "verdict fixture",
+ "review_label": "review_label fixture",
+ "findings": [
+ {
+ "id": "id fixture",
+ "headline": "headline fixture",
+ "text": "text fixture",
+ "repo": "repo fixture",
+ "path": "path fixture",
+ "line": 7,
+ "at": "2026-11-26T10:00:00Z"
+ }
+ ],
+ "checks": "checks fixture",
+ "gate": "gate fixture",
+ "exit_code": 7,
+ "askable": true,
+ "rebase": true,
+ "merge_sha": "merge_sha fixture",
+ "into": "into fixture",
+ "strategy": "strategy fixture",
+ "without_checks": true,
+ "switched": {
+ "from": "from fixture",
+ "to": "to fixture",
+ "window": "window fixture",
+ "resets_at": "2026-11-26T10:00:00Z"
+ },
+ "activity": [
+ {
+ "kind": "kind fixture",
+ "subject": "subject fixture",
+ "at": "2026-11-26T10:00:00Z"
+ }
+ ],
+ "runner_id": "runner_id fixture",
+ "runner_label": "runner_label fixture",
+ "needs": [
+ "needs fixture"
+ ],
+ "placement": "placement fixture",
+ "publication": "publication fixture",
+ "termination_kind": "termination_kind fixture",
+ "checks_sandbox": "checks_sandbox fixture",
+ "preview": {
+ "unsafe": true,
+ "phase": "phase fixture",
+ "app": "app fixture",
+ "url": "url fixture",
+ "version": "version fixture",
+ "digest": "digest fixture",
+ "files": 7,
+ "bytes": 7,
+ "expires_at": "2026-11-26T10:00:00Z",
+ "outcome": "outcome fixture"
+ },
+ "research": {
+ "attempt": 7,
+ "findings": {
+ "summary": "summary fixture",
+ "facts": [
+ {
+ "label": "label fixture",
+ "value": "value fixture",
+ "sources": [
+ "sources fixture"
+ ]
+ }
+ ],
+ "images": [
+ "images fixture"
+ ],
+ "gaps": [
+ "gaps fixture"
+ ]
+ },
+ "fetches": [
+ {
+ "source_id": "source_id fixture",
+ "origin": "origin fixture",
+ "parent": "parent fixture",
+ "url": "url fixture",
+ "hops": [
+ {
+ "url": "url fixture",
+ "address": "address fixture",
+ "status": 7
+ }
+ ],
+ "address": "address fixture",
+ "status": 7,
+ "type": "type fixture",
+ "bytes": 7,
+ "sha256": "sha256 fixture",
+ "millis": 7,
+ "reason": "reason fixture"
+ }
+ ],
+ "images": [
+ {
+ "id": "id fixture",
+ "image_id": "image_id fixture",
+ "source_id": "source_id fixture",
+ "role": "role fixture",
+ "description": "description fixture",
+ "size": 7,
+ "width": 7,
+ "height": 7
+ }
+ ]
+ },
+ "hold": {
+ "reason": "reason fixture",
+ "connection": "connection fixture",
+ "provider": "provider fixture",
+ "resets_at": "2026-11-26T10:00:00Z",
+ "wake_at": "2026-11-26T10:00:00Z",
+ "needs_person": "needs_person fixture",
+ "step_revision": 7
+ },
+ "paused": {
+ "since": "2026-11-26T10:00:00Z",
+ "offline": true,
+ "used_percent": 7,
+ "run_now": {
+ "connection": "connection fixture",
+ "provider": "provider fixture",
+ "name": "name fixture",
+ "billing": "billing fixture",
+ "same": true,
+ "left_percent": 7,
+ "plain": true,
+ "may_bill": true
+ }
+ },
+ "publish": {
+ "phase": "phase fixture",
+ "app": "app fixture",
+ "url": "url fixture",
+ "version": "version fixture",
+ "digest": "digest fixture",
+ "files": 7,
+ "bytes": 7,
+ "outcome": "outcome fixture"
+ },
+ "retried_by": "retried_by fixture"
+ }
+ ],
+ "copy_can_skip": true,
+ "copy_hold": true,
+ "copy_repeat": {
+ "before": {
+ "step": "step fixture",
+ "attempt": 7,
+ "candidate": "candidate fixture"
+ },
+ "after": {
+ "step": "step fixture",
+ "attempt": 7,
+ "candidate": "candidate fixture"
+ },
+ "signature": {
+ "version": 7,
+ "complete": true,
+ "adapter": "adapter fixture",
+ "hash": "hash fixture",
+ "failures": [
+ {
+ "unit": "unit fixture",
+ "test": "test fixture",
+ "code": "code fixture",
+ "subject": "subject fixture",
+ "category": "category fixture"
+ }
+ ]
+ }
+ },
+ "copy_flags": [
+ {
+ "id": "id fixture",
+ "key": "key fixture",
+ "text": "text fixture",
+ "flag": "flag fixture"
+ }
+ ],
+ "id": "id fixture",
+ "revision": 7,
+ "project_id": "project_id fixture",
+ "project": "project fixture",
+ "repo": "repo fixture",
+ "title": "title fixture",
+ "brief": "brief fixture",
+ "stage": "stage fixture",
+ "branch": "branch fixture",
+ "base_sha": "base_sha fixture",
+ "url": "url fixture",
+ "creator": "creator fixture",
+ "turn_id": "turn_id fixture",
+ "findings": [
+ {
+ "id": "id fixture",
+ "headline": "headline fixture",
+ "text": "text fixture",
+ "repo": "repo fixture",
+ "path": "path fixture",
+ "line": 7,
+ "at": "2026-11-26T10:00:00Z"
+ }
+ ],
+ "steps": [
+ {
+ "base_checks": "base_checks fixture",
+ "id": "id fixture",
+ "revision": 7,
+ "task_id": "task_id fixture",
+ "index": 7,
+ "specialist": "specialist fixture",
+ "state": "state fixture",
+ "reason": "reason fixture",
+ "attempt": 7,
+ "base_sha": "base_sha fixture",
+ "candidate_sha": "candidate_sha fixture",
+ "pushed": true,
+ "terminated": true,
+ "summary": "summary fixture",
+ "headline": "headline fixture",
+ "log_tail": "log_tail fixture",
+ "started_at": "2026-11-26T10:00:00Z",
+ "finished_at": "2026-11-26T10:00:00Z",
+ "round": 7,
+ "family": "family fixture",
+ "account": "account fixture",
+ "model": "model fixture",
+ "verdict": "verdict fixture",
+ "review_label": "review_label fixture",
+ "findings": [
+ {
+ "id": "id fixture",
+ "headline": "headline fixture",
+ "text": "text fixture",
+ "repo": "repo fixture",
+ "path": "path fixture",
+ "line": 7,
+ "at": "2026-11-26T10:00:00Z"
+ }
+ ],
+ "checks": "checks fixture",
+ "gate": "gate fixture",
+ "exit_code": 7,
+ "askable": true,
+ "rebase": true,
+ "merge_sha": "merge_sha fixture",
+ "into": "into fixture",
+ "strategy": "strategy fixture",
+ "without_checks": true,
+ "switched": {
+ "from": "from fixture",
+ "to": "to fixture",
+ "window": "window fixture",
+ "resets_at": "2026-11-26T10:00:00Z"
+ },
+ "activity": [
+ {
+ "kind": "kind fixture",
+ "subject": "subject fixture",
+ "at": "2026-11-26T10:00:00Z"
+ }
+ ],
+ "runner_id": "runner_id fixture",
+ "runner_label": "runner_label fixture",
+ "needs": [
+ "needs fixture"
+ ],
+ "placement": "placement fixture",
+ "publication": "publication fixture",
+ "termination_kind": "termination_kind fixture",
+ "checks_sandbox": "checks_sandbox fixture",
+ "preview": {
+ "unsafe": true,
+ "phase": "phase fixture",
+ "app": "app fixture",
+ "url": "url fixture",
+ "version": "version fixture",
+ "digest": "digest fixture",
+ "files": 7,
+ "bytes": 7,
+ "expires_at": "2026-11-26T10:00:00Z",
+ "outcome": "outcome fixture"
+ },
+ "research": {
+ "attempt": 7,
+ "findings": {
+ "summary": "summary fixture",
+ "facts": [
+ {
+ "label": "label fixture",
+ "value": "value fixture",
+ "sources": [
+ "sources fixture"
+ ]
+ }
+ ],
+ "images": [
+ "images fixture"
+ ],
+ "gaps": [
+ "gaps fixture"
+ ]
+ },
+ "fetches": [
+ {
+ "source_id": "source_id fixture",
+ "origin": "origin fixture",
+ "parent": "parent fixture",
+ "url": "url fixture",
+ "hops": [
+ {
+ "url": "url fixture",
+ "address": "address fixture",
+ "status": 7
+ }
+ ],
+ "address": "address fixture",
+ "status": 7,
+ "type": "type fixture",
+ "bytes": 7,
+ "sha256": "sha256 fixture",
+ "millis": 7,
+ "reason": "reason fixture"
+ }
+ ],
+ "images": [
+ {
+ "id": "id fixture",
+ "image_id": "image_id fixture",
+ "source_id": "source_id fixture",
+ "role": "role fixture",
+ "description": "description fixture",
+ "size": 7,
+ "width": 7,
+ "height": 7
+ }
+ ]
+ },
+ "hold": {
+ "reason": "reason fixture",
+ "connection": "connection fixture",
+ "provider": "provider fixture",
+ "resets_at": "2026-11-26T10:00:00Z",
+ "wake_at": "2026-11-26T10:00:00Z",
+ "needs_person": "needs_person fixture",
+ "step_revision": 7
+ },
+ "paused": {
+ "since": "2026-11-26T10:00:00Z",
+ "offline": true,
+ "used_percent": 7,
+ "run_now": {
+ "connection": "connection fixture",
+ "provider": "provider fixture",
+ "name": "name fixture",
+ "billing": "billing fixture",
+ "same": true,
+ "left_percent": 7,
+ "plain": true,
+ "may_bill": true
+ }
+ },
+ "publish": {
+ "phase": "phase fixture",
+ "app": "app fixture",
+ "url": "url fixture",
+ "version": "version fixture",
+ "digest": "digest fixture",
+ "files": 7,
+ "bytes": 7,
+ "outcome": "outcome fixture"
+ },
+ "retried_by": "retried_by fixture",
+ "change_files": {
+ "base": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+ "sha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
+ "files": 2,
+ "additions": 4,
+ "deletions": 1,
+ "binary": 0,
+ "truncated": false,
+ "entries": [
+ {
+ "path": "docs/日本語 notes.md",
+ "old_path": "docs/old notes.md",
+ "status": "renamed",
+ "additions": 4,
+ "deletions": 1,
+ "binary": false
+ },
+ {
+ "path": "empty.txt",
+ "status": "added",
+ "additions": 0,
+ "deletions": 0,
+ "binary": false
+ }
+ ]
+ },
+ "design": {
+ "attempt": 2,
+ "options": [
+ {
+ "name": "Quiet",
+ "direction": "Calm spacing, one accent colour.",
+ "page": "/pricing",
+ "captures": [
+ {
+ "id": "tfd1",
+ "capture_id": "cap-work-d1",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Desktop",
+ "viewport": "desktop",
+ "path": "/pricing",
+ "full_page": true
+ },
+ {
+ "id": "tfd2",
+ "capture_id": "cap-work-d2",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Phone",
+ "viewport": "mobile",
+ "path": "/pricing",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Bold",
+ "direction": "Large type, high contrast.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfd3",
+ "capture_id": "cap-work-d3",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Dense",
+ "direction": "Tight grid, more on the first screen.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfd4",
+ "capture_id": "cap-work-d4",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": true
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ],
+ "thread": [
+ {
+ "id": "id fixture",
+ "author": "author fixture",
+ "text": "text fixture",
+ "at": "2026-11-26T10:00:00Z"
+ }
+ ],
+ "created_at": "2026-11-26T10:00:00Z",
+ "updated_at": "2026-11-26T10:00:00Z",
+ "candidate_sha": "candidate_sha fixture",
+ "checks": "checks fixture",
+ "checks_reason": "checks_reason fixture",
+ "checks_sandbox": "checks_sandbox fixture",
+ "verdict": "verdict fixture",
+ "review_label": "review_label fixture",
+ "needs_you": "needs_you fixture",
+ "fix_rounds": 7,
+ "branch_head": "branch_head fixture",
+ "questions": [
+ {
+ "id": "id fixture",
+ "revision": 7,
+ "task_id": "task_id fixture",
+ "step_id": "step_id fixture",
+ "specialist": "specialist fixture",
+ "asker": "asker fixture",
+ "text": "text fixture",
+ "state": "state fixture",
+ "reason": "reason fixture",
+ "attempt": 7,
+ "answer": "answer fixture",
+ "created_at": "2026-11-26T10:00:00Z",
+ "updated_at": "2026-11-26T10:00:00Z",
+ "timing": {
+ "queued_ms": 7,
+ "start_ms": 7,
+ "first_event_ms": 7,
+ "first_thinking_ms": 7,
+ "first_tool_ms": 7,
+ "first_text_ms": 7,
+ "last_text_ms": 7,
+ "result_ms": 7,
+ "cold": true
+ }
+ }
+ ],
+ "merged": {
+ "sha": "sha fixture",
+ "into": "into fixture",
+ "strategy": "strategy fixture",
+ "without_checks": true,
+ "at": "2026-11-26T10:00:00Z"
+ },
+ "reports": 7,
+ "ask_open": true,
+ "merge_offered": true,
+ "merge_decision": {
+ "class": "class fixture",
+ "stance": "stance fixture",
+ "decided_by": "decided_by fixture",
+ "reasons": [
+ {
+ "name": "name fixture",
+ "ok": true,
+ "value": "value fixture"
+ }
+ ],
+ "at": "2026-11-26T10:00:00Z"
+ },
+ "merge_hold": "merge_hold fixture",
+ "revert_of": "revert_of fixture",
+ "undo_offered": true,
+ "creator_name": "creator_name fixture",
+ "source_message_id": "source_message_id fixture",
+ "source_at": "2026-11-26T10:00:00Z",
+ "duplicate_of": {
+ "id": "id fixture",
+ "title": "title fixture",
+ "stage": "stage fixture",
+ "creator": "creator fixture"
+ },
+ "coordinator": {
+ "kind": "kind fixture",
+ "since": "2026-11-26T10:00:00Z"
+ },
+ "folded": {
+ "into": {
+ "id": "id fixture",
+ "title": "title fixture",
+ "stage": "stage fixture",
+ "creator": "creator fixture"
+ },
+ "at": "2026-11-26T10:00:00Z"
+ },
+ "combined": [
+ {
+ "id": "id fixture",
+ "title": "title fixture",
+ "stage": "stage fixture",
+ "creator": "creator fixture"
+ }
+ ],
+ "engineering_runner": "engineering_runner fixture",
+ "triage": {
+ "kind": "kind fixture",
+ "reason": "reason fixture",
+ "since": "2026-11-26T10:00:00Z",
+ "said": "said fixture",
+ "failed": [
+ "failed fixture"
+ ],
+ "recommend": "recommend fixture",
+ "why": "why fixture"
+ },
+ "kind": "kind fixture",
+ "explored_from": {
+ "id": "id fixture",
+ "title": "title fixture",
+ "stage": "stage fixture",
+ "creator": "creator fixture"
+ },
+ "built_as": {
+ "id": "id fixture",
+ "title": "title fixture",
+ "stage": "stage fixture",
+ "creator": "creator fixture"
+ },
+ "direction": {
+ "preview_url": "preview_url fixture",
+ "branch_url": "branch_url fixture",
+ "previews_off": true,
+ "options": [
+ {
+ "name": "Quiet",
+ "direction": "Calm spacing, one accent colour.",
+ "page": "/pricing",
+ "captures": [
+ {
+ "id": "tfa1",
+ "capture_id": "cap-work-a1",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Desktop",
+ "viewport": "desktop",
+ "path": "/pricing",
+ "full_page": true
+ },
+ {
+ "id": "tfa2",
+ "capture_id": "cap-work-a2",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Phone",
+ "viewport": "mobile",
+ "path": "/pricing",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Bold",
+ "direction": "Large type, high contrast.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfa3",
+ "capture_id": "cap-work-a3",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Dense",
+ "direction": "Tight grid, more on the first screen.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfa4",
+ "capture_id": "cap-work-a4",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": true
+ }
+ ]
+ }
+ ],
+ "note_needed": true,
+ "rounds": [
+ {
+ "step": "step-2",
+ "candidate": "cccccccccccccccccccccccccccccccccccccccc",
+ "options": [
+ {
+ "name": "Quiet",
+ "direction": "Calm spacing, one accent colour.",
+ "page": "/pricing",
+ "captures": [
+ {
+ "id": "tfb1",
+ "capture_id": "cap-work-b1",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Desktop",
+ "viewport": "desktop",
+ "path": "/pricing",
+ "full_page": true
+ },
+ {
+ "id": "tfb2",
+ "capture_id": "cap-work-b2",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Phone",
+ "viewport": "mobile",
+ "path": "/pricing",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Bold",
+ "direction": "Large type, high contrast.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfb3",
+ "capture_id": "cap-work-b3",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Dense",
+ "direction": "Tight grid, more on the first screen.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfb4",
+ "capture_id": "cap-work-b4",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": true
+ }
+ ]
+ }
+ ],
+ "live": true
+ },
+ {
+ "step": "step-1",
+ "candidate": "dddddddddddddddddddddddddddddddddddddddd",
+ "options": [
+ {
+ "name": "Quiet",
+ "direction": "Calm spacing, one accent colour.",
+ "page": "/pricing",
+ "captures": [
+ {
+ "id": "tfc1",
+ "capture_id": "cap-work-c1",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Desktop",
+ "viewport": "desktop",
+ "path": "/pricing",
+ "full_page": true
+ },
+ {
+ "id": "tfc2",
+ "capture_id": "cap-work-c2",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Phone",
+ "viewport": "mobile",
+ "path": "/pricing",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Bold",
+ "direction": "Large type, high contrast.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfc3",
+ "capture_id": "cap-work-c3",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": false
+ }
+ ]
+ },
+ {
+ "name": "Dense",
+ "direction": "Tight grid, more on the first screen.",
+ "page": "/",
+ "captures": [
+ {
+ "id": "tfc4",
+ "capture_id": "cap-work-c4",
+ "size": 2048,
+ "width": 1280,
+ "height": 800,
+ "label": "Home",
+ "viewport": "desktop",
+ "path": "/",
+ "full_page": true
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "preview_refused": true
+ },
+ "priority": {
+ "priority": "priority fixture",
+ "by": "2026-11-26T10:00:00Z",
+ "set_by": "set_by fixture"
+ },
+ "preview_url": "preview_url fixture",
+ "site": {
+ "app": "app fixture",
+ "sha": "sha fixture",
+ "state": "state fixture",
+ "url": "url fixture",
+ "at": "2026-11-26T10:00:00Z"
+ }
+}
diff --git a/native/apple/Tests/EquipoKitTests/TaskDetailModelTests.swift b/native/apple/Tests/EquipoKitTests/TaskDetailModelTests.swift
index 94837ecc..b90b1e47 100644
--- a/native/apple/Tests/EquipoKitTests/TaskDetailModelTests.swift
+++ b/native/apple/Tests/EquipoKitTests/TaskDetailModelTests.swift
@@ -257,6 +257,24 @@ import Testing
await model.beginMove()
#expect(await server.projectReads == 0)
}
+ // Protocol 39 (Design feedback) adds rounds, preview_refused, and
+ // direction, page and capture render facts to a direction's options
+ // and a step's design. Native does not show them: the task decodes
+ // exactly as it did without them.
+ @Test func designFeedbackFieldsDecodeWithoutChangingTheTask() throws {
+ let before: ThinTask = try Fixture.decode("task-detail/full")
+ let after: ThinTask = try Fixture.decode("task-detail/design-feedback")
+ let wire = try JSONSerialization.jsonObject(with: Fixture.data("task-detail/design-feedback")) as! [String: Any]
+ let sent = try #require(wire["direction"] as? [String: Any])
+ #expect((sent["rounds"] as? [Any])?.count == 2)
+ #expect(sent["preview_refused"] as? Bool == true)
+ let direction = try #require(after.direction)
+ #expect(direction.previewUrl == "preview_url fixture")
+ #expect(direction.branchUrl == "branch_url fixture")
+ #expect(direction.previewsOff == true)
+ #expect(direction == before.direction)
+ #expect(after == before)
+ }
}