Skip to content

docs: 补充项目界面预览#271

Merged
SurviveM merged 1 commit intoawsl-project:mainfrom
ymkiux:docs/readme-preview
Feb 27, 2026
Merged

docs: 补充项目界面预览#271
SurviveM merged 1 commit intoawsl-project:mainfrom
ymkiux:docs/readme-preview

Conversation

@ymkiux
Copy link
Contributor

@ymkiux ymkiux commented Feb 27, 2026

变更说明

  • 在 README/README_CN 增加预览标题与居中截图(位于 Features 之前)
  • 新增预览截图资源到 web/public/preview.png

影响范围

  • 仅文档与静态资源

验证

  • 未运行测试(文档改动)

Summary by CodeRabbit

  • 文档
    • 在中英文README文档中添加了新的预览部分,用于展示应用预览图像。

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f361a5 and 70cd140.

⛔ Files ignored due to path filters (1)
  • web/public/preview.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • README.md
  • README_CN.md

📝 Walkthrough

概览

向 README.md 和 README_CN.md 中添加了新的预览(Preview/预览)部分,包含居中的预览图片。变更为纯文档内容添加,无运行时逻辑或配置改动。两个文件中均发现轻微的编码工件。

变更

文件群组/文件 摘要
文档预览部分
README.md, README_CN.md
添加新的预览部分,包含指向 web/public/preview.png 的居中图片链接(宽度960像素)。两个文件中首个段落标签处均发现零宽度字符编码工件,无功能影响。

预计代码审查工作量

🎯 2 (简单) | ⏱️ ~8 分钟

🐰 README 中添新景,
预览图片闪闪亮,
文档扮靓展风采,
零宽符号小调皮,
简洁改动真暖心~

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题准确反映了主要变更内容——在项目README文档中补充预览部分,这与所有文件变更(README.md、README_CN.md中的预览部分新增)保持一致。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
web/src/pages/stats/index.tsx (1)

901-903: 建议将图表高度提取为单一常量。

当前 400 同时出现在 Tailwind class 和 ResponsiveContainer 参数中,后续改动容易不一致。建议统一来源。

可选重构示例
+const CHART_HEIGHT = 400;
...
-<div className="w-full h-[400px] min-h-[400px]">
-  <ResponsiveContainer width="100%" height={400}>
+<div className="w-full" style={{ height: CHART_HEIGHT, minHeight: CHART_HEIGHT }}>
+  <ResponsiveContainer width="100%" height={CHART_HEIGHT}>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/src/pages/stats/index.tsx` around lines 901 - 903, Extract the repeated
numeric height into a single constant (e.g. CHART_HEIGHT = 400) and use it for
both the container styles and the chart prop: replace the hardcoded Tailwind
arbitrary classes h-[400px] and min-h-[400px] with a style prop on the wrapper
div (e.g. style={{ height: CHART_HEIGHT, minHeight: CHART_HEIGHT }}) and set
ResponsiveContainer height={CHART_HEIGHT}; update the wrapper’s className to
keep layout classes like "w-full" and remove the duplicated numeric literals so
ResponsiveContainer and the surrounding div both reference CHART_HEIGHT (symbols
to change: ResponsiveContainer, ComposedChart, wrapper div className).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README_CN.md`:
- Line 1: The file README_CN.md contains a hidden BOM (U+FEFF) at the start of
line 1 before the "<p align=\"center\">" tag; remove the leading BOM so the
first character of the file is the '<' of "<p align=\"center\">". Ensure the
file is saved without a UTF-8 BOM (e.g., re-save as UTF-8 without BOM or strip
U+FEFF) so editors and CI see no invisible character.

In `@README.md`:
- Line 1: The README.md file contains a leading invisible BOM character U+FEFF
at the start of the file which can break Markdown tooling; remove the BOM by
deleting the first invisible character (U+FEFF) so the file begins with the
visible '<p align="center">' text, and save the file without BOM (ensure your
editor or the commit uses UTF-8 without BOM).

---

Nitpick comments:
In `@web/src/pages/stats/index.tsx`:
- Around line 901-903: Extract the repeated numeric height into a single
constant (e.g. CHART_HEIGHT = 400) and use it for both the container styles and
the chart prop: replace the hardcoded Tailwind arbitrary classes h-[400px] and
min-h-[400px] with a style prop on the wrapper div (e.g. style={{ height:
CHART_HEIGHT, minHeight: CHART_HEIGHT }}) and set ResponsiveContainer
height={CHART_HEIGHT}; update the wrapper’s className to keep layout classes
like "w-full" and remove the duplicated numeric literals so ResponsiveContainer
and the surrounding div both reference CHART_HEIGHT (symbols to change:
ResponsiveContainer, ComposedChart, wrapper div className).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25b7f3e and 3f361a5.

⛔ Files ignored due to path filters (1)
  • web/public/preview.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • README.md
  • README_CN.md
  • web/src/components/layout/app-sidebar/nav-user.tsx
  • web/src/components/ui/chart.tsx
  • web/src/hooks/queries/use-usage-stats.ts
  • web/src/pages/projects/index.tsx
  • web/src/pages/stats/index.tsx
📜 Review details
🔇 Additional comments (7)
web/src/components/layout/app-sidebar/nav-user.tsx (1)

204-204: 仅末尾换行,无功能影响。

该变更无需额外审查意见。

web/src/components/ui/chart.tsx (1)

66-68: 当前改动无阻塞问题。

此片段无需补充审查意见。

README.md (1)

11-15: 预览区块插入位置与结构清晰。

放在 Features 前,且图片居中展示,和本次文档目标一致。

web/src/hooks/queries/use-usage-stats.ts (1)

6-6: 该片段当前无阻塞性问题。

无需补充审查意见。

Also applies to: 120-120

README_CN.md (1)

11-15: “预览”章节补充到位。

位置、结构和 README 英文版保持一致,文档体验更完整。

web/src/pages/projects/index.tsx (2)

44-60: 排序派生逻辑清晰且可预测。

在渲染前统一按 createdAtid 排序,有助于列表顺序稳定。


110-113: 渲染侧切换到 sortedProjects 一致性良好。

数据来源和排序策略保持一致,避免 UI 顺序波动。

@@ -1,4 +1,4 @@
<p align="center">
<p align="center">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

建议移除文件头隐藏 BOM 字符。

Line 1 存在不可见 U+FEFF,可能导致部分编辑器或 CI 文档检查出现异常差异。

建议修复
-<p align="center">
+<p align="center">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README_CN.md` at line 1, The file README_CN.md contains a hidden BOM (U+FEFF)
at the start of line 1 before the "<p align=\"center\">" tag; remove the leading
BOM so the first character of the file is the '<' of "<p align=\"center\">".
Ensure the file is saved without a UTF-8 BOM (e.g., re-save as UTF-8 without BOM
or strip U+FEFF) so editors and CI see no invisible character.

@@ -1,4 +1,4 @@
<p align="center">
<p align="center">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

移除文件头隐藏 BOM 字符。

Line 1 前存在不可见 U+FEFF,可能引发部分 Markdown 工具链的解析/差异显示异常,建议删除。

建议修复
-<p align="center">
+<p align="center">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 1, The README.md file contains a leading invisible BOM
character U+FEFF at the start of the file which can break Markdown tooling;
remove the BOM by deleting the first invisible character (U+FEFF) so the file
begins with the visible '<p align="center">' text, and save the file without BOM
(ensure your editor or the commit uses UTF-8 without BOM).

@ymkiux ymkiux force-pushed the docs/readme-preview branch from 3f361a5 to 70cd140 Compare February 27, 2026 04:04
@SurviveM SurviveM merged commit 8b13767 into awsl-project:main Feb 27, 2026
1 of 2 checks passed
@ymkiux ymkiux deleted the docs/readme-preview branch February 27, 2026 06:45
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