Android is push-only until sync v2: stop showing the 'zero peers … layout problem' warning; pull other hosts only once v2 reads from staging
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
Trace syncBoth, copySyncFilesToSafDir, pull_all/list_remote_dbs, and resolveSyncDirectory, then compare dirs::get_sync_dir() with the Android AW_SYNC_DIR value. Verify whether peer databases can be read from the SAF tree and whether the hostname/device_id levels match. Done means either Android pull behavior and the warning are corrected, or the UI explicitly identifies Android as push-only until sync v2.
索引モデルが issue の本文から書いたものです。
説明
Observed on v0.14.2b2 (POCO F8 Ultra), Sync Settings after a successful sync:
Last Sync succeeded at 13:00 … pulled 0, pushed 1
Found 0 remote db files to pull from /storage/emulated/0/Android/data/net.activitywatch.android/files/sync/poco_f8_ultra
Zero peers in a configured sync dir is usually a layout or setup problem, not a no-op.
[own-staging 2-level] …/files/sync/poco_f8_ultra/41662…/test.db 299.2 MB not pulled: own device_id, excluded from pull
syncBoth does call pull_all (correct, 3-level list_remote_dbs), but copySyncFilesToSafDir only mirrors internal → SAF. Nothing ever copies other hosts' {hostname}/{device_id}/test.db from the Syncthing folder into the app-private dir, so the only thing under the internal root is our own staging and pull is guaranteed to find zero peers. The #687 warning then tells the user their setup is broken when it is working as designed for push.
Two things:
- Decide whether Android pulls at all. If yes, peers have to be read from the SAF tree (either an inbound mirror of
{other-host}/…folders before the pull, orpull_allreading peer dbs via SAF-backed copies). If no for now, the Sync Settings text should say "push-only on Android" instead of the layout-problem warning. - The root in that message is
…/files/sync/poco_f8_ultra, and the own staging is classified as 2-level under it — butresolveSyncDirectorysetsAW_SYNC_DIRto…/files/sync, and the push lands at…/files/sync/poco_f8_ultra/<device_id>/test.db(3-level from that root). Worth checking whatdirs::get_sync_dir()resolves to on Android vs the env var; if the pull root really is the hostname folder, pull could never work even with an inbound mirror.
Related desktop-side bug found in the same session: ActivityWatch/aw-server-rust#711 (resume cursor duplicates the boundary event; the phone's staging stopwatch bucket already holds 285 copies of one event).
cc @TimeToBuildBob
- 主要言語
- Kotlin
- スター
- 270
- フォーク
- 57
- 平均マージ
- 20時間 32分
- マージ済み PR(30日)
- 38
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ActivityWatch/aw-android のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ActivityWatch/aw-android#306 ·
メンテナーはふだん 1 日以内に返信
-
AuthSettingsActivity crashes on launch (InflateException: Material attributes under AppCompat theme)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ActivityWatch/aw-android#210 · コメント 7 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ActivityWatch/aw-android#302 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
ActivityWatch/aw-android#300 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ActivityWatch/aw-android#296 ·
メンテナーはふだん 1 日以内に返信
ActivityWatch/aw-android の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
AAswordman/Operit#1292 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
bug webview
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
home-assistant/android#7524 ·
メンテナーはふだん 1 日以内に返信
-
Issue: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenAPITools/openapi-generator#25021 ·
メンテナーはふだん 1 日以内に返信