Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f2ab65a
perf: optimize sorting with useMemo in translation history dialog
Y-RyuZU Jul 16, 2025
5f864fb
feat(scan): implement TX022 file count-based progress for scan operat…
Y-RyuZU Jul 16, 2025
2dd9c6a
fix(scan): improve scan progress visibility and accuracy
Y-RyuZU Jul 16, 2025
096292a
fix(scan): add progress updates during file analysis phase
Y-RyuZU Jul 16, 2025
74015d0
feat(scan): add small progress bar for scan operations
Y-RyuZU Jul 16, 2025
12be890
fix(scan): improve progress bar layout and alignment
Y-RyuZU Jul 16, 2025
6038368
fix(scan): prevent progress container from resizing with filename length
Y-RyuZU Jul 16, 2025
fa1bf6a
fix(scan): add immediate progress display when scan starts
Y-RyuZU Jul 16, 2025
5c9be53
perf(scan): optimize re-scan performance and improve feedback
Y-RyuZU Jul 16, 2025
76bf224
perf(scan): improve scan performance with better optimizations
Y-RyuZU Jul 16, 2025
29aafee
fix(scan): revert problematic optimizations causing delays
Y-RyuZU Jul 16, 2025
9291cec
refactor(scan): simplify scan function following "Simple over Easy" p…
Y-RyuZU Jul 16, 2025
59d22a2
fix(scan): add intermediate progress updates after file discovery
Y-RyuZU Jul 16, 2025
f2a7243
fix(scan): prevent UI blocking during scan button press
Y-RyuZU Jul 16, 2025
d4112e7
feat(ui): implement comprehensive animation system for better UX
Y-RyuZU Jul 16, 2025
50b7a6c
feat(backend): add translation existence checking and improve error m…
Y-RyuZU Jul 16, 2025
2c83987
fix(config): add PathsConfig interface to AppConfig
Y-RyuZU Jul 16, 2025
d663771
feat(scan): implement file count-based progress bars for scan operations
Y-RyuZU Jul 16, 2025
15c07fd
refactor(json): implement sorted JSON serialization for consistency
Y-RyuZU Jul 16, 2025
88bfa3a
feat(backend): enhance backup system and logging with consistency imp…
Y-RyuZU Jul 16, 2025
4bd5b04
feat(i18n): add translations for scan progress and error messages
Y-RyuZU Jul 16, 2025
9046861
fix(lint): remove unused FileService import from settings-dialog
Y-RyuZU Jul 16, 2025
d4fb54f
fix: apply cargo fmt for Rust formatting compliance
Y-RyuZU Jul 17, 2025
f726f5f
fix(ui): constrain maximum widths for better layout consistency
Y-RyuZU Jul 17, 2025
88c3398
fix(clippy): resolve uninlined_format_args warnings
Y-RyuZU Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 120 additions & 20 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
types: [opened, synchronize, reopened]

jobs:
validate:
name: Validate PR
frontend-tests:
name: Frontend Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -16,12 +16,60 @@ jobs:
with:
bun-version: latest

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install

- name: Run linting (TypeScript)
run: bun run lint

- name: Run type checking
run: bun run typecheck

- name: Run unit tests (Jest)
run: bun run test:jest

- name: Run unit tests (Bun)
run: bun test src/lib/services/__tests__/update-service.test.ts src/lib/services/__tests__/*.bun.test.ts

- name: Run critical E2E tests
run: |
bun test src/__tests__/e2e/translation-e2e-simple.test.ts
bun test src/__tests__/e2e/skip-existing-translations-e2e.test.ts

- name: Generate test coverage
run: bun run test:coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: frontend
name: frontend-coverage
fail_ci_if_error: false

backend-tests:
name: Backend Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Cache dependencies
- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
Expand All @@ -30,49 +78,101 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
node_modules
key: ${{ runner.os }}-pr-${{ hashFiles('**/Cargo.lock', '**/bun.lockb') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-pr-
${{ runner.os }}-cargo-

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install dependencies
run: bun install

- name: Check formatting (Rust)
run: cargo fmt --manifest-path src-tauri/Cargo.toml -- --check

- name: Run Clippy
run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-features --tests -- -D warnings

- name: Run linting (TypeScript)
run: bun run lint
- name: Run Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml --all-features

- name: Run type checking
run: bun run typecheck
- name: Build check
run: cargo check --manifest-path src-tauri/Cargo.toml --all-features

integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
needs: [frontend-tests, backend-tests]
steps:
- uses: actions/checkout@v4

- name: Run tests
run: npm test
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Build check
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
node_modules
~/.bun/install/cache
key: ${{ runner.os }}-integration-${{ hashFiles('**/Cargo.lock', '**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-integration-

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install dependencies
run: bun install

- name: Run realistic E2E tests
run: |
bun test src/__tests__/e2e/realistic-translation-e2e.test.ts
bun test src/__tests__/e2e/realistic-progress-e2e.test.ts
bun test src/__tests__/e2e/backup-system-e2e.test.ts

- name: Test build process
run: |
cd src-tauri
cargo check --all-features
bun run build
cargo build --manifest-path src-tauri/Cargo.toml --release

security-scan:
name: Security Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run cargo audit
uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run npm audit
run: npm audit --audit-level=moderate || true
run: bun audit --audit-level=moderate || true

- name: Check for sensitive files
run: |
if find . -name "*.key" -o -name "*.pem" -o -name "*.p12" -o -name "*.jks" | grep -v node_modules | grep -q .; then
echo "Sensitive files found"
exit 1
fi
23 changes: 20 additions & 3 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
"fallback": "Fallback to Entry-Based",
"fallbackHint": "Use entry-based chunking if token estimation fails"
},
"skipExistingTranslations": {
"title": "Skip when translations exist",
"hint": "Skip items that already have target language files (Mods, Quests, Guidebooks only)"
},
"typicalLocation": "Typical location",
"pathSettings": "Path Settings",
"minecraftDirectory": "Minecraft Directory",
Expand Down Expand Up @@ -173,8 +177,17 @@
"selectProfileDirectoryFirst": "Please select a profile directory first",
"noTargetLanguageSelected": "No target language selected. Please select a target language from the dropdown in the translation tab.",
"translationInProgress": "Translation in Progress",
"cannotSwitchTabs": "Cannot switch tabs while translation is in progress. Please wait for the current translation to complete or cancel it.",
"failedToLoad": "Failed to load"
"scanInProgress": "Scan in Progress",
"cannotSwitchTabs": "Cannot switch tabs while operation is in progress. Please wait for it to complete.",
"failedToLoad": "Failed to load",
"directoryNotFound": "Directory not found: {{path}}",
"modsDirectoryNotFound": "Mods directory not found: {{path}}. Please select a valid Minecraft profile directory.",
"questsDirectoryNotFound": "Quests directory not found: {{path}}. Please select a valid Minecraft profile directory containing quest files.",
"guidebooksDirectoryNotFound": "Guidebooks directory not found: {{path}}. Please select a valid Minecraft profile directory containing guidebook files.",
"customFilesDirectoryNotFound": "Custom files directory not found: {{path}}. Please select a valid directory containing JSON or SNBT files.",
"profileDirectoryNotFound": "Profile directory not found: {{path}}. Please select a valid Minecraft profile directory.",
"failedToLoadLogs": "Failed to load session logs",
"noMinecraftDir": "Minecraft directory is not set. Please configure it in settings."
},
"info": {
"translationCancelled": "Translation cancelled by user"
Expand Down Expand Up @@ -240,7 +253,11 @@
"failed": "Failed",
"pending": "Pending",
"in_progress": "In Progress"
}
},
"sessionDetails": "Session Details",
"viewLogs": "View Logs",
"sessionLogs": "Session Logs",
"noLogsFound": "No logs found for this session"
},
"update": {
"title": "Update Available",
Expand Down
23 changes: 20 additions & 3 deletions public/locales/ja/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
"fallback": "エントリベースへのフォールバック",
"fallbackHint": "トークン推定が失敗した場合、エントリベースのチャンク分割を使用"
},
"skipExistingTranslations": {
"title": "既存の翻訳がある場合スキップ",
"hint": "対象言語ファイルが既に存在するアイテムをスキップします(Mod、クエスト、ガイドブックのみ)"
},
"typicalLocation": "一般的な場所",
"pathSettings": "パス設定",
"minecraftDirectory": "Minecraftディレクトリ",
Expand Down Expand Up @@ -173,8 +177,17 @@
"selectProfileDirectoryFirst": "最初にプロファイルディレクトリを選択してください",
"noTargetLanguageSelected": "対象言語が選択されていません。翻訳タブのドロップダウンから対象言語を選択してください。",
"translationInProgress": "翻訳中",
"cannotSwitchTabs": "翻訳中はタブを切り替えることができません。現在の翻訳が完了するまでお待ちいただくか、キャンセルしてください。",
"failedToLoad": "読み込みに失敗しました"
"scanInProgress": "スキャン中",
"cannotSwitchTabs": "処理中はタブを切り替えることができません。処理が完了するまでお待ちください。",
"failedToLoad": "読み込みに失敗しました",
"directoryNotFound": "ディレクトリが見つかりません: {{path}}",
"modsDirectoryNotFound": "Modsディレクトリが見つかりません: {{path}}。有効なMinecraftプロファイルディレクトリを選択してください。",
"questsDirectoryNotFound": "クエストディレクトリが見つかりません: {{path}}。クエストファイルを含む有効なMinecraftプロファイルディレクトリを選択してください。",
"guidebooksDirectoryNotFound": "ガイドブックディレクトリが見つかりません: {{path}}。ガイドブックファイルを含む有効なMinecraftプロファイルディレクトリを選択してください。",
"customFilesDirectoryNotFound": "カスタムファイルディレクトリが見つかりません: {{path}}。JSONまたはSNBTファイルを含む有効なディレクトリを選択してください。",
"profileDirectoryNotFound": "プロファイルディレクトリが見つかりません: {{path}}。有効なMinecraftプロファイルディレクトリを選択してください。",
"failedToLoadLogs": "セッションログの読み込みに失敗しました",
"noMinecraftDir": "Minecraftディレクトリが設定されていません。設定で設定してください。"
},
"info": {
"translationCancelled": "翻訳はユーザーによってキャンセルされました"
Expand Down Expand Up @@ -240,7 +253,11 @@
"failed": "失敗",
"pending": "保留中",
"in_progress": "進行中"
}
},
"sessionDetails": "セッション詳細",
"viewLogs": "ログを見る",
"sessionLogs": "セッションログ",
"noLogsFound": "このセッションのログが見つかりません"
},
"update": {
"title": "アップデートが利用可能",
Expand Down
15 changes: 15 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tauri-build = { version = "2.1.0", features = [] }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
log = "0.4"
tauri = { version = "2.4.0", features = [] }
tauri = { version = "2.4.0", features = ["test"] }
tauri-plugin-log = "2.0.0-rc"
tauri-plugin-dialog = "2.0.0"
tauri-plugin-shell = "2.0.0"
Expand All @@ -34,3 +34,7 @@ chrono = "0.4"
dirs = "5.0"
rfd = "0.12"
toml = "0.8"

[dev-dependencies]
tempfile = "3.0"
tokio = { version = "1.0", features = ["full"] }
Loading
Loading