iOS: `clearWidget` and logout keep the per-instance ETag and status of configurable widgets
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, ios, kotlin, react-native, swift, typescript
- Lĩnh vực
- cli, mobile-dev
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 865
- Fork
- 50
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/voltra
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
callstackincubator/voltra#376 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor-scout
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
callstackincubator/voltra#308 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor-scout
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
callstackincubator/voltra#307 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
callstackincubator/voltra#400 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Keep Edit Widget choices when an app moves an existing configurable widget to VoltraCó thể đã có người làm @mrevanzak đã nhận 6 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 40/100
callstackincubator/voltra#393 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/voltra
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
audacity/audacity.github.io#118 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhouCó thể đã có người làm @rmt-svc đã nhận hôm nay. Đang mởresources
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
railmapgen/rmp-gallery#4245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
mike-north/AgentMonitors#717 ·
Maintainer thường phản hồi trong vòng 1 ngày