iOS: `clearWidget` and logout keep the per-instance ETag and status of configurable widgets
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- android, ios, kotlin, react-native, swift, typescript
- 領域
- cli, mobile-dev
調査の方向性
Start in packages/ios-client/ios/app/VoltraWidgetService.swift at clearFetchedState and clearWidgetServerState, where status and ETag are cleared only for WidgetScope.of(widgetId). Use DynamicWidgetPropsStore.instanceKeys(for:) in packages/ios-client/ios/shared/DynamicWidgetPropsStore.swift to read the instance keys before clearing props, then clear each instance's status and ETag, following the Android WidgetServerUpdateCoordinator.kt pattern. Done when a logout or clearWidget leaves no instance ETag or serverUpdate status behind, and DynamicWidgetServerUpdateRunner.swift no longer sends a stale If-None-Match.
索引モデルが issue の本文から書いたものです。
説明
Found while fixing #381, by reading the code. Not reproduced on a device yet.
What happens
On iOS, clearing a server-driven Dynamic Widget clears the ETag and the env.serverUpdate status of the widget scope only. A widget with configuration parameters fetches per instance (ADR 0007), and each instance has its own ETag and status record. Those stay behind:
- Logout,
clearFetchedState: it clears every instance's props throughDynamicWidgetPropsStore.clearDynamicWidgetProps, but status and ETag only forWidgetScope.of(widgetId).
https://github.com/callstackincubator/voltra/blob/cee9f6739e256c4b8885207373823deb48525b1c/packages/ios-client/ios/app/VoltraWidgetService.swift#L110-L121 clearWidget,clearWidgetServerState: same.
https://github.com/callstackincubator/voltra/blob/cee9f6739e256c4b8885207373823deb48525b1c/packages/ios-client/ios/app/VoltraWidgetService.swift#L173-L181
So after a logout, an instance's next fetch still sends the old If-None-Match. If the server answers 304, the runner records a success without committing props, and the instance shows {} until the server's data changes. Its env.serverUpdate also keeps the old status instead of going back to never.
https://github.com/callstackincubator/voltra/blob/cee9f6739e256c4b8885207373823deb48525b1c/packages/ios-client/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerUpdateRunner.swift#L99-L100
Expected
The same as Android, which reads the instance keys before clearing the props, then clears each instance's status and ETag too:
- https://github.com/callstackincubator/voltra/blob/cee9f6739e256c4b8885207373823deb48525b1c/packages/android-client/android/src/main/java/voltra/WidgetServerUpdateCoordinator.kt#L95-L115
- https://github.com/callstackincubator/voltra/blob/cee9f6739e256c4b8885207373823deb48525b1c/packages/android-client/android/src/main/java/voltra/WidgetServerUpdateCoordinator.kt#L140-L149
DynamicWidgetPropsStore.instanceKeys(for:) already exists on iOS for this.
https://github.com/callstackincubator/voltra/blob/cee9f6739e256c4b8885207373823deb48525b1c/packages/ios-client/ios/shared/DynamicWidgetPropsStore.swift#L90
- 主要言語
- TypeScript
- スター
- 865
- フォーク
- 50
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 18
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstackincubator/voltra のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
callstackincubator/voltra#376 ·
メンテナーはふだん 1 日以内に返信
-
refactor-scout
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
callstackincubator/voltra#308 ·
メンテナーはふだん 1 日以内に返信
-
refactor-scout
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
callstackincubator/voltra#307 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
callstackincubator/voltra#400 ·
メンテナーはふだん 1 日以内に返信
-
Keep Edit Widget choices when an app moves an existing configurable widget to Voltra対応中かも @mrevanzak が 6 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 40/100
callstackincubator/voltra#393 ·
メンテナーはふだん 1 日以内に返信
callstackincubator/voltra の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
audacity/audacity.github.io#118 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhou対応中かも @rmt-svc が今日担当しました。 オープンresources
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
railmapgen/rmp-gallery#4245 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
mike-north/AgentMonitors#717 ·
メンテナーはふだん 1 日以内に返信