Skip to content

**Actionable comments posted: 8** #139

Description

@ZSKAI-OS

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.gitignore:
- Line 4: Remove the package-lock.json entry from .gitignore and add the root
package-lock.json to version control so dependency installations use the
committed dependency graph.

In `@apps/ide/src/project.test.ts`:
- Around line 99-105: Remove the hard-coded production-domain assertion in the
CNAME test and delete the placeholder public/CNAME configuration, leaving the
production domain unset until a verified domain is supplied through
deployment-specific configuration.

In `@apps/ide/src/services/github.ts`:
- Around line 52-58: Update createRepo in apps/ide/src/services/github.ts to
default repository visibility to private, or accept an explicit visibility
parameter whose default is private; only create public repositories when the
caller explicitly selects that option. Update the assertions in
apps/ide/src/services/github.test.ts lines 99-114 to verify the private default
and explicit public selection.
- Around line 45-49: Update getGitHubUser to check response.ok before parsing
the response and throw a controlled error for non-2xx responses, including 401
and 403. Update the App.tsx caller to catch this error, clear the stored token,
and require the user to sign in again instead of treating the error payload as a
GitHubUser. Add coverage for the 401 response path.
- Around line 17-21: Hoàn thiện luồng OAuth trong
apps/ide/src/services/github.ts tại getGitHubAuthorizeUrl và hàm đổi mã ở dòng
24-29: tạo và truyền state cùng redirect_uri, xử lý callback phía server để giữ
client secret, kiểm tra state, đổi code với đầy đủ client_id, client_secret và
redirect_uri, rồi trả về session ứng dụng thay vì lưu GitHub token trong
localStorage. Cập nhật apps/ide/src/services/github.test.ts dòng 40-63 để kiểm
thử callback thành công, state không khớp và lỗi đổi mã.
- Around line 73-82: The file creation/update flow in
apps/ide/src/services/github.ts (lines 73-82) must not hardcode the main branch;
pass the default_branch returned by createRepo into the PUT request, or omit the
branch field so GitHub selects the repository default. Update the related
expectations or setup in apps/ide/src/services/github.test.ts (lines 182-191) to
reflect the default-branch behavior.

In `@docs/roadmap.md`:
- Line 38: Đổi trạng thái mục roadmap về chưa hoàn thành, vì GitPanel chưa xử lý
tham số ?code= sau redirect. Chỉ đánh dấu hoàn thành sau khi OAuth callback gọi
serverless function, dùng exchangeGitHubCode phía máy chủ để đổi mã thành công
và lưu access_token.

In `@REVIEW_TASKS.md`:
- Line 9: Cập nhật mục trạng thái trong REVIEW_TASKS.md để phản ánh đúng việc
khóa phiên bản Sandpack: kiểm tra `@codesandbox/sandpack-react` trong
apps/ide/package.json và либо thay "latest" bằng phiên bản cụ thể có range
caret, либо bỏ dấu hoàn thành/chuyển mục này thành nhiệm vụ chưa hoàn thành nếu
manifest chưa được cập nhật.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b961e656-966b-4eae-89f5-32d430baef63

📥 Commits

Reviewing files that changed from the base of the PR and between 82879d2 and 1a8d4c2.

📒 Files selected for processing (24)
  • .gitignore
  • README.md
  • REVIEW_TASKS.md
  • apps/docs/package.json
  • apps/docs/src/App.test.tsx
  • apps/docs/src/App.tsx
  • apps/docs/src/main.test.tsx
  • apps/docs/src/project.test.ts
  • apps/docs/src/setupTests.ts
  • apps/docs/tsconfig.json
  • apps/docs/vite.config.ts
  • apps/ide/package.json
  • apps/ide/src/App.test.tsx
  • apps/ide/src/App.tsx
  • apps/ide/src/main.test.tsx
  • apps/ide/src/project.test.ts
  • apps/ide/src/services/github.test.ts
  • apps/ide/src/services/github.ts
  • apps/ide/src/setupTests.ts
  • apps/ide/tsconfig.json
  • apps/ide/vite.config.ts
  • docs/roadmap.md
  • package.json
  • tsconfig.base.json
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • nvht2505-dot/CodeSandBox (manual) → reviewed against branch coderabbitai/recipe4/82879d2 instead of the default branch
  • nvht2505-dot/auren-cli (manual)
  • nvht2505-dot/react (auto-detected)
  • nvht2505-dot/vite (auto-detected)
🚧 Files skipped from review as they are similar to previous changes (10)
  • apps/docs/tsconfig.json
  • apps/ide/tsconfig.json
  • apps/docs/vite.config.ts
  • package.json
  • tsconfig.base.json
  • apps/docs/src/App.tsx
  • apps/docs/package.json
  • apps/ide/package.json
  • apps/ide/src/App.tsx
  • README.md
📜 Review details
⚠️ CI failures not shown inline (2)

GitHub Actions: Labeler / label: Merge pull request #4 from nvht2505-dot/codex/tim-loi-anh-may-trong-ma-goc

Add review follow-up tasks

Conclusion: failure

View job details

##[group]Run actions/labeler@v4
 with:
   repo-***REDACTED_SECRET_ASSIGNMENT***
   configuration-path: .github/labeler.yml
   sync-labels: false
   dot: false
 ##[endgroup]
 (node:2226) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
 (Use `node --trace-deprecation ...` to show where the warning was created)
 (node:2226) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
 The configuration file (path: .github/labeler.yml) isn't not found locally, fetching via the api
 ##[warning]The config file was not found at .github/labeler.yml. Make sure it exists and that this action has the correct access rights.
 ##[error]HttpError: Not Found

