Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces an embedded desktop login browser to enable Google/YouTube Music sign-in on Desktop builds where a native WebView was previously unavailable. (Pull request này giới thiệu trình duyệt đăng nhập nhúng trên Desktop để cho phép đăng nhập Google/YouTube Music trên các bản Desktop nơi trước đây không có WebView gốc.)
Changes:
- Adds a desktop Chromium (KCEF/CEF) runtime bootstrap with download/extract progress UI, cookie access, and storage cleanup support. (Thêm cơ chế khởi tạo runtime Chromium (KCEF/CEF) trên Desktop với UI tiến trình tải/giải nén, truy cập cookie và hỗ trợ dọn dẹp dữ liệu lưu trữ.)
- Adds settings/UI to show desktop login browser storage usage and optionally remove it after successful login. (Thêm cài đặt/UI để hiển thị dung lượng trình duyệt đăng nhập Desktop và tùy chọn xóa nó sau khi đăng nhập thành công.)
- Wires the login screen to optionally clear the desktop browser storage after login and refactors login completion handling. (Kết nối màn hình đăng nhập để tùy chọn xóa dữ liệu trình duyệt Desktop sau đăng nhập và tái cấu trúc xử lý hoàn tất đăng nhập.)
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/libs.versions.toml | Adds the compose-webview-multiplatform dependency entry for Desktop webview/cookie utilities. (Thêm mục phụ thuộc compose-webview-multiplatform cho các tiện ích webview/cookie trên Desktop.) |
| desktopApp/src/jvmMain/kotlin/com/maxrave/simpmusic/Main.kt | Sets a Linux renderer system property early in startup to improve Desktop rendering compatibility. (Thiết lập thuộc tính hệ thống renderer trên Linux sớm khi khởi động để cải thiện tương thích hiển thị Desktop.) |
| composeApp/build.gradle.kts | Adds the compose webview dependency to the JVM source set for Desktop usage. (Thêm phụ thuộc compose webview vào source set JVM để dùng trên Desktop.) |
| composeApp/proguard-desktop-rules.pro | Keeps and suppresses warnings for CEF/KCEF classes to avoid release obfuscation/runtime issues. (Giữ và tắt cảnh báo cho các lớp CEF/KCEF để tránh lỗi obfuscation/runtime ở bản release.) |
| composeApp/src/jvmMain/kotlin/com/maxrave/simpmusic/expect/ui/DesktopLoginBrowser.jvm.kt | Implements the Desktop embedded Chromium login browser lifecycle, progress UI, cookie access, and storage clearing. (Triển khai vòng đời trình duyệt Chromium nhúng trên Desktop, UI tiến trình, truy cập cookie và xóa dữ liệu lưu trữ.) |
| composeApp/src/jvmMain/kotlin/com/maxrave/simpmusic/expect/ui/Cookies.jvm.kt | Removes the previous placeholder Desktop webview/cookie implementation. (Xóa triển khai webview/cookie Desktop dạng placeholder trước đây.) |
| composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/expect/ui/Cookies.kt | Adds Desktop login browser manager/storage APIs to the common expect surface. (Thêm API quản lý/dung lượng trình duyệt đăng nhập Desktop vào bề mặt expect dùng chung.) |
| composeApp/src/androidMain/kotlin/com/maxrave/simpmusic/expect/ui/Cookies.android.kt | Provides Android actuals for the new Desktop login browser manager APIs (no-op / not supported). (Cung cấp actual Android cho các API quản lý trình duyệt đăng nhập Desktop mới (không làm gì / không hỗ trợ).) |
| composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/viewModel/SettingsViewModel.kt | Persists and exposes the “remove desktop login browser after login” preference. (Lưu và cung cấp tuỳ chọn “xóa trình duyệt đăng nhập Desktop sau khi đăng nhập”.) |
| composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/ui/screen/login/LogInScreen.kt | Uses the new preference to optionally clear desktop browser storage after successful login and consolidates login completion logic. (Dùng tuỳ chọn mới để tuỳ chọn xóa dữ liệu trình duyệt Desktop sau đăng nhập thành công và gom logic hoàn tất đăng nhập.) |
| composeApp/src/commonMain/kotlin/com/maxrave/simpmusic/ui/screen/home/SettingScreen.kt | Adds settings UI for desktop login browser storage display, clearing, and the post-login removal toggle. (Thêm UI cài đặt cho hiển thị dung lượng trình duyệt đăng nhập Desktop, xóa dữ liệu và công tắc xóa sau đăng nhập.) |
| composeApp/src/commonMain/composeResources/values/strings.xml | Adds user-facing strings for desktop login browser management and the new toggle. (Thêm chuỗi hiển thị cho người dùng để quản lý trình duyệt đăng nhập Desktop và công tắc mới.) |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
I hate waste 100MB to embed WebView engine to the app :))) |
|
All of WV solution in Desktop, I tried one year ago, so I choose never use |
|
I tried logging into the SimpMusic desktop app on Debian using YouTube cookies extracted from Firefox, but it didn't work. The desktop app is not working properly right now, and even the blog post explaining how to log in to the SimpMusic desktop app has comments saying people can't log in. The app is completely unusable now 😭 https://www.simpmusic.org/blogs/how-to-log-in-on-desktop-app |
This adds a working google login page to the desktop apps. Before, compose multiplatform did not have a desktop WebView for logging in
Uses an embedded Chromium login page and Auto downloads browser files when opening login page , shows progress, reuses if user has option disabled to delete (default) saves login cookies automatically and returns back to app on it's own, has a setting to clear browser to save space, disables passkey requests to use password instead
Tested on Fedora Linux
Should support Windows and Mac but I did not test