Skip to content

Conversation

@choufeng
Copy link
Contributor

@choufeng choufeng commented Nov 2, 2025

Summary

  • 标准化整个项目的命名规范,符合React最佳实践
  • 重命名组件文件从kebab-case到PascalCase
  • 重命名Hook文件从kebab-case到camelCase,遵循React官方规范
  • 更新ESLint配置以强制执行命名约定
  • 完善技术文档和规范说明

Changes

  • 组件文件重命名: 所有React组件文件使用PascalCase命名 (如 Button.tsx, NewNoteModal.tsx)
  • Hook文件重命名: 所有Hook文件使用camelCase命名 (如 useNewNoteModal.ts, useShortcuts.ts)
  • ESLint配置: 更新所有包的ESLint规则,支持命名约定检查
  • 文档更新: 完善 docs/tech-guide.md 中的命名规范说明
  • 引用修复: 更新所有import路径以匹配新的文件名

Files Changed

  • 29个文件重命名/修改,包括组件、Hook、Provider等
  • 涵盖 apps/client, packages/ui 等核心包
  • 更新相关的Storybook故事文件

Test Plan

  • UI包类型检查通过
  • 所有import引用正确更新
  • ESLint配置正确支持新的命名约定
  • 文档已更新包含详细的命名规范示例

🤖 Generated with Claude Code

choufeng and others added 4 commits November 2, 2025 07:11
- Add UserMenu component with dropdown interface
- Create Avatar UI component for user profile display
- Refactor header to use proper Layout component instead of inline styles
- Update Layout component to remove Sidebar dependency
- Fix authentication state loading from IndexedDB
- Remove unused Sidebar component
- Update __root.tsx to use new Layout architecture
- Add login button fallback when user is not authenticated
- Implement proper logout flow with state clearing and redirect

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add comprehensive development server management rules to prevent port infinite growth and resource waste:

- Port checking and cleanup procedures
- Recommended separate startup approach (services first, then client)
- Clear guidelines for port occupation handling
- Service verification commands
- Advantages of separate startup over containerized scripts

This ensures better controllability, clearer error localization, and prevents unexpected script complexities.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fix the missing connection between keyboard shortcuts and the new note modal:

- Add useShortcutAction hook to register 'openNewNoteModal' action handler
- Import useShortcutAction from shortcut-provider
- Add debug logging to verify shortcut activation
- Connect Ctrl+N (Windows/Linux) and Cmd+N (Mac) shortcuts to actual modal opening

The keyboard shortcuts were already defined in ShortcutProvider but the action handler was missing, preventing the modal from opening when shortcuts were pressed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Rename component files from kebab-case to PascalCase following React best practices
- Rename hook files from kebab-case to camelCase following React official specifications
- Update ESLint configurations across all packages to enforce naming conventions
- Enhance tech-guide.md with detailed naming standards and examples
- Fix all import references and ensure type checking passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@choufeng choufeng merged commit 5065854 into main Nov 2, 2025
@choufeng choufeng deleted the feature-user-menu branch November 2, 2025 01:05
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.

2 participants