GitHub Actions: Labeler / 0_label.txt: Merge pull request #4 from nvht2505-dot/codex/tim-loi-anh-may-trong-ma-goc

Add review follow-up tasks

Conclusion: failure

View job details

##[group]Run actions/labeler@v4
 with:
   repo-***REDACTED_SECRET_ASSIGNMENT***
   configuration-path: .github/labeler.yml
   sync-labels: false
   dot: false
 ##[endgroup]
 (node:2226) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
 (Use `node --trace-deprecation ...` to show where the warning was created)
 (node:2226) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
 The configuration file (path: .github/labeler.yml) isn't not found locally, fetching via the api
 ##[warning]The config file was not found at .github/labeler.yml. Make sure it exists and that this action has the correct access rights.
 ##[error]HttpError: Not Found
🧰 Additional context used
🔍 Remote MCP GitHub Copilot

Bối cảnh bổ sung phục vụ review

  • PR #68 hiện vẫn open, target main, trạng thái merge dirty; HEAD là 1a8d4c2, gồm 42 file, 1.811 additions / 597 deletions, 67 commits. PR description vẫn để trống phần Summary/Changes/How to test và toàn bộ checklist chưa đánh dấu.
  • Roadmap xác định 5 mốc lớn: Core Workspace → AI → GitHub Integration → Deploy → Collaboration/Plugin Marketplace/SDK. Các hạng mục còn thiếu đáng chú ý gồm OAuth serverless callback, chọn repository có sẵn, CI, lint, smoke test mobile, domain production và monitoring.
  • REVIEW_TASKS.md nêu hai rủi ro kỹ thuật cần ưu tiên:
    1. OAuth chưa hoàn chỉnh: chưa xử lý ?code= trong App.tsx; việc đổi code lấy token đang gọi trực tiếp GitHub từ trình duyệt.
    2. Sandpack bị remount khi cài/gỡ extension, có thể làm mất thay đổi chưa lưu ở các file khác.
  • Root package.json chỉ định các script build, typecheck, test; chưa có script lint hoặc dependency lint tương ứng.
  • Issue cha #66 hiện có nhiều issue con đang mở; riêng #59 (cli), #62 (docs) và #63 (liên kết) đều được liên kết dưới #66. Roadmap đề xuất gắn các issue này vào từng phase thay vì chỉ liệt kê chung.

Kế hoạch phát triển đề xuất

  1. Trước khi merge: xác nhận phạm vi PR, cập nhật mô tả và checklist; chạy npm run typecheck, npm run test, npm run build, đồng thời xử lý trạng thái dirty.
  2. Ưu tiên P0: hoàn tất OAuth qua serverless callback, không đổi token trực tiếp từ client; bổ sung test cho callback, lỗi token và quyền repo.
  3. Ưu tiên P1: loại bỏ việc remount Sandpack khi thay đổi extension; bổ sung test tương tác cho autosave, Quick Keys, template, export và Extension Store.
  4. Ưu tiên P1: thêm GitHub Actions chạy typecheck/test/build trên mỗi PR; sau đó bổ sung ESLint/Prettier và smoke test mobile.
  5. Ưu tiên P2: triển khai chọn repo có sẵn, lịch sử commit, version package trong Extension Store, domain/OAuth production, monitoring.
  6. Backlog dài hạn: AI trong IDE, collaboration realtime, plugin marketplace và SDK; liên kết rõ các hạng mục với issue con thuộc #66.
🔀 Multi-repo context nvht2505-dot/CodeSandBox, nvht2505-dot/auren-cli, nvht2505-dot/react, nvht2505-dot/vite

Linked repositories findings

CodeSandBox — branch refs/heads/coderabbitai/recipe4/82879d2

  • apps/ide/src/services/github.ts:18-25 exchanges OAuth codes directly in the browser, while docs/domain-and-dns.md and REVIEW_TASKS.md require a serverless callback to keep GITHUB_CLIENT_SECRET server-side. OAuth remains incomplete. [::nvht2505-dot/CodeSandBox::]
  • apps/ide/public/_headers:5 allows Sandpack frames/connections but does not include https://github.com in frame-src, matching the documented CSP boundary concern. [::nvht2505-dot/CodeSandBox::]
  • apps/ide/package.json:13 pins @codesandbox/sandpack-react to latest, leaving the Sandpack API unversioned and potentially unstable. [::nvht2505-dot/CodeSandBox::]

auren-cli, react, vite

  • No relevant consumers or shared contracts for the introduced GitHub service, OAuth flow, or Sandpack integration were found. [::nvht2505-dot/auren-cli::] [::nvht2505-dot/react::] [::nvht2505-dot/vite::]
🔇 Additional comments (3)
apps/ide/vite.config.ts (1)

2-9: LGTM!

apps/ide/src/main.test.tsx (1)

1-53: LGTM!

apps/ide/src/setupTests.ts (1)

1-1: LGTM!

Originally posted by @coderabbitai in #68 (review)

Metadata

Metadata

Assignees

Labels

CodeSandBoxbugSomething isn't workingcodexdependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentationduplicateThis issue or pull request already existsenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededinvalidThis doesn't seem rightjavascriptPull requests that update javascript codequestionFurther information is requestedtinh năng

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions