Skip to content

[dev] [Marfuen] mariano/fix-suggestions#2290

Merged
Marfuen merged 2 commits intomainfrom
mariano/fix-suggestions
Mar 12, 2026
Merged

[dev] [Marfuen] mariano/fix-suggestions#2290
Marfuen merged 2 commits intomainfrom
mariano/fix-suggestions

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to merge mariano/fix-suggestions into dev.
It was created by the [Auto Pull Request] action.

@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Mar 12, 2026 2:35pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Mar 12, 2026 2:35pm

Request Review

@cursor
Copy link

cursor bot commented Mar 12, 2026

PR Summary

Low Risk
Low risk: small defensive changes to suggestion parsing/typing and empty-state rendering, with no auth or data-model changes. Main risk is minor UI behavior differences if vendorName/vendorWebsite are now omitted when null.

Overview
Improves robustness of automation suggestion generation and rendering. The AI suggestions schema now treats vendorName/vendorWebsite as nullable and normalizes returned null values to undefined before passing them to the UI.

Suggestion generation is wrapped in a broader try/catch so DB fetch failures also fall back to the existing error-handling path, and the empty-state examples list now uses optional chaining to avoid mapping over an undefined list.

Written by Cursor Bugbot for commit 85cb977. This will update automatically on new commits. Configure here.

…strict JSON schema

The @ai-sdk/groq v3 upgrade enabled strict JSON schema validation by
default, which requires ALL properties to be in `required`. The Zod
schema used `.optional()` for vendorName/vendorWebsite, which excluded
them from `required`, causing Groq API to reject every request.

Changed to `.nullable()` so properties remain required (satisfying
strict mode) while still allowing null values. Also moved DB queries
inside try/catch to prevent unhandled errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

… optional chaining

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Marfuen Marfuen merged commit 9360878 into main Mar 12, 2026
8 checks passed
@Marfuen Marfuen deleted the mariano/fix-suggestions branch March 12, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant