Update README git rules, add AGENTS.md, fix shorts upcoming panel height

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
eric 2026-08-11 04:00:12 -05:00
parent 63f6472729
commit a3827d8ef3
2 changed files with 36 additions and 3 deletions

View File

@ -295,10 +295,43 @@ DY_API_KEY= # 可选;非空则写操作需密钥
TZ=Asia/Shanghai
```
## Git
## Git 管理规范
**仓库**:`https://gitea.dsx2020.com/eric/douyinWEB.git`(账号 `eric`)
**分支策略**:
| 分支 | 用途 |
|------|------|
| `main` | 本地 Windows 快照;不直接部署到服务器 |
| `dev` | 服务器线上运行代码;所有功能开发在此分支 |
**开发流程(必须严格执行)**:
```
https://gitea.dsx2020.com/eric/douyinWEB.git
本地修改代码
→ git add / git commit(dev 分支)
→ git push origin dev
→ 服务器: git pull origin dev
→ systemctl restart douyinweb-api
→ cd /opt/douyinWEB/frontend && npm run build
→ systemctl restart douyinweb-web
```
**每次 git push 后,必须立即同步**:
1. Windows 本机:`git pull origin dev`(保持本地与远端一致)
2. 服务器:`git pull origin dev` + 重启相关服务 + 重新 build 前端
**禁止行为**:
- 禁止在服务器上直接修改代码文件(必须走 git)
- 禁止用 sftp/scp 覆盖服务器上的代码文件
- 禁止 `git reset --hard` / `git stash apply` 等操作破坏服务器工作区
- 禁止将 `monitor.db` / `pb_data/` 等运行时数据文件纳入 git commit
**快速部署脚本**:
```bat
python scripts\_deploy.py # git pull + restart API + npm build + restart web
```
## 说明

View File

@ -1007,7 +1007,7 @@ export default function ShortsPage() {
</div>
</section>
<section className="flex min-h-[24rem] flex-col rounded-2xl border border-white/10 bg-black/25 p-4 xl:h-full xl:min-h-0">
<section className="flex flex-col rounded-2xl border border-white/10 bg-black/25 p-4 xl:h-full xl:min-h-0">
<div className="mb-3 flex items-center justify-between gap-3">
<div className="flex items-center gap-2">
<Clock3 className="h-4 w-4 text-amber-300" />