Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
7415025
feat: add Traditional Chinese (Taiwan) localization
yangyws Jul 24, 2026
4f9f96c
fix: correct placeholder in zh_TW and add base zh locale
yangyws Jul 24, 2026
026791a
fix: import cupertino for page transitions
yangyws Jul 24, 2026
8a46179
feat: change applicationId to com.retro.rshop.tw and bump version to …
yangyws Jul 24, 2026
f00f099
fix: resolve language switching issue for similar language codes (zh …
yangyws Jul 24, 2026
f285cc9
feat: change app display name to R-Shop-zh
yangyws Jul 24, 2026
085205b
chore: bump version to 1.7.0-zh
yangyws Jul 24, 2026
d80a6af
\Consolidate Traditional Chinese localization to \u0027zh\u0027 local…
yangyws Jul 25, 2026
1d90fa2
chore: update generated localization files
yangyws Jul 25, 2026
859851a
\Refine Traditional Chinese terms for Taiwan localization"
yangyws Jul 25, 2026
e35cf8b
Optimize onboarding flow and map controller Select button to Import C…
yangyws Jul 25, 2026
f03bd9d
Optimize layout and add back arrows to pairing and source settings sc…
yangyws Jul 25, 2026
c8c252f
Unify back button position and header style across screens
yangyws Jul 25, 2026
98fd0eb
feat: implement gamepad-optimized ConsoleDialog and update onboarding
yangyws Jul 25, 2026
d414ec9
Fix focus highlighting issue in ConsoleDialog and ConsoleFocusable
yangyws Jul 25, 2026
305cc41
Change focus border color of console dialog buttons to white
yangyws Jul 25, 2026
e25bb24
Add custom task to copy renamed APK to D:\test apk
yangyws Jul 25, 2026
ed6db2e
Unified button selection style (white border + red background) across…
yangyws Jul 25, 2026
d566c78
chore: update APK delivery path to D:\test-apk
yangyws Jul 25, 2026
830ec85
Unified highlight style and fixed syntax errors in welcome_chooser_st…
yangyws Jul 25, 2026
9f1b5b7
chore: streamline project memory and keep project-specific UI rules
yangyws Jul 25, 2026
8f6c18b
chore: rename local project memory to AGENT.md
yangyws Jul 25, 2026
bd839d6
feat: Add 'B' button exit confirmation to onboarding screen
yangyws Jul 25, 2026
73447fa
chore: update exit dialog localization and styling
yangyws Jul 25, 2026
b02eae3
Fix: Add Material widget to ConsoleDialog to remove yellow text under…
yangyws Jul 25, 2026
eba602e
docs: add instruction to read global memory first in AGENT.md
yangyws Jul 25, 2026
9efd0ca
chore: remove AGENT.md from git tracking and update .gitignore
yangyws Jul 25, 2026
cddfdbe
chore: cleanup git and build script
yangyws Jul 26, 2026
00b4b3e
docs: add project architecture documentation ARCHITECTURE.md
yangyws Jul 30, 2026
871cce9
docs: add a spec and deep-dive architecture diagrams, correct stale r…
yangyws Jul 31, 2026
9456826
refactor: one source for platform channel names, and an explicit fact…
yangyws Aug 1, 2026
9ef24af
docs: add Traditional Chinese alongside the English docs
yangyws Aug 1, 2026
a8b2452
feat(sources): switch, add and remove connection routes
yangyws Aug 1, 2026
c980437
feat(sources): keep a separate game list per connection route
yangyws Aug 1, 2026
cf86f9a
docs: keep this project's fix log and index here
yangyws Aug 1, 2026
a15271c
docs: record that routes share the source's credentials
yangyws Aug 1, 2026
e79007e
fix(sources): probe a source that carries its address directly
yangyws Aug 1, 2026
d5d7522
feat(sources): use one source at a time, with a paired stand-in
yangyws Aug 1, 2026
b0c2fb8
docs: record wiring the failover into sync
yangyws Aug 1, 2026
5d308c2
feat(sources): name the server being synced, and let routes be edited
yangyws Aug 1, 2026
8b78ce8
fix(sources): make the overlays answer to touch, and stop the focus l…
yangyws Aug 1, 2026
a901e8c
fix(sources): the source-type picker answers to touch too
yangyws Aug 1, 2026
7ce7c9b
docs: cross-link every doc so any entry point reaches the rest
yangyws Aug 1, 2026
2836da1
feat(sources): eye toggle on each row, and a menu that can scroll
yangyws Aug 2, 2026
374e1a3
fix(sources): reach the visibility toggle by pad as well as finger
yangyws Aug 2, 2026
dac11d6
fix(sources,home): drop the stray key label, steady the header height
yangyws Aug 2, 2026
7ef6169
docs: turn the fixes that repeat into skills, and index the logs by file
yangyws Aug 2, 2026
3648340
feat(sources): bind disable, remove and in-view to the list itself
yangyws Aug 2, 2026
1031bf5
fix(sources): call it using a source, not viewing one
yangyws Aug 2, 2026
7880aa1
feat(sources): separate the source in use from the source on screen
yangyws Aug 2, 2026
af9db23
feat(sources): put both toggles on the row, with different marks
yangyws Aug 2, 2026
8cd7b0d
feat(sources): make the eye a tick-box, not a choice between sources
yangyws Aug 2, 2026
64d79aa
fix(home): drop the banner once one visible library is also the one i…
yangyws Aug 2, 2026
3d45997
fix(home): the banner names a server or it is not there
yangyws Aug 2, 2026
8df6e0c
fix(home,sources): keep the banner whenever a library is on screen
yangyws Aug 2, 2026
ff42332
refactor(sources): one on/off switch, and stop making it wait
yangyws Aug 2, 2026
cca19fb
fix(sources): turning a source off keeps its library
yangyws Aug 2, 2026
f7d49be
fix(home): the trigger ring holds the sources and nothing else
yangyws Aug 2, 2026
b4707ea
docs: add a handover so continue-where-we-left-off has somewhere to look
yangyws Aug 2, 2026
e3235df
docs: the handover carries the load-check, since it gets opened alone
yangyws Aug 2, 2026
44d58e2
docs: say the phrase at the top of the handover itself
yangyws Aug 2, 2026
0f5f79c
docs: retire the two non-tasks from the handover backlog
yangyws Aug 4, 2026
3b22900
docs: record the per-route credentials work while it is in flight
yangyws Aug 4, 2026
24765e2
feat(sources): credentials follow the route, the library follows the …
yangyws Aug 5, 2026
a49cce3
feat(sources): pick the fastest live route automatically
yangyws Aug 5, 2026
cedce1e
wip(sources): route selection modes done, source groups half-built
yangyws Aug 5, 2026
5c80bdd
docs(handover): park the source-group work with its premises intact
yangyws Aug 5, 2026
0c00280
docs(handover): drop the unsourced row count from the v16 premise
yangyws Aug 5, 2026
95c98ff
feat(sources): one cached library per group, not per member
yangyws Aug 5, 2026
427b3ff
feat(sources): group CRUD, and the order becomes a setting
yangyws Aug 5, 2026
ed42940
feat(sources): the group reaches the screen, in seven languages
yangyws Aug 5, 2026
2623fcd
fix(sources): what the device said about groups
yangyws Aug 5, 2026
c178234
docs(handover): park the group work on the one question left
yangyws Aug 5, 2026
0142277
fix(sources): the route list is edited the way the group list is
yangyws Aug 6, 2026
5294194
refactor(sources): two exclusive rows were a tickbox written the long…
yangyws Aug 6, 2026
8f09f1f
docs(agents): add user full execution authorization policy
yangyws Aug 6, 2026
5df7471
feat(sync): resolve live endpoint for winning source during resolveFo…
yangyws Aug 6, 2026
b9253f7
feat(sources): redesign multi-fallback source architecture with auto-…
yangyws Aug 6, 2026
47f5d75
Merge branch 'wip/source-groups' into main-zh
yangyws Aug 7, 2026
444354e
refactor(sources): align FallbackPickerOverlay with Source Screen Arc…
yangyws Aug 7, 2026
88ac438
fix(sources): refactor FallbackPickerOverlay into overlay card matchi…
yangyws Aug 7, 2026
35a850d
fix(sources): preserve fallback overlay state when cancelling or comp…
yangyws Aug 7, 2026
9db2fd9
fix(sources): remove cache purge on disable to eliminate UI freeze
yangyws Aug 7, 2026
40df99e
docs(handover): update status for setEnabled speedup and fresh fallba…
yangyws Aug 7, 2026
8050cfc
fix(pairing): add gamepad focus navigation and ConsoleHud to QrPairin…
yangyws Aug 7, 2026
4512099
docs/l10n: align locked/pinned terminology across all languages
yangyws Aug 7, 2026
2867f59
fix(home): remove top source banner and L2/R2 source switching from H…
yangyws Aug 7, 2026
5442e27
style(sources): unify white border and high-contrast white text style…
yangyws Aug 7, 2026
0010ed4
style(fallback): rebuild FallbackPickerOverlay to match SourcesScreen…
yangyws Aug 7, 2026
f1d84dc
style(sources): replace red-border-red-text in overlay menus with hig…
yangyws Aug 7, 2026
e452f7e
style(sources): restore red theme border and glow while rendering opt…
yangyws Aug 7, 2026
bd8cd45
style(sources): align FallbackPickerOverlay with R-Shop red theme and…
yangyws Aug 8, 2026
6b24c9a
refactor(sources): remove disable mechanism and eye icons; enforce si…
yangyws Aug 8, 2026
ee151a2
feat(sources): restore disable feature and add gamepad right-arrow fo…
yangyws Aug 8, 2026
861bf3f
feat(sources): add active failover status indicators and banners on H…
yangyws Aug 8, 2026
7fc6671
feat(sources): halt failover and display OFF badges when source or fa…
yangyws Aug 8, 2026
f3120e9
style(sources): use exact badge text 🚫 備援已暫停 (來源已停用) on disabled sour…
yangyws Aug 8, 2026
e9e7574
feat(sources): display ⚡ 備援啟用中 when fallback is enabled vs 🚫 備援已停用 wh…
yangyws Aug 8, 2026
8c44ab3
fix(sources): probe failover on SourcesScreen entry and integrate hea…
yangyws Aug 8, 2026
6b63e26
fix(sources): streamline ConsoleHud in FallbackPickerOverlay to preve…
yangyws Aug 8, 2026
570c8db
feat(home): implement Option 1 full-width failover warning bar and sy…
yangyws Aug 8, 2026
3bec6ca
fix(sources): invalidate probe cache and fix SourceChoice.isFallback …
yangyws Aug 8, 2026
ef6ef2f
style(home, sources): remove 代打 wording, compact warning bar, add tra…
yangyws Aug 8, 2026
a1eff6a
refactor(home, sync_badge): remove top warning banner and integrate f…
yangyws Aug 8, 2026
f2a8acf
style(sync_badge): allow _SyncPillContent to expand width dynamically…
yangyws Aug 8, 2026
97b178f
style(sync_badge): update failover sync pill text to ⚡ 同步中 (備援)
yangyws Aug 8, 2026
4ad6843
style(sources): remove top failover warning banner and set card badge…
yangyws Aug 8, 2026
a1ac022
style(sources, sync_badge): apply Option B wording (🛡️ 已設備援, ⚠️ 斷線 (已…
yangyws Aug 8, 2026
62710ef
fix(sources, failover): invalidate failover state instantly when remo…
yangyws Aug 8, 2026
cd90725
fix(providers): add global listener to ActiveFailoverChoiceNotifier t…
yangyws Aug 8, 2026
22bf534
docs: update FIX_LOGS.md, FIX_INDEX.md, and rebuild FIX_BY_FILE.md
yangyws Aug 9, 2026
abff30d
docs(fixlogs): record multi-fallback device verification completion a…
yangyws Aug 9, 2026
39fe797
fix(home): prevent RenderFlex overflow on grid tile count pills with …
yangyws Aug 12, 2026
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
11 changes: 11 additions & 0 deletions .agents/rules/authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# R-Shop 使用者全權授權規範 (User Authorization Policy)

> **核心指示**:使用者已明確授予 AI Agent 最高權限,全權核准並自動執行所有任務。

1. **自動核准與執行 (Full Execution Authorization)**:
- 包含但不限於:程式碼修改、檔案建立/刪除、指令執行、單元測試、專案建置、裝置部署 (Install/Deploy) 及資料操作。
- 不需要向使用者逐一中斷詢問或請求手動點擊同意,直接自動推進行動並回報結果即可。

2. **作業流程**:
- 保持自主性,遇到需要決定或核准的項目時,預設自動審核通過並繼續執行。
- 完成任務後,統一匯報修改內容與驗證結果。
124 changes: 124 additions & 0 deletions .agents/skills/rshop-build-deploy/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
name: rshop-build-deploy
description: "Build the R-Shop APK and put it on the AYN Thor. Use when: a change compiles and needs to run on hardware. Covers the JDK trap that has already cost two sessions, the setting that silently empties itself, and the signature mismatch that makes an install fail with no useful message."
argument-hint: "Optional: ADB serial if more than one device is connected"
---

# Skill: `rshop-build-deploy`

## Role

Take a finished change onto the physical device without re-diagnosing the same
three environment traps. **Every one of the traps below has already happened at
least once** — they are recorded because the error messages do not point at the
cause.

> **權限**:`AGENTS.md` §5 禁止未經允許安裝、部署、清資料。**建置與測試不用問,
> 推上裝置要問**。一個工作階段問一次就好,不是每次部署都問。

---

## Environment — verify, do not assume

| Key | Value |
| --- | --- |
| Flutter | `D:\flutter\bin\flutter.bat` — **not on `PATH`**;一定要打全路徑 |
| Gradle JDK | `C:\Program Files\Java\jdk-21` |
| ADB | `%LOCALAPPDATA%\Android\Sdk\platform-tools\adb.exe` — 同樣不在 `PATH` |
| Package | `com.retro.rshop.tw` |
| APK 備份 | `D:\test-apk\` |

---

## 先看這個:整串已經寫成腳本了

```bash
scripts/deploy.ps1
```

驗 JDK 指向 → `analyze` → `build` → `install` → 啟動 → 抓 logcat 的溢位與例外。
參數:`-SkipAnalyze`、`-NoLaunch`、`-Release`、`-Serial <serial>`。

**底下每一節是那支腳本在做什麼,以及為什麼**。手打之前先想想為什麼不用腳本。

---

## Step 0 — 先驗 JDK 指向(30 秒,省掉一小時)

```bash
type "$APPDATA/.flutter_settings"
```

必須看到 `"jdk-dir": "C:\\Program Files\\Java\\jdk-21"`。

**這個檔案會自己變空。** 已經發生過一次:設好、建置成功、隔一段時間再建又炸。
所以這是每次建置前的檢查,不是一次性設定。空的就重設:

```bash
"D:/flutter/bin/flutter.bat" config --jdk-dir "C:\Program Files\Java\jdk-21"
```

### 為什麼不能靠 `JAVA_HOME`

Flutter 挑 JDK 的順序是 **`flutter config --jdk-dir` > Android Studio 的 `jbr` > `JAVA_HOME`**。
Android Studio 的 `jbr` 是 **Java 25**,而 R-Shop 用的 Gradle 8.14 解析不了 `25.0.2`
這種版號。**只設 `JAVA_HOME` 完全沒有作用**,因為 `jbr` 排在它前面。

### 它長什麼樣

```
> What went wrong:
25.0.2
```

**就這一行,沒有別的。** 上一次我把它誤判成 NDK 沒裝,繞了很久。
要看到真相得加 `--stacktrace`,才會出現 `JavaVersion.parse`。

**改完 JDK 指向後一定要 `gradlew --stop`** — 舊的 daemon 會用舊的 JVM 活著,
不停掉的話設定改了也沒用。

> megingiard 不會中這招:它的 Gradle 9.3.1 有 `toolchainVersion=21`,
> 所以 JBR-25 無害。**兩個專案的行為不同,不要拿 megingiard 的經驗套過來。**

---

## Step 1 — 分析、建置

```bash
"D:/flutter/bin/flutter.bat" analyze
```

`analyze` 全綠 **不代表能用**。焦點跑掉、浮層蓋住內容、觸控點不動、版面溢位,
靜態分析一個都抓不到。見 `rshop-touch-and-gamepad`。

```bash
"D:/flutter/bin/flutter.bat" build apk --debug
```

第一次跑(或 `pub get` 之後)若冒出上百個 `flutter_riverpod` 之類的
「URI doesn't exist」,那是套件沒解析,不是程式壞了 —— 跑 `flutter pub get`。

---

## Step 2 — 上機

裝置上那版若是**別台機器建的 release 版**,debug 版覆蓋不上去,
而且資料備不出來(`run-as` 會回 `package not debuggable`,`ALLOW_BACKUP` 也沒開)。
**唯一的路是先移除再裝,資料會沒。** 移除前要問。

裝好之後,`adb exec-out run-as com.retro.rshop.tw cat …/app_flutter/config.json`
可以直接讀實機設定 —— **只有 debug 版行得通**,用來確認來源/備援真的存進去了。

---

## Step 3 — 收尾(三件事,少一件不算完成)

1. `docs/FIX_LOGS.md` 追加一條(**問題點 / 修復點 / 檔案** 三個固定欄位)
2. `docs/FIX_INDEX.md` 補一列
3. `python scripts/build_fix_by_file.py` 重跑

然後 **commit 並 push**。使用者的規則是**每累積約五項就部署並推送**;
**UI 改動不受這個上限——改一項就值得出一版**,因為 UI 問題只有實機才現形。

分支:R-Shop 的客製化一律進 **`main-zh`**,`main` 只放中文化。
`git add` 用明確路徑,**不要用 `-A`** —— 別的工作階段同時在改這個 repo。
36 changes: 36 additions & 0 deletions .agents/skills/rshop-l10n/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: rshop-l10n
description: "Add or change a user-visible string in R-Shop. Use when: any feature adds text. Seven languages, a localization class that is NOT named what you expect, and a missing-string failure mode that does not break the build — it ships blank."
---

# Skill: `rshop-l10n`

## Role

新功能的字串**要在同一次改動裡補齊**,不要留到之後。
漏掉的字串**不會讓建置失敗**,會直接出貨成空白。

---

## 型別叫 `L`,不是 `AppLocalizations`

`l10n.yaml` 設了 `output-class: L`。寫 `AppLocalizations.of(context)` 會得到
「undefined」—— 這個錯我犯過一次。用 `L.of(context)`。

---

## 七個檔案

`lib/l10n/app_{de,en,es,fr,ja,pt,zh}.arb` —— **七個語系,一個都不能漏。**

> 各專案不同:R-Shop 7、megingiard 4、ImageOverlay 2。不要憑印象套。

改完 `.arb` **要重新產生 `app_localizations*.dart`,並且跟 `.arb` 一起 commit**
(見 `AGENTS.md` §6)。

---

## 文件用語要跟出貨字串一致

寫 README / 使用手冊之前,**先去 `app_zh.arb` 撈實際的字串**。
詞彙表過得了關不代表名詞對得上 —— 使用者看到的是畫面上的詞,不是文件裡的詞。
Loading