Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modernizes the application's notification system by migrating from a legacy toast component to a new, standardized UI toast primitive. This change ensures consistency in user feedback, improves maintainability by adhering to current design system policies, and enhances localization capabilities by integrating internationalization for all notification messages. The update also includes necessary adjustments to testing infrastructure and code quality configurations. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively refactors legacy toast notifications to use the new design system's toast primitive, complete with internationalization support. The changes are consistently applied across components, tests, and i18n resource files. My review includes suggestions to improve the quality of the tests by removing an anti-pattern, which will enhance their robustness and maintainability.
There was a problem hiding this comment.
Pull request overview
This PR continues the web overlay migration by replacing legacy toast call sites with the design-system toast primitive and localizing newly introduced notification copy via i18n keys.
Changes:
- Migrated legacy toast usage (
Toast.notify/ context toasts) totoast.add({ type, title })from@/app/components/base/ui/toastacross tools/MCP/external-knowledge flows. - Added i18n keys for new MCP validation errors and external knowledge connection success/failure messages.
- Updated unit tests and ESLint suppressions to match the new toast surface and localized strings.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/i18n/en-US/tools.json | Adds new MCP modal validation toast strings. |
| web/i18n/en-US/dataset.json | Adds localized titles for external knowledge connection toasts. |
| web/eslint-suppressions.json | Prunes/adjusts suppressions after import/toast refactors. |
| web/app/components/tools/provider/detail.tsx | Migrates multiple success notifications to toast.add with title. |
| web/app/components/tools/provider/custom-create-card.tsx | Migrates create success toast to toast.add. |
| web/app/components/tools/provider/tests/detail.spec.tsx | Updates mocks to the new @/app/components/base/ui/toast API. |
| web/app/components/tools/provider/tests/custom-create-card.spec.tsx | Updates toast mocks/expectations for title field. |
| web/app/components/tools/mcp/modal.tsx | Replaces hardcoded validation toasts with i18n-backed toast.add calls. |
| web/app/components/tools/mcp/tests/modal.spec.tsx | Updates toast mocking and asserts i18n-keyed toast titles. |
| web/app/components/tools/edit-custom-collection-modal/get-schema.tsx | Migrates URL validation toast to toast.add with title. |
| web/app/components/tools/edit-custom-collection-modal/tests/get-schema.spec.tsx | Updates toast mock and expectations to toast.add({ title }). |
| web/app/components/datasets/external-knowledge-base/connector/index.tsx | Localizes external knowledge connect success/failure toasts via useTranslation. |
| web/app/components/datasets/external-knowledge-base/connector/tests/index.spec.tsx | Updates toast expectations to i18n-keyed titles under the new toast module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #33797 +/- ##
=======================================
Coverage 77.58% 77.58%
=======================================
Files 4418 4418
Lines 176780 176781 +1
Branches 33981 33981
=======================================
+ Hits 137160 137162 +2
+ Misses 36371 36370 -1
Partials 3249 3249
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation
@/app/components/base/ui/*policies.toastsurface so unit coverage remains accurate after the API change.Description
@/app/components/base/ui/toastand callingtoast.add({...})(replacingToast.notify/ legacy context calls) in provider custom-create, provider detail, MCP modal, schema importer, and external-knowledge connector (web/app/components/tools/provider/*,web/app/components/tools/mcp/*,web/app/components/tools/edit-custom-collection-modal/*,web/app/components/datasets/external-knowledge-base/connector/*).titlefor the new toast shape and preservedtype(e.g.toast.add({ type: 'error', title: ... })).mcp.modal.invalidServerUrl,mcp.modal.invalidServerIdentifier,externalKnowledgeForm.connectedSuccess, andexternalKnowledgeForm.connectedFailed(web/i18n/en-US/tools.jsonandweb/i18n/en-US/dataset.json).@/app/components/base/ui/toast(hoisted mocks) and asserttoast.addcalls, and adjusted expectations to the i18n-backed titles; also pruned obsolete ESLint suppressions affected by the migration (web/eslint-suppressions.json).Testing
pnpm -C web lint:fix --prune-suppressions <changed-files>which completed without errors.pnpm -C web testfor the updated suites (custom-create-card.spec.tsx,detail.spec.tsx,get-schema.spec.tsx,mcp/modal.spec.tsx,external-knowledge-base/connector/index.spec.tsx) and all targeted tests passed (105 tests across the run passed).pnpm -C web type-check:tsgo) during the commit pipeline which completed successfully.Codex Task