fix(workflow) Make workflow description nullable#4785
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 7e751b8. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR makes the
Confidence Score: 5/5Safe to merge — a minimal, targeted schema alignment with no behavioural regressions. The single-line change correctly aligns workflowStateSchema.metadata.description with every other place in the file that exposes the description column (workflowListItemSchema, getWorkflowResponseDataSchema, duplicateWorkflowResponseSchema) — all of which already carry .nullable(). The fix removes the contract validation failure without touching any business logic or runtime behaviour. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant GET /api/workflows/[id]
participant DB
participant ContractValidator
Client->>GET /api/workflows/[id]: GET request
GET /api/workflows/[id]->>DB: fetch workflow row
DB-->>GET /api/workflows/[id]: { description: null, ... }
GET /api/workflows/[id]->>GET /api/workflows/[id]: stamp metadata onto state
GET /api/workflows/[id]->>ContractValidator: validate against workflowStateSchema
Note over ContractValidator: Before: z.string().optional() → FAILS on null
Note over ContractValidator: After: z.string().nullable().optional() → PASSES
ContractValidator-->>Client: "{ data: { state: { metadata: { description: null } } } }"
Reviews (1): Last reviewed commit: "Make workflow description nullable" | Re-trigger Greptile |
Summary
Workflows were failing contract validation. Fixed by making description nullable
Type of Change
Testing
How has this been tested? What should reviewers focus on?
Checklist
Screenshots/Videos