Skip to content

Add Ollama auto-translation and preloading settings#5261

Open
Ian729 wants to merge 2 commits intoRanchero-Software:mainfrom
Ian729:main
Open

Add Ollama auto-translation and preloading settings#5261
Ian729 wants to merge 2 commits intoRanchero-Software:mainfrom
Ian729:main

Conversation

@Ian729
Copy link
Copy Markdown

@Ian729 Ian729 commented Apr 15, 2026

  • Add Ollama configuration tab in macOS Preferences
  • Auto-translate articles and display translation at the bottom
  • Show 'Translating...' indicator while translation is in progress
  • Implement background preloading for the next X articles in the timeline

- Add Ollama configuration tab in macOS Preferences
- Auto-translate articles and display translation at the bottom
- Show 'Translating...' indicator while translation is in progress
- Implement background preloading for the next X articles in the timeline
@Ian729
Copy link
Copy Markdown
Author

Ian729 commented Apr 15, 2026

Translation UI:
Screenshot 2026-04-15 at 16 18 16
Translating UI:
Screenshot 2026-04-15 at 16 18 36
Configuration UI:
Screenshot 2026-04-15 at 16 18 56

Fixes several critical issues introduced in the Ollama auto-translation feature:
- Fix Queue Starvation: Preloading tasks are now proper URLSessionDataTasks that get cancelled if the user scrolls away, preventing the network queue from filling up.
- Fix Race Condition: When translating an article that is already being preloaded, it attaches to the existing network task instead of firing a duplicate request.
- Fix XSS Vulnerabilities: Use  instead of  to inject the translated text into the WebView.
- Fix Context Window Limits: Apply  to the article payload before sending it to Ollama to prevent model truncation and token overflow.
- Clean up UserDefaults: Move initialization logic out of the Preferences view controller and correctly define them in  using .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant