Skip to content

fix: i18n select_output_folder, skip_version UI sync, in-place update - #192

Merged
cheerc merged 1 commit into
mainfrom
fix/189-190-191-batch-fixes
Jun 30, 2026
Merged

fix: i18n select_output_folder, skip_version UI sync, in-place update#192
cheerc merged 1 commit into
mainfrom
fix/189-190-191-batch-fixes

Conversation

@cheerc

@cheerc cheerc commented Jun 30, 2026

Copy link
Copy Markdown
Owner

What

Batch fix for three Wave 3 issues:

How

#189 — i18n

  • Added "select_output_folder" to both en-US.json and zh-TW.json
  • Removed || "Select output folder" fallback from ActionBar.tsx:146 — the fallback masked the missing key and showed English to Chinese users

#190 — UI state sync

#191 — In-place update

  • Modified _macos_copy() in update_manager.py:
    1. App NOT in /Applications + original dir writable → atomic swap in-place at original location
    2. App NOT in /Applications + original dir NOT writable → install to /Applications (existing fallback)
    3. App IS in /Applications → atomic swap (unchanged)
  • Extended tests/test_update_manager.py with TestMacOSCopyInPlace (3 new test cases)

Scope

frontend/src/components/ActionBar.tsx, frontend/src/components/SettingsModal.tsx, src/resources/translations/, src/update_manager.py, tests/test_update_manager.py

Lessons

Test Evidence

  • Full test suite: 258 passed
  • Ruff lint: All checks passed
  • Frontend build (tsc + vite): PASS
  • New TestMacOSCopyInPlace: 3/3 passed

Closes #189
Closes #190
Closes #191

🤖 Generated with Claude Code

…date

#189: Add select_output_folder translation key (en-US + zh-TW)
       Remove fallback in ActionBar.tsx — fallback masked missing key

#190: Sync skippedVersion React state after manual checkUpdate(true)
       Backend clears skip_version but frontend state was stale

#191: In-place .app replacement when running from non-/Applications
       - Writable original dir → atomic swap in-place
       - Not writable → install to /Applications (existing behavior)
       - In /Applications → atomic swap (unchanged)

Closes t-20260630020921334552-3265-0

Co-authored-by: DeepSeek v4 Pro <noreply@deepseek.com>
@cheerc

cheerc commented Jun 30, 2026

Copy link
Copy Markdown
Owner Author

Verdict: VERIFIED

Findings:

  • [Stage 1 - correctness] The i18n keys are properly populated, and the fallback issue masking the translation is fixed.
  • [Stage 1 - correctness] The UI sync for skip_version accurately resets the frontend state when manual check completes.
  • [Stage 1 - correctness] The macOS update manager copy logic robustly handles non-/Applications bundle replacement with defensive writable checks. CI and unit tests successfully validate the new code branches.

Evidence

  • cited: src/update_manager.py:84 — if os.access(original_app.parent, os.W_OK):
  • ran: gh pr checks 192 --repo cheerc/simple-edge-tts → CI passed
  • ran: grep_search for conflict markers → No results found

@cheerc

cheerc commented Jun 30, 2026

Copy link
Copy Markdown
Owner Author

Review Verdict: VERIFIED ✅

Reviewed HEAD: 3105c1e24652ecdaf7cd985a023de5e034bee999
Reviewer: set-team-reviewer2
Depth: D2 (diff + 1-hop import chain — update_manager.py has runtime logic)
Audit mode: standard (batch fix covering i18n, React state, macOS install)
Scope source: ci-ready-for-action (cheerc/simple-edge-tts@fix/189-190-191-batch-fixes)


Evidence

ran: gh pr checks 192 --repo cheerc/simple-edge-tts → SUCCESS (Lint & Test)
ran: rg '^(<<<<<<<|=======|>>>>>>>)' ~/Projects/simple-edge-tts/ -g '!.git' -g '!*.md' → no conflict markers
cited: PR body — Closes #189, Closes #190, Closes #191
cited: tests/test_update_manager.py:349-436 — 3 new tests covering all _macos_copy branches

Findings Summary

# Change Verdict
#189 Add select_output_folder to en-US + zh-TW, remove fallback in ActionBar.tsx ✅ Correct
#190 setSkippedVersion(null) after manual check_update in SettingsModal.tsx ✅ Correct
#191 _macos_copy() 3-branch refactor (in-place / /Applications fallback / atomic swap) ✅ Correct

Stage 1 — Correctness

#189 — i18n specifics

  • select_output_folder key added to both en-US.json and zh-TW.json — consistent with existing i18n pattern
  • Fallback || "Select output folder" removed from ActionBar.tsx:146 — correct now that key exists; other locales without this key will see the key name (consistent with codebase pattern for other keys)

#190 — State sync specifics

  • setSkippedVersion(null) correctly placed after api.checkUpdate(true) succeeds
  • Ref comments #184 and #190 properly documented in code
  • No stale state path remains: user will no longer see "Skipped: vX.X.X" after manual check

#191 — _macos_copy logic review

  • Case 1 (in-place, writable): Path(sys.executable).resolve().parents[2] correctly resolves .app bundle root from executable path → .old backup + atomic move → correct
  • Case 2 (not writable → /Applications): Same fallback as previous not-in-/Applications behavior → correct
  • Case 3 (already in /Applications): Original atomic swap fully preserved → correct
  • All 3 branches set self._macos_installed_app — no unbound variable path
  • os.access(original_app.parent, os.W_OK) — proper writability check before attempting in-place install

Stage 2 — Adversarial

  • No adversarial findings. The _macos_copy restructure correctly preserves all existing behavior while adding the in-place path. Edge cases (existing .old cleanup, symlinked executables resolved via .resolve(), concurrent update risk) are unchanged from existing code.

Verdict

VERIFIED — all 3 fixes are correct, well-tested, and properly documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant