Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughMoves proxy/whistle/cert-check logic from Next.js routes into Tauri native commands, adds a runtime-aware frontend API shim, introduces desktop-only guards and AlertDialog UI, removes the Next.js whistle route, and updates frontend components, deps, and Tauri config accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as Frontend Component
participant API as lib/api.ts
participant Env as lib/tauri.ts
participant Tauri as Tauri Runtime
participant Web as Web API Route
UI->>API: certCheck({host, port, cert_pem})
API->>Env: isTauri()
Env-->>API: boolean
alt Tauri environment
API->>Tauri: invokeCommand("cert_check", args)
Tauri-->>API: CertificatePayload
else Web environment
API->>Web: POST /api/cert-check
Web-->>API: CertificatePayload
end
API-->>UI: CertificatePayload
sequenceDiagram
participant UI as Frontend Component
participant API as lib/api.ts
participant Env as lib/tauri.ts
participant Tauri as Tauri Runtime
participant Web as Web API Route
UI->>API: httpProxy({InputUrl, method, headers, body})
API->>Env: isTauri()
Env-->>API: boolean
alt Tauri environment
API->>Tauri: invokeCommand("http_proxy", request)
Tauri-->>API: ProxyResponse
else Web environment
API->>Web: POST /api/proxy
Web-->>API: ProxyResponse
end
API-->>UI: ProxyResponse
sequenceDiagram
participant UI as Frontend Component
participant API as lib/api.ts
participant Env as lib/tauri.ts
participant Tauri as Tauri Runtime
participant Cmd as Tauri whistle command
UI->>API: whistle({mode, host, port, payload...})
API->>Env: isTauri()
Env-->>API: boolean
alt Tauri environment
API->>Tauri: invokeCommand("whistle", request)
Tauri->>Cmd: whistle handler (tcp/udp send/listen)
Cmd-->>API: WhistleResponse
else
API-->>UI: throw "not available"
end
API-->>UI: WhistleResponse
Estimated code review effort🎯 4 (Complex) | ⏱️ ~65 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
Summary by cubic
Adds a unified API layer that uses Tauri commands in the desktop app and a fetch fallback in web preview. Network tools now use native sockets via Tauri, fixing CORS issues and enabling reliable TCP/UDP, port scanning, and certificate checks.
New Features
Migration
Written for commit d42531d. Summary will update on new commits.
Summary by CodeRabbit
New Features
New Components
Refactor
Chores
✏️ Tip: You can customize this high-level summary in your review settings.