Repository navigation
デモ: Service Worker の登録に上限を置き、消去の失敗の文言を直す - #164
Merged
Merged
Conversation
- ensureServiceWorker に 15 秒の上限を置く(Weiwudi.registerSW は疎通確認の fetch に上限が無い) - 消去の確認でサイズを読み取れないときの文言を「消去を確認できませんでした」にする - e2e: 登録が返らない場合と ping が返らない場合、新しい文言を試験する Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kochizufan
marked this pull request as ready for review
November 9, 2026 07:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
症状
…/pingへのfetch)が返らない環境では、Weiwudi.registerSWに待ちの上限が無く(上限があるのは制御を待つ 10 秒だけ)、デモ全体が起動しませんでした。直し方
ensureServiceWorkerに、デモ側の上限 15 秒を置きました。上限に達したら、既存の失敗と同じ経路でキャッシュ無しのまま起動し、節に「Service Worker の登録が時間内に終わりませんでした」を出します。上限に負けたあとで登録が解決・失敗しても、起動には影響しません。demo/demo.tsとe2e/demo-cache.spec.tsだけです(src/・package.json・CHANGELOG.mdは触っていません)。確かめ方
e2e/demo-cache.spec.tsに次を足しました(修正前は落ちることを確認してから直しています)。registerが返らない場合と、実際に登録・制御されたうえでpingのfetchだけが返らない場合の 2 つ。どちらもpage.clockをgotoの前に止め、待ちの開始(ページ上部の状態表示)を確かめてから 14 秒進めて「まだ起動していない」ことを、さらに 2 秒進めて「キャッシュ無しで起動する」ことを確かめます。手元で
--repeat-each=5を 95 回すべて緑で通しています(chromium)。🤖 Generated with Claude Code