Add real-time translation and fix Settings language dropdown#63
Merged
ZhangHanDong merged 7 commits intomainfrom Apr 7, 2026
Merged
Add real-time translation and fix Settings language dropdown#63ZhangHanDong merged 7 commits intomainfrom
ZhangHanDong merged 7 commits intomainfrom
Conversation
Real-time translation: - New translation service module with OpenAI-compatible LLM API - Translation settings UI in Settings → Labs (API URL, key, model) - Translate button in room input bar with language selector popup - Debounce-based real-time translation as user types - Translation preview with Apply button to replace input text - Global config via Mutex for cross-widget access - Config auto-refreshes from global state on every event Settings language dropdown fix: - Remove broken set_type_default() custom DropDown types - Use inline DropDown instance with correct uniform/plain typing - Key insight: draw_text.color must be plain value, all other color variants must use uniform() to match shader declarations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- specs/task-realtime-translation.spec.md: complete feature spec - issues/002: Settings DropDown arrow visual artifact with root cause analysis of Makepad uniform/plain shader type system Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace Makepad DropDown widget (unsolvable shader styling issues) with custom RoundedView + Label + ExpandArrow + popup list - ExpandArrow provides animated triangle: right (>) collapsed, down (v) expanded — SDF-drawn, no SVG dependency - Add chevron_right.svg and chevron_down.svg (unused now, kept for potential future use) - Fix issue #2: DropDown arrow visual artifact no longer applies Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sistentState CI runs with RUSTFLAGS="-D warnings", so clippy warnings are errors. Box the AppState payload to reduce enum size from 512+ bytes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace reqwest::Error in UrlPreviewError with String to avoid direct reqwest crate dependency (not available on Android target) - Replace reqwest::StatusCode imports with matrix_sdk::reqwest::StatusCode (matrix-sdk re-exports reqwest) - Fix clippy unnecessary closure warnings in ok_or_else Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use English for the LLM system prompt and message format tag ([Target language:xxx]) for better compatibility across models. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The variable was only used inside #[cfg(unix)] but declared outside, causing unused variable warning on Windows (treated as error by CI). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Real-time Translation
src/room/translation.rs) with OpenAI-compatible LLM APIMutex<Option<TranslationConfig>>for cross-widget accessSettings Language Dropdown Fix
draw_text.color= plain value (base color forget_colorshader mix chain)draw_text.color_hover/focus/down=uniform()(GPU uniforms mixed in)draw_bg.*colors =uniform()set_type_default()types, plain value overrides) failed because they mismatched the declaration typescolor,uniform()for everything elseTest plan
cargo buildpasses🤖 Generated with Claude Code