fix: enable WebUI without --http-record and update docs#8
Open
pepedd864 wants to merge 1 commit into
Open
Conversation
- Allow NewRecorder to work without file path (in-memory only mode) - Always create recorder when --http-parse is enabled, so /api/records and /ws/records routes are registered regardless of --http-record - Fix README: wrong command path, missing --http-parse flag, wrong CA cert path, missing lowercase proxy env vars, missing macOS keychain install step, wrong project structure - Fix README_EN: same issues as above
|
It's good, but api3.cursor.sh is pin certs. can't cap any in api3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Fix: WebUI not working without
--http-recordReproduce:
go run ./cmd/cursor-tap start --http-parse(without--http-record)Failed to fetchon/api/records/api/recordsreturns 404,/ws/recordsWebSocket connection failsRoot Cause:
The
/api/recordsand/ws/recordsroutes are only registered whens.recorder != nil(seeinternal/proxy/server.go:499-505). However, the recorder is only created when--http-recordis specified (seeinternal/proxy/server.go:93-110). This means the WebUI API endpoints are unavailable unless the user also provides a file path for recording, which is not obvious from the README.Fix:
internal/httpstream/recorder.go: AllowNewRecorderto work with empty file path (in-memory only mode). Skip file operations when path is empty, but still maintain memory cache and callbacks for WebSocket broadcasting.internal/proxy/server.go: Always create recorder when--http-parseis enabled, regardless of--http-record. If--http-recordis also specified, records are written to file as before; otherwise in-memory only.Docs: Multiple inaccuracies in README
go run ./cmd/proxy→go run ./cmd/cursor-tap start --http-parse--http-parseflag: WebUI depends on this flag but it was never mentioned~/.cursor-tap/ca.crt→~/.cursor-tap/ca/ca.crt(code generates it inca/subdirectory)http_proxy/https_proxyover uppercase versionsNODE_EXTRA_CA_CERTS; must install CA to system keychain viasudo security add-trusted-certopen -a Cursordoes not inherit environment variablescmd/proxy/→cmd/cursor-tap/, missingapi/andmitm/directoriesRelated Issues
Closes #1 - Fixed wrong command path
cmd/proxy→cmd/cursor-tapCloses #9 - Fixed WebUI not working without
--http-record