window: a Preferences tab - the window's language, and what it keeps between runs - #155
Conversation
…eir tab The window carried the output directory and the keyboard between screens through maps keyed by each tab's word. A translation may call two screens by one word, and they would have become one screen to everything keyed that way. parts.Tab carries an ID beside its text, and every map in open.go is keyed by it. TestTwoTabsCalledTheSameAreStillTwoScreens loads a catalogue that gives the first two tabs one word and moves the directory between them both ways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…between runs The window speaks the language chosen on the new Preferences tab, or the system's language when nobody chose one, or English (docs D9 changed by the owner on 2026-09-29). Polish is the first language beside English: all 171 entries of the window's catalogue. The choice takes effect from the next start. The screens ask for their words once, when they are built, so a switch in place would rebuild every screen around its state. Restart now closes the window the way the close button does - runs stopped, the output folder written down - and the program starts again only after the window's loop has ended, so the new window reads everything the old one wrote. It stands down while files are being made. "What this window remembers" says what is kept, where, and offers Forget, which removes only this program's own values and keeps nothing more at the close that follows. The promise lives in window.Forgetting, where a guard can reach it, rather than behind cgo. --pseudo-language opens the window with every word accented and about two fifths longer, to see how a translation will sit on each screen. Tabs are "Preferences" rather than "Settings", because Settings is already the section of the form holding a format's own settings. Guards: the language rules, every catalogue complete with every plural form go-i18n needs, every letter in the Inter faces (read from their cmap), the pseudo language keeping values, and the screen's behaviour - nothing written by opening it, Restart now off while busy and closing the way a person does, Forget writing nothing back. Two new stored screens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (31)
📒 Files selected for processing (54)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (20)
🧰 Additional context used📓 Path-based instructions (14)Applies to text shown to the user (labels, buttons, tooltips, placeholders, dialogs, errors, status messages, empty states, translations).⚙️ CodeRabbit configuration file Files:
Verify tests check real behavior and would fail if the implementation were broken.⚙️ CodeRabbit configuration file Files:
These are end-user desktop applications.⚙️ CodeRabbit configuration file Files:
Performance is a known weak spot of these projects.⚙️ CodeRabbit configuration file Files:
Applies only to code that builds or styles a GUI.⚙️ CodeRabbit configuration file Files:
User-facing changelog.⚙️ CodeRabbit configuration file Files:
Domain: test file generator (Go; `tfg` CLI and `tfg-gui` Fyne window over one engine).⚙️ CodeRabbit configuration file Files:
SECURITY, HIGH PRIORITY.⚙️ CodeRabbit configuration file Files:
These apps are QA/developer tools.⚙️ CodeRabbit configuration file Files:
Go code.⚙️ CodeRabbit configuration file Files:
Check that documentation matches the actual code in this PR: commands, flags, config keys, file paths, build steps and examples must exist.⚙️ CodeRabbit configuration file Files:
All code in this repository is written by an AI coding agent (Claude Code).⚙️ CodeRabbit configuration file Files:
Safe file parsing: Warn if the PR reads, imports or exports files (XML, XAML, CSV, XLSX, JSON, YAML, translations, themes, settings, archives) in a way that could execute code or formulas, resolve external entities, deserialize arbitrary ty...📄 CodeRabbit inference engine (Custom checks) Files:
Source excerpt: **Words a user reads are English, with a flat hyphen and no semicolons.**📄 CodeRabbit inference engine (CONTRIBUTING.md) Files:
🔇 Additional comments (47)
📝 WalkthroughWalkthroughThe window adds English and Polish language catalogues, language selection, pseudo-localization, and a Preferences tab. It persists language choices and remembered settings, supports clearing those settings, and can restart to apply a language change. ChangesWindow language and Preferences
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
actor Person
participant Preferences
participant Remembered
participant desktop
participant startInstead
Person->>Preferences: Select a language
Preferences->>Remembered: Save language choice
Person->>Preferences: Request restart
Preferences->>desktop: Schedule restart after window closes
Preferences->>Preferences: Leave window through close callback
desktop->>startInstead: Relaunch with original arguments after event loop
Suggested labels: Merge Risk: ⚪ Minimal · up to The shipped languages are valid, and the saved language is flushed before the window restarts on the inspected desktop path. No identified issue blocks merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The reviewed desktop flows clear only this program’s saved settings and wait for active work to stop before restarting. No introduced security issue was identified, but persistence failures and other platform paths remain less certain. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 11 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (11 passed)
Full details: Desktop RobustnessExplanation The PR adds a destructive Forget action without confirmation. The Forget button calls Resolution Add a confirmation dialog and call Full details: Clear User-Facing TextExplanation The PR adds a restart failure message that displays the raw process error. Resolution Replace the restart failure text with a user-facing message that states the failure and next action without inserting Full details: Scope, Duplication And DocsExplanation The PR adds the fifth Preferences tab and the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The list of tabs the guards walk named four screens, so thirteen guards passed without looking at the fifth. With Preferences on it, two exemptions are named and held both ways: that screen carries no Donate button, and its one menu stands beside no box to type in. The tab ids, the language key and --pseudo-language are not words a person reads. pseudoOf and run were split to stay under the ceilings on depth and length. From the review: the sentence after a failed restart asked to close a window that is already gone, the remembered folder is called by the name on its field, and the README names five screens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window gets a fifth tab, Preferences, and speaks Polish as well as English.
Language. The window speaks the language chosen on Preferences, or the system's language when nobody chose one, or English when the window does not have the system's language. On a system set to Polish it now opens in Polish. The choice takes effect the next time the window opens. Restart now closes the window the way the close button does (runs stopped, the output folder written down), and the program starts again only after the window's loop has ended, so the new window reads everything the old one wrote. The button is off while files are being made.
Why not switch in place: the screens ask for their words once, when they are built, and they are built once so a run in flight and everything typed survive moving between tabs. A switch in place would rebuild every screen around its state.
What this window remembers. It says what is kept (output folder, window size, language), shows the folder it is kept in, and Forget clears only this program's own values. After Forget the close writes nothing back. That promise lives in
window.Forgetting, where a guard can reach it, not behind cgo.Polish. All 171 entries of the window's catalogue, with the four plural forms Polish needs. Text that comes from the engine's registries (format settings, presets) stays English for now, since
--jsonreads it too.Tab identity. The window knew its screens by the translated word on each tab. A translation that called two screens by one word would have merged them for the output folder and the keyboard.
parts.Tabnow carries anID.--pseudo-languageopens the window with every word accented and about two fifths longer, to see how a translation sits on each screen before one exists.The tab is "Preferences" rather than "Settings", because Settings is already the section of the form holding a format's own settings.
Guards: the language rules (pl-PL finds pl, zh-TW does not take simplified Chinese), every catalogue complete in every plural form go-i18n asks for, every letter in both Inter faces (read from their cmap), the pseudo language keeping every value, two tabs with one word staying two screens, and the screen's behaviour: nothing written by opening it, Restart now off while busy and closing the way a person does, Forget writing nothing back. Two new stored screens, and the tab strip on every other one.
How it was checked on the real window (Windows 11, profile redirected so nothing touched a real preferences file): it opened in Polish, English chosen, "Uruchom ponownie" lit, pressed, and a new window opened in English at the same size, with
"language":"en"and the output folder in the preferences file.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation