Skip to content

Add mcp server, adjust types, add logger#170

Merged
dlebech merged 2 commits into
mainfrom
small-type-updates
Feb 14, 2026
Merged

Add mcp server, adjust types, add logger#170
dlebech merged 2 commits into
mainfrom
small-type-updates

Conversation

@dlebech
Copy link
Copy Markdown
Owner

@dlebech dlebech commented Feb 14, 2026

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, and NestEntry in types/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 replaced any/manual casting with safer, more explicit type assertions or @ts-expect-error where necessary due to d3-collection limitations. [1] [2] [3] [4] [5] [6]

  • Refactored CategorySelect to use the shared CategoryOption type, improved the findValue utility for more robust value resolution, and ensured compatibility with readonly arrays from react-select. [1] [2] [3] [4]

Logging and Error Handling

  • Replaced console.error with a centralized logger.error in API route handlers for better logging consistency, and added the loglevel package as a dependency. [1] [2] [3] [4] [5]

Development Tooling

  • Added a .mcp.json configuration file to support the next-devtools-mcp development tool.

Test Data Consistency

  • Updated mock Redux state in Intro.test.tsx to match the latest state shape, ensuring tests remain accurate and up-to-date.

@dlebech dlebech merged commit 8978f7e into main Feb 14, 2026
5 checks passed
@dlebech dlebech deleted the small-type-updates branch February 14, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant