feat(frontend): fix the bug in issue #42#47
Merged
OrenZhang merged 15 commits intolinux-do:masterfrom Jul 4, 2025
Merged
Conversation
…ors for different types of prompts
There was a problem hiding this comment.
Pull Request Overview
本次 PR 主要聚焦在前端多处功能的修复与优化,包含缓存逻辑、标签输入、侧边栏渲染、提示样式及对话框布局等方面。
- 优化
useAuth钩子:延长缓存时长并添加组件卸载检测,避免过时的setState调用 - 增强标签选择器:输入实时截断、创建时限流与校验
- 改进 UI 和交互体验:统一提示位置与配色,优化侧边栏渲染及创建/编辑对话框布局
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/hooks/use-auth.ts | 调整缓存过期时间并引入 isMounted 避免卸载后更新 |
| frontend/components/ui/tag-selector.tsx | 增加输入截断函数、创建标签时禁止某些名称 |
| frontend/components/ui/sonner.tsx | 将 Sonner 提示统一置顶并补充主题样式配置 |
| frontend/components/common/project/constants.ts | 更新信任级别选项文案 |
| frontend/components/common/project/ProjectBasicForm.tsx | 重构 “IP 管控” 与 “项目描述” 区块的布局 |
| frontend/components/common/project/CreateDialog.tsx | 优化创建对话框在不同设备的标题、按钮与文案 |
| frontend/components/common/layout/NavDocuments.tsx | 用 useMemo 与 requestAnimationFrame 优化渲染 |
| frontend/components/common/layout/ManagementBar.tsx | 更新 “需求反馈” 链接至 GitHub issues |
| frontend/components/common/dashboard/DataCharts.tsx | 将折线图替换为渐变面积图并修复阴影效果 |
| frontend/app/globals.css | 增加 Sonner 各类型提示图标的着色样式 |
| frontend/app/(main)/layout.tsx | 为侧边栏组件使用 memo 并提取样式常量 |
OrenZhang
previously approved these changes
Jul 4, 2025
OrenZhang
approved these changes
Jul 4, 2025
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.
例行检查
关联信息
resolves #42
变更内容
已修复