Skip to content

fix: give the diff AI each change with its values, and translate the diff summary - #16

Merged
maxgfr merged 2 commits into
mainfrom
issue-15-diff-ai-details
Oct 17, 2026
Merged

maxgfr merged 2 commits into
mainfrom
issue-15-diff-ai-details

Conversation

@maxgfr

@maxgfr maxgfr commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Closes #15

Found in production with a real model: comparing the Analytics Dashboard example with a version where users.email became VARCHAR(320) NOT NULL, widgets was dropped and alerts added, the AI answered that "the diff lacks details needed to fully judge the email change and the new alerts table".

  • The question now lists each changed field as type VARCHAR(255) -> VARCHAR(320); nullable true -> false, added/removed relationships and indexes, and includes the whole new schema (schemaToPromptContext); the current one is already in the system prompt.
  • The summary banner and toast are built from the interface strings (Tables ajoutées : 1 · …) instead of the toolkit's English sentence.

Checks: lint, typecheck, app 127 tests (1 new).

…diff summary

"Analyze with AI" sent "changed fields: email" without the old and new
type or nullability, no type for added fields and no definition for added
tables, so the model answered that the diff lacked details. It now gets
every change as old -> new, added and removed relationships and indexes,
and the whole new schema. The summary banner and toast use the interface
strings instead of the toolkit's English sentence.

Refs #15
The summary now reads "Added Tables: 1", so /Added Tables/ also matched
the banner and the toast.

Refs #15
@maxgfr
maxgfr merged commit 395811e into main Oct 17, 2026
1 check passed
@maxgfr
maxgfr deleted the issue-15-diff-ai-details branch October 17, 2026 07:35
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schema diff: the AI gets field names without what changed; the summary is not translated

1 participant