Add mcp server, adjust types, add logger#170
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily improves type safety and consistency throughout the codebase by centralizing shared types in
types/app, refactoring component props and internal logic to use these types, and cleaning up type-related workarounds. Additionally, it introduces a new logging dependency and configuration for development tooling.Type Safety and Refactoring
Centralized shared types such as
CategoryOption,CategoryExpense,DisplayTransaction,DisplayTransactionGroup, andNestEntryintypes/app, and refactored imports and component props across multiple files to use these types instead of local/interface duplication. This reduces redundancy and improves type consistency. [1] [2] [3] [4] [5] [6] [7] [8]Updated selector and reducer logic in components like
Charts.tsx,Transactions.tsx, and chart components to use the new types, and replacedany/manual casting with safer, more explicit type assertions or@ts-expect-errorwhere necessary due to d3-collection limitations. [1] [2] [3] [4] [5] [6]Refactored
CategorySelectto use the sharedCategoryOptiontype, improved thefindValueutility for more robust value resolution, and ensured compatibility with readonly arrays fromreact-select. [1] [2] [3] [4]Logging and Error Handling
console.errorwith a centralizedlogger.errorin API route handlers for better logging consistency, and added theloglevelpackage as a dependency. [1] [2] [3] [4] [5]Development Tooling
.mcp.jsonconfiguration file to support thenext-devtools-mcpdevelopment tool.Test Data Consistency
Intro.test.tsxto match the latest state shape, ensuring tests remain accurate and up-to-date.