File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## Summary
2+
3+ - what changed
4+ - why it changed
5+
6+ ## User Visible Changes
7+
8+ - UI / workflow / protocol visualization changes
9+ - npm / CLI installation changes
10+
11+ ## Validation
12+
13+ - [ ] ` npm test `
14+ - [ ] ` npm run pack:check `
15+ - [ ] manual smoke test in browser
16+
17+ ## Risks
18+
19+ - request / response parsing
20+ - tool call / tool response chain
21+ - workspace mirror / terminal behavior
22+
23+ ## Screenshots
24+
25+ - before / after if UI changed
Original file line number Diff line number Diff line change 1+ # Contributing To codex-viewer
2+
3+ ## Branch Strategy
4+
5+ - ` main ` :稳定分支,只接收已通过验证和代码评审的改动
6+ - ` codex/* ` :Codex 或日常开发分支
7+ - ` feat/* ` 、` fix/* ` :也可以保留给人工开发使用
8+
9+ 推荐分支命名:
10+
11+ ``` bash
12+ codex/< short-description>
13+ ```
14+
15+ 例如:
16+
17+ ``` bash
18+ codex/real-gpt-trace
19+ codex/npm-release
20+ fix/json-modal-scroll
21+ ```
22+
23+ ## Local Development Checklist
24+
25+ 开始开发前:
26+
27+ ``` bash
28+ npm install
29+ ```
30+
31+ 提交前至少执行:
32+
33+ ``` bash
34+ npm test
35+ npm run pack:check
36+ ```
37+
38+ 如果改动涉及前端界面,建议额外手动检查:
39+
40+ - ` codex input `
41+ - ` request visualization `
42+ - ` timeline `
43+ - ` protocol `
44+ - ` view json `
45+
46+ ## Pull Request Workflow
47+
48+ 1 . 从 ` main ` 创建新分支
49+
50+ ``` bash
51+ git checkout main
52+ git pull
53+ git checkout -b codex/< short-description>
54+ ```
55+
56+ 2 . 完成开发与自测
57+
58+ 3 . 提交代码
59+
60+ ``` bash
61+ git add .
62+ git commit -m " short summary"
63+ ```
64+
65+ 4 . 推送分支
66+
67+ ``` bash
68+ git push -u origin HEAD
69+ ```
70+
71+ 5 . 创建 Draft PR
72+
73+ PR 标题建议:
74+
75+ ``` text
76+ [codex] short summary
77+ ```
78+
79+ 6 . 在 PR 描述中写清楚:
80+
81+ - 改了什么
82+ - 为什么要改
83+ - 用户能看到什么变化
84+ - 如何验证
85+ - 是否有风险或已知限制
86+
87+ 7 . 完成 Code Review 后再转为 Ready for review / 合并
88+
89+ ## PR Review Focus
90+
91+ 评审时重点看:
92+
93+ - 是否影响请求拦截链路
94+ - request / response / tool call / tool response 展示是否清晰
95+ - 多轮上下文是否被正确保留
96+ - npm CLI 安装与启动是否仍然可用
97+ - 是否引入了敏感文件、证书、私钥或本地缓存
98+
99+ ## Sensitive Files
100+
101+ 以下文件或目录不要提交:
102+
103+ - ` .codex-viewer/mitm-ca/ `
104+ - ` .npm-cache/ `
105+ - ` node_modules/ `
106+ - 本地日志、临时文件、证书和私钥
107+
108+ ## Release Flow
109+
110+ 发布前建议按顺序执行:
111+
112+ ``` bash
113+ npm whoami
114+ npm test
115+ npm run pack:check
116+ npm publish --access public
117+ ```
118+
119+ 如果账号启用了 2FA,发布时需要补 ` --otp=<code> ` 。
Original file line number Diff line number Diff line change 3838### 全局安装
3939
4040``` bash
41- npm install -g codex-viewer
41+ npm install -g @joyang1/ codex-viewer
4242```
4343
4444安装完成后可直接运行:
@@ -50,7 +50,7 @@ codex-viewer --port 3789
5050### 免安装快速运行
5151
5252``` bash
53- npx codex-viewer --port 3789
53+ npx @joyang1/ codex-viewer --port 3789
5454```
5555
5656## 前置条件
@@ -161,6 +161,23 @@ node bin/codex-viewer.js --port 3789
161161npm run pack:check
162162```
163163
164+ ## 协作与 PR 流程
165+
166+ 仓库已经补了一套可直接执行的协作流程:
167+
168+ - PR 流程说明:[ ` CONTRIBUTING.md ` ] ( ./CONTRIBUTING.md )
169+ - PR 模板:[ ` ./.github/pull_request_template.md ` ] ( ./.github/pull_request_template.md )
170+
171+ 推荐流程:
172+
173+ 1 . 从 ` main ` 拉最新代码
174+ 2 . 新建功能分支,例如 ` codex/feature-name `
175+ 3 . 开发完成后先执行:
176+ - ` npm test `
177+ - ` npm run pack:check `
178+ 4 . 推送分支并创建 Draft PR
179+ 5 . CR 通过后再合并到 ` main `
180+
164181## 发布到 npm
165182
166183项目已经准备成可直接发布的 npm CLI 包。正式发布前,建议按下面顺序执行:
@@ -172,16 +189,16 @@ npm run pack:check
172189npm publish --access public
173190```
174191
175- 如果 ` codex-viewer ` 这个 unscoped 包名已被占用,建议改成组织作用域,例如 :
192+ 当前仓库默认使用作用域包名 :
176193
177194``` bash
178- @your-scope /codex-viewer
195+ @joyang1 /codex-viewer
179196```
180197
181198对应安装命令会变成:
182199
183200``` bash
184- npm install -g @your-scope /codex-viewer
201+ npm install -g @joyang1 /codex-viewer
185202```
186203
187204## 建议在发布前再补一项
You can’t perform that action at this time.
0 commit comments