|
4 | 4 | { |
5 | 5 | "id": 1, |
6 | 6 | "prompt": "Create `src/views/support-case.view.ts`: a default grid (subject linking to the record, status, priority, owner, due date), a 'My Open Cases' list, a kanban by status, and a simple edit form.", |
7 | | - "expected_output": "One `defineView({ list, form, listViews })` container — never a bare flat view object. `data: { provider: 'object', object: 'support_case' }`, `columns` with `link: true` on `subject`, a `listViews.my_open` entry with `filter` triples (`{ field: 'assigned_to', operator: 'equals', value: '{current_user_id}' }`), a kanban entry with the required top-level `columns` plus `kanban: { groupByField: 'status' }` (no top-level `groupBy`), and `form` with `type: 'simple'` and `sections` referencing a declared field group.", |
| 7 | + "expected_output": "One `defineView({ list, form, listViews })` container — never a bare flat view object. `data: { provider: 'object', object: 'support_case' }`, `columns` with `link: true` on `subject`, the owner column is the injected `owner_id` (never an `assigned_to` field), a `listViews.my_open` entry with `filter` triples (`{ field: 'owner_id', operator: 'equals', value: '{current_user_id}' }`), a kanban entry with the required top-level `columns` plus `kanban: { groupByField: 'status' }` (no top-level `groupBy`), and `form` with `type: 'simple'` and `sections` referencing a declared field group.", |
8 | 8 | "files": [], |
9 | 9 | "assertions": { |
10 | | - "must_contain": ["defineView", "provider: 'object'", "listViews", "groupByField", "link: true", "{current_user_id}"], |
11 | | - "must_not_contain": ["groupBy:", "conditionalRequired:"] |
| 10 | + "must_contain": ["defineView", "provider: 'object'", "listViews", "groupByField", "link: true", "{current_user_id}", "owner_id"], |
| 11 | + "must_not_contain": ["groupBy:", "conditionalRequired:", "'assigned_to'"] |
12 | 12 | } |
13 | 13 | }, |
14 | 14 | { |
15 | 15 | "id": 2, |
16 | 16 | "prompt": "Build `src/apps/crm.app.ts`: a Sales group with Leads, Opportunities, the pipeline kanban, a 'My open deals' entry and the sales dashboard; an Approvals group that only shows when approvals are installed; and a second app for the support team, who work the same objects.", |
17 | | - "expected_output": "`App.create({...})` with a `navigation` tree of `group` items: `type: 'object'` entries with `objectName`, a `viewName: 'pipeline_kanban'` shortcut, a bare `filters: { owner_id: '{current_user_id}', status: 'open' }` slice for 'My open deals' (no view authored for a one-off), `type: 'dashboard'` with `dashboardName`, and the approvals inbox as `type: 'component', componentRef: 'approvals:inbox'` gated by `requiresService: 'approvals'` (never `requiresObject: 'sys_approval_request'`: that object read answers 404 to an approver until a request involves them). At most one app per package, so not a second `App.create` here: the support team shares this product and its objects, so it is a `requiredPermissions`-gated group inside the app. (A support product with objects of its own would carry its app in its own `type: 'module'` package of the suite.) Registered under `defineStack({ apps })`.", |
| 17 | + "expected_output": "`App.create({...})` with a `navigation` tree of `group` items: `type: 'object'` entries with `objectName`, a `viewName: 'pipeline_kanban'` shortcut, a bare `filters: { owner_id: '{current_user_id}', status: 'open' }` slice for 'My open deals' (no view authored for a one-off), `type: 'dashboard'` with `dashboardName`, and the approvals inbox as `type: 'component', componentRef: 'approvals:inbox'` gated by `requiresService: 'approvals'` (never a `requiresObject` gate on `sys_approval_request`: that object read answers 404 to an approver until a request involves them). At most one app per package, so not a second `App.create` here: the support team shares this product and its objects, so it is a `requiredPermissions`-gated group inside the app. (A support product with objects of its own would carry its app in its own `type: 'module'` package of the suite.) Registered under `defineStack({ apps })`.", |
18 | 18 | "files": [], |
19 | 19 | "assertions": { |
20 | 20 | "must_contain": ["App.create", "navigation", "objectName", "viewName", "filters", "approvals:inbox", "requiresService", "requiredPermissions"], |
|
114 | 114 | { |
115 | 115 | "id": 12, |
116 | 116 | "prompt": "On `task`, add an 'Attention' list for the signed-in user: their tasks that are open or urgent, in one list.", |
117 | | - "expected_output": "One `listViews.attention` entry, not two views. Its `filter` is a list whose elements all match: one any-of group `{ or: [{ field: 'status', operator: 'equals', value: 'open' }, { field: 'priority', operator: 'equals', value: 'urgent' }] }` beside the rule `{ field: 'assigned_to', operator: 'equals', value: '{current_user_id}' }`. Flat rules only inside the group; no `$or`, `logic` / `conditions` or `anyOf` key.", |
| 117 | + "expected_output": "One `listViews.attention` entry, not two views. Its `filter` is a list whose elements all match: one any-of group `{ or: [{ field: 'status', operator: 'equals', value: 'open' }, { field: 'priority', operator: 'equals', value: 'urgent' }] }` beside the rule `{ field: 'owner_id', operator: 'equals', value: '{current_user_id}' }` (the record owner, never an `assigned_to` field). Flat rules only inside the group; no `$or`, `logic` / `conditions` or `anyOf` key.", |
118 | 118 | "files": [], |
119 | 119 | "assertions": { |
120 | | - "must_contain": ["listViews", "or: [", "{current_user_id}"], |
121 | | - "must_not_contain": ["$or:", "logic:", "conditions:", "anyOf:"] |
| 120 | + "must_contain": ["listViews", "or: [", "{current_user_id}", "owner_id"], |
| 121 | + "must_not_contain": ["$or:", "logic:", "conditions:", "anyOf:", "'assigned_to'"] |
122 | 122 | } |
123 | 123 | }, |
124 | 124 | { |
|
0 commit comments