You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds DEV_UNLIMITED mock SSE in worker, dev_server.js, and UI toggle in CompanionPanelView and CompanionManager to allow local testing against a dev proxy (no real API calls). Intended for local development only.
Hi, The dev worker base URL is accepted from a free-form text field and stored without validation, but both ClaudeAPI and ElevenLabsTTSClient force-unwrap URL(string:), so malformed input can crash the app when clients are recreated.
Severity: action required | Category: reliability
How to fix: Validate URL before saving
Agent prompt to fix - you can give this to your LLM of choice:
Issue description
Dev proxy URL is user-entered and stored without validation, but downstream clients force-unwrap URL initialization, which can crash the app.
Validate trimmed with URLComponents/URL (require http/https scheme, host present) before persisting.
If invalid, do not update UserDefaults and expose an error state to the UI.
leanring-buddy/ClaudeAPI.swift[17-20]
Replace force-unwrap with throwing init or graceful error.
leanring-buddy/ElevenLabsTTSClient.swift[23-25]
Replace force-unwrap with throwing init or graceful error.
leanring-buddy/CompanionPanelView.swift[651-697]
Display validation error and disable Save when invalid.
Spotted by Qodo code review - free for open-source projects.
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
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.
Adds DEV_UNLIMITED mock SSE in worker, dev_server.js, and UI toggle in CompanionPanelView and CompanionManager to allow local testing against a dev proxy (no real API calls). Intended for local development only.