Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 885318d3c1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| prompt = prompt, | ||
| ) | ||
|
|
||
| if (result != null) { |
There was a problem hiding this comment.
Treat null translation result as failure
When TranslationProvider.translateDocumentJson returns null (for example, missing OpenAI credentials or unavailable on-device model), translateHtmlContent currently falls through and returns the original HTML as a successful state instead of surfacing an error. This makes RSS translation look like a successful no-op and suppresses the retry/error path in the UI, so users cannot tell configuration/network failures from successful translation.
Useful? React with 👍 / 👎.
| switch onEnum(of: translatePresenter.state.translatedHtml) { | ||
| case .success(let data): return String(data.data) | ||
| case .loading, .error: return nil | ||
| } |
There was a problem hiding this comment.
Surface RSS translation errors in iOS UI
The iOS RSS translation wrapper maps .error to nil exactly like .loading, so translation failures are silently treated as “just show original content.” After users tap Translate, the translate button is hidden, so in failure cases they get no error feedback and no in-screen retry path. This will make transient/network/config issues look like the feature is broken or inactive.
Useful? React with 👍 / 👎.
No description provided.