feat(pwa): Offline study logging & automatic synchronization queue
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- firebase, react, typescript
調査の方向性
Start by reading src/components/newnote/hooks/use-note-submission.ts and src/firebase.ts, then inspect the existing /api/groups/post-note flow and test setup. Define the queue in src/utils/offline-sync-queue.ts and the status UI in src/components/common/offline-banner.tsx. Done means offline notes are retained without a blocking error, sync automatically after reconnection, offline status is visible, and existing unit and E2E tests pass.
索引モデルが issue の本文から書いたものです。
説明
Problem Statement
Currently, posting a scripture note or completing daily study requires an active network connection (POST /api/groups/post-note). When users study offline (e.g., on airplanes, subways, or in areas with poor reception), submissions fail immediately with a network error toast, disrupting their study streak and workflow.
Proposed Solution
Implement an offline mutation queue (Outbox Pattern) for study notes and streak check-ins:
- Offline Note Queueing (IndexedDB / localStorage):
- When offline (
!navigator.onLineor API call failure due to network), save the pending note submission payload into a local queue. - Show a non-blocking toast: "Saved offline. Your streak and note will sync automatically once connected."
- When offline (
- Auto-sync on Reconnection:
- Listen to
window.addEventListener('online')(or Service Worker Sync if supported). - Drain the offline queue in chronological order, replaying the
POST /api/groups/post-noterequests.
- Listen to
- Offline Status UI:
- Add a subtle offline banner or badge in the navigation/dashboard when disconnected.
- Firestore Offline Persistence:
- Ensure Firestore's
persistentLocalCacheor IndexedDB cache is properly initialized insrc/firebase.tsso users can browse previously fetched scriptures and notes while offline.
- Ensure Firestore's
Target Files
src/components/newnote/hooks/use-note-submission.tssrc/firebase.tssrc/utils/offline-sync-queue.ts(New utility / store)src/components/common/offline-banner.tsx(New component)
Acceptance Criteria
- Submitting a note while offline stores the draft locally and does not show a blocking error.
- When internet connectivity is restored, the queued note is automatically sent to
/api/groups/post-noteand updates the user's streak. - Offline status is clearly communicated in the UI.
- Existing unit and E2E tests pass.
- 主要言語
- TypeScript
- スター
- 10
- フォーク
- 2
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 39
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ScriptureHabit/scripture-habit のほかの issue
-
[Call for Contributions] Share your funny & relatable LDS / Scripture Study quotes! (Multilingual)オープンgood first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
ScriptureHabit/scripture-habit#275 ·
メンテナーはふだん 2 日以内に返信
-
good first issue hacktoberfest help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ScriptureHabit/scripture-habit#257 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement good first issue help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
ScriptureHabit/scripture-habit#281 ·
メンテナーはふだん 2 日以内に返信
-
good first issue help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
ScriptureHabit/scripture-habit#280 ·
メンテナーはふだん 2 日以内に返信
-
good first issue help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ScriptureHabit/scripture-habit#278 ·
メンテナーはふだん 2 日以内に返信
ScriptureHabit/scripture-habit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
readest/readest#7413 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
content triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eliasstravik/herdr-projects#788 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Ability to edit tagsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信