Repository navigation
Improve account management and Windows behavior; add hardening and a language setting - #49
Merged
Merged
Conversation
…ation-acl # Conflicts: # settings-ui/index.html # settings-ui/style.css # src-tauri/capabilities/lock.json # src-tauri/capabilities/main-remote.json # src-tauri/capabilities/settings.json # src-tauri/resources/bridge.js # src-tauri/src/commands.rs # src-tauri/src/settings.rs
…cycle and installer launch
Add jsonfile.rs: write to a temp file, keep the last valid copy as .bak, rename into place, and recover from .bak when the main file is unreadable. settings, accounts and app-lock now use it instead of std::fs::write, and no longer panic on serialization errors. - accounts.json unreadable: keep a .corrupt copy before falling back - app-lock.json unreadable with no backup: keep the lock on instead of silently disabling it - factory reset also removes .bak/.corrupt/.tmp files - remove_account repoints ActiveAccount; delete_profile retries while WebView2 releases files Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- unlock_password: exponential delay after 3 wrong guesses, Argon2 off the UI thread; password minimum 6; reset requires explicit confirmation - downloads: open only an allowlist of file types, others reveal in folder - webview permissions granted to https://web.whatsapp.com only - CSP for the local UI; bounded dlog - poison-tolerant mutex helper; atomic lock_now test-and-set - JSON files tolerate a UTF-8 BOM - CI: fmt + clippy, actions pinned by SHA; install.ps1 verifies SHA-256 - a11y: focus-visible on lock screen, aria-labelledby on dialogs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Portuguese (Brazil) stays the default. Settings > Aparência > Idioma switches the language immediately and persists it in settings.json (`language`). - i18n.rs: Portuguese source strings with an English table (tr/trf); a test fails when a translatable literal has no English entry - settings-ui/i18n.js: translates text nodes and aria/title/placeholder attributes for the settings, lock and shell pages, live on change - bridge.js / integration.js: account switcher and download toasts follow the language set by Rust (window.__WR_LANG) - tray, native menu, notifications, errors and window titles are translated; the language change re-applies them without a restart - lock screen shows the localized "too many attempts" wait - CI runs the language and notification test suites Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
matheuscardosoj
marked this pull request as ready for review
October 22, 2026 23:09
Resolved against the integrated Windows account sessions and the language setting: - menu-bar-only settings row is Portuguese/English like the rest of the page and keeps upstream's macOS-only wiring (menubar_only, SettingsView) - macOS menu-bar logic lives in the non-Windows show/toggle paths - background throttling policy added to the shared account webview builder - early settings load in setup() feeds the language and menu-bar mode Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The language commit left i18n.rs, i18n.js and i18n.test.mjs untracked, so CI could not find `mod i18n`. Also fix errors that only show on macOS/Linux (CI had never compiled this branch there): - aumid: import Manager only on Windows - integration: detach/attach return directly per platform (no unreachable code) - notify: show_for_account does not warn about `label` off Windows - menubar: ensure_window works with open_account_window returning () Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <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
Follow-up account/session and Windows usability work from the
developmentbranch, now with a hardening pass and an interface-language setting.Accounts and Windows usability (earlier commits on this branch)
Hardening (new)
.bak; an unreadableapp-lock.jsonwith no backup now keeps the lock on instead of silently disabling it, and an unreadableaccounts.jsonis preserved as.corrupt. A UTF-8 BOM is accepted.https://web.whatsapp.com; CSP for the local pages; bounded diagnostic log.lock().unwrap()(release builds usepanic = "abort");lock_nowflips the state atomically.cargo fmt --check,clippy -D warnings, actions pinned by SHA, plus the notification and language test suites.install.ps1verifies the release asset's SHA-256.Language (new)
languageinsettings.json. The default stays pt-BR in this branch; please say if you would rather default to English upstream.src-tauri/src/i18n.rs,settings-ui/i18n.js); a string without an entry is shown as written. Tests fail when a new UI string has no English entry.Validation
cargo test --locked: 142 passed.cargo clippy --locked --all-targets -- -D warningsandcargo fmt --check: clean.settings-ui/i18n.test.mjs) and notifications (4 passed).app-lock.json(stays locked), recovery from.bak, and corruptaccounts.json(kept as.corrupt).0.6.9builds (tauri build --bundles nsis); the language switch was checked by hand in the installed0.6.9-local.11build.Review notes
window.rs) was written without a Linux build here, so the Linux CI job is its first compile; macOS is unvalidated.masterincludes the branch's earlier account and Windows work; please review that scope before merging.