| ... | ... | @@ -1,64 +0,0 @@ |
| 1 | | export interface UiEntityContract { |
| 2 | | entity: string; |
| 3 | | requiredFields: string[]; |
| 4 | | consumedBy: string[]; |
| 5 | | } |
| 6 | | |
| 7 | | // Explicit UI inventory used to keep server read models aligned |
| 8 | | // with what the current frontend renders. |
| 9 | | export const UI_ENTITY_CONTRACTS: UiEntityContract[] = [ |
| 10 | | { |
| 11 | | entity: "Thread", |
| 12 | | requiredFields: [ |
| 13 | | "id", |
| 14 | | "projectId", |
| 15 | | "title", |
| 16 | | "model", |
| 17 | | "branch", |
| 18 | | "worktreePath", |
| 19 | | "createdAt", |
| 20 | | "latestTurnId", |
| 21 | | "latestTurnStartedAt", |
| 22 | | "latestTurnCompletedAt", |
| 23 | | "latestTurnDurationMs", |
| 24 | | "error", |
| 25 | | ], |
| 26 | | consumedBy: [ |
| 27 | | "apps/web/src/components/Sidebar.tsx", |
| 28 | | "apps/web/src/components/ChatView.tsx", |
| 29 | | "apps/web/src/components/BranchToolbar.tsx", |
| 30 | | ], |
| 31 | | }, |
| 32 | | { |
| 33 | | entity: "Message", |
| 34 | | requiredFields: ["id", "role", "text", "createdAt", "streaming"], |
| 35 | | consumedBy: ["apps/web/src/components/ChatView.tsx"], |
| 36 | | }, |
| 37 | | { |
| 38 | | entity: "ProviderSession", |
| 39 | | requiredFields: [ |
| 40 | | "sessionId", |
| 41 | | "provider", |
| 42 | | "status", |
| 43 | | "threadId", |
| 44 | | "activeTurnId", |
| 45 | | "createdAt", |
| 46 | | "updatedAt", |
| 47 | | "lastError", |
| 48 | | ], |
| 49 | | consumedBy: ["apps/web/src/components/ChatView.tsx", "apps/web/src/components/Sidebar.tsx"], |
| 50 | | }, |
| 51 | | { |
| 52 | | entity: "TurnDiffSummary", |
| 53 | | requiredFields: ["turnId", "completedAt", "status", "files"], |
| 54 | | consumedBy: ["apps/web/src/components/DiffPanel.tsx", "apps/web/src/components/ChatView.tsx"], |
| 55 | | }, |
| 56 | | { |
| 57 | | entity: "GitReadModel", |
| 58 | | requiredFields: ["projectId", "branch", "hasWorkingTreeChanges", "aheadCount", "behindCount"], |
| 59 | | consumedBy: [ |
| 60 | | "apps/web/src/components/GitActionsControl.tsx", |
| 61 | | "apps/web/src/components/BranchToolbar.tsx", |
| 62 | | ], |
| 63 | | }, |
| 64 | | ]; |