-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor and enhance error handling, prompt automation, and domain logic; update documentation and templates #712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…trace on validation errors - Replace all direct .parse calls on Zod schemas with parseWithStack utility - Add import of parseWithStack where needed - Ensures all Zod validation errors have a JS stack trace for better debugging #changes
…arseWithStack usage
…e() calls, fix all type/lint errors - Replace all direct .parse() and JSON.parse calls with parseWithStack or jsonParseWithStack utilities - Add runtime type guards where needed for type safety - Fix all resulting type and lint errors - Ensure all imports are correct and sorted - Codebase passes all checks and tests
…iginal error to createExpandableErrorData in showError (#changes)
… recipe presence - Remove explicit type field from ItemGroup models and schemas - Add getItemGroupType utility to infer type based on recipe - Update type guards and tests to use new logic - Ensure no type field is persisted or required #changes
Ensure templateToItem assigns a valid id to all returned items, preventing Zod validation errors when adding items/groups via TemplateSearchModal. All checks and tests passed.
…uired fields in Zod schemas Improves all main domain schemas with custom required_error and invalid_type_error messages for required fields, making validation feedback much clearer and user-friendly.
…aceability Use wrapErrorWithStack in all error throws in infrastructure (Supabase, API, DAO) to guarantee stack trace for all errors propagated to the application layer, even for plain object errors (e.g., Supabase). Export wrapErrorWithStack from errorHandler and adjust imports as needed.
…romise - Ensure all error toasts preserve stack trace and error context by passing the original Error object, even with custom messages. - Remove all usages of formatError/error.errorMessage in showError/showPromise calls. - Add handleApiError context where missing. - Update UI and error handling for all affected modules. - All checks passing.
…ion with customization best practices
…clarify target prompt behavior
… and subissue requests
…arkdown templates - Updated all .github/prompts/github-issue-*.prompt.md files to reference and require use of new markdown templates in docs/ - Added new issue templates: ISSUE_TEMPLATE_BUGFIX.md, ISSUE_TEMPLATE_FEATURE.md, ISSUE_TEMPLATE_REFACTOR.md, ISSUE_TEMPLATE_SUBISSUE.md - Updated ISSUE_TEMPLATE_LLM.md for consistency and improved structure - Renamed issue-breakdown.prompt.md to github-issue-breakdown.prompt.md and updated to require subissue template usage
…clarity and completeness
…ty, structure, and best practices
….prompt.md for clarity
…from HEAD to stable/rc
…prompt, use only 'rc/**' as base
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Added a new prompt file `.github/prompts/repeat-output-markdown.prompt.md` that instructs the agent to repeat the last output as a markdown code block in English, using four backticks for easy copying.
Added a new prompt file `.github/prompts/repeat-output-markdown.prompt.md` that instructs the agent to repeat the last output as a markdown code block in English, using four backticks for easy copying.
… .parse calls only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors error handling and domain logic, updates prompt automation, and refreshes documentation and templates across the codebase. The changes include:
- Enhanced error handling using specialized parse functions and improved domain model definitions.
- Updated GitHub templates and a suite of new and revised prompt files to support PR, commit, and issue automation.
- Minor adjustments to ESLint rules, UI components, and commit message guidance.
Reviewed Changes
Copilot reviewed 77 out of 77 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/ISSUE_TEMPLATE_SUBISSUE.md | Added a new subissue template. |
| docs/ISSUE_TEMPLATE_REFACTOR.md | Introduced a refactor issue template with clear structure. |
| docs/ISSUE_TEMPLATE_LLM.md | Removed the LLM issue template; verify this removal is intentional. |
| docs/ISSUE_TEMPLATE_FEATURE.md | Added a new feature request template. |
| docs/ISSUE_TEMPLATE_BUGFIX.md | Added a new bug report template with detailed reproduction steps. |
| .github/prompts/* (multiple files) | Added and updated various prompt files to streamline automation flows. |
| .github/copilot-instructions.md | Updated instructions to use unique tee file identifiers per command. |
| .github/copilot-commit-message-instructions.md | Enhanced commit message guidelines, particularly for renaming changes. |
Comments suppressed due to low confidence (1)
docs/ISSUE_TEMPLATE_LLM.md:1
- The removal of the ISSUE_TEMPLATE_LLM.md file may impact workflows that rely on this template. Verify that this removal is intentional and update all related documentation to reflect the change.
## Issue #<number>: <title>
This pull request introduces significant improvements and refactors across the codebase:
parseWithStackandjsonParseWithStackfor all.parse()calls, ensuring stack trace preservation and improved traceability. Updates all relevant domain, application, and infrastructure code to comply with this pattern.ItemGroup,Recipe,Weight,User,Food, etc.) for improved type safety, error messaging, and logic clarity. Removes redundant fields, infers types where possible, and updates related tests..github/promptsfor PR, commit, and issue automation, including auto-closing issues from branch names and improved output formatting. Updates prompt structure and documentation for clarity and best practices.no-restricted-syntaxrule to onlyJSON.parseand Zod.parsecalls, enforcing safer parsing patterns.Notable Implementation Details:
.parse()usages are now wrapped for stack trace support.closes #698