@@ -280,6 +280,82 @@ Build artifacts are placed in `/build` directory. For embedded deployments, file
2802802 . ** Bundle size** : Run ` npm run analyze ` to identify large dependencies
2812813 . ** Memory leaks** : Check for missing cleanup in useEffect hooks
282282
283+
284+ ## Code Review Guidelines (Based on Historical Patterns)
285+
286+ ### Common Code Review Feedback Patterns
287+
288+ #### TypeScript Best Practices
289+ - Use proper TypeScript types instead of any
290+ - Define interfaces for API responses
291+ - Use strict type checking
292+ - Avoid type assertions, use type guards
293+
294+ #### React Development Patterns
295+ - Use React.memo for performance optimization
296+ - Implement proper error boundaries
297+ - Use useCallback and useMemo appropriately
298+ - Follow React hooks rules
299+
300+ #### State Management (Redux/RTK Query)
301+ - Use RTK Query for API calls instead of direct fetch
302+ - Implement proper loading states
303+ - Handle errors in Redux slices
304+ - Use injectEndpoints pattern
305+
306+ #### Internationalization Requirements
307+ - Never hardcode user-facing strings
308+ - Create i18n keys for all text
309+ - Use registerKeysets for new components
310+ - Follow i18n naming conventions
311+
312+ #### Component Architecture
313+ - Use BEM naming with cn() utility
314+ - Implement proper prop interfaces
315+ - Follow component file organization
316+ - Use Gravity UI components consistently
317+
318+ #### Testing Standards
319+ - Add unit tests for new components
320+ - Use testing-library best practices
321+ - Test error scenarios
322+ - Mock external dependencies properly
323+
324+ ### Anti-Patterns to Avoid
325+ - ❌ Direct API calls instead of window.api pattern
326+ - ❌ Hardcoded strings instead of i18n
327+ - ❌ Mutating Redux state directly
328+ - ❌ Using React Router v6 patterns (project uses v5)
329+ - ❌ Missing loading states in UI
330+ - ❌ Not handling error cases
331+ - ❌ Inconsistent naming conventions
332+ - ❌ Missing TypeScript types
333+
334+ ### Recommended Best Practices
335+ - ✅ Use window.api.module.method() pattern for API calls
336+ - ✅ Implement proper error handling with ResponseError component
337+ - ✅ Use PaginatedTable for data tables
338+ - ✅ Implement virtual scrolling for large datasets
339+ - ✅ Use Monaco Editor for code editing features
340+ - ✅ Follow conventional commit message format
341+ - ✅ Run lint and typecheck before committing
342+ - ✅ Use Gravity UI components over custom implementations
343+
344+ ### Code Review Checklist
345+
346+ Before submitting a PR, ensure:
347+
348+ - [ ] TypeScript types are properly defined (no ` any ` types)
349+ - [ ] All user-facing strings are internationalized
350+ - [ ] API calls use ` window.api ` pattern
351+ - [ ] Components follow BEM naming with ` cn() ` utility
352+ - [ ] Loading states and error handling are implemented
353+ - [ ] Tests are added for new functionality
354+ - [ ] Code follows project conventions
355+ - [ ] ` npm run lint ` and ` npm run typecheck ` pass
356+ - [ ] Commit messages follow conventional format
357+
358+
283359## Reference Resources
284360
285361- ** YDB Documentation** : https://ydb.tech/en/docs/
0 commit comments