iOS: `clearWidget` and logout keep the per-instance ETag and status of configurable widgets
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- android, ios, kotlin, react-native, swift, typescript
- Área
- cli, mobile-dev
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 865
- Forks
- 50
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 18
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/voltra
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
callstackincubator/voltra#376 ·
Los mantenedores suelen responder en 1 día
-
refactor-scout
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
callstackincubator/voltra#308 ·
Los mantenedores suelen responder en 1 día
-
refactor-scout
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
callstackincubator/voltra#307 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
callstackincubator/voltra#400 ·
Los mantenedores suelen responder en 1 día
-
Keep Edit Widget choices when an app moves an existing configurable widget to VoltraPosiblemente ocupada @mrevanzak la tomó hace 6 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 40/100
callstackincubator/voltra#393 ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstackincubator/voltra
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
audacity/audacity.github.io#118 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhouPosiblemente ocupada @rmt-svc la tomó hoy. Abiertoresources
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
railmapgen/rmp-gallery#4245 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
mike-north/AgentMonitors#717 ·
Los mantenedores suelen responder en 1 día