Signing out of one instance keeps its cached queries for the next sign-in

Abierto Apto para principiantes
#1,993 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
77/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start with src/features/auth/store/authStore.ts and src/features/cluster/signOutOfInstance.ts, then compare how full sign-out clears the cache in src/features/auth/handlers/clearAuthStateLocally.ts. Check the instance query key pattern, such as [<id>, 'get_components'], and consider reads already in flight. Done means per-instance sign-out drops that instance’s cached queries; verify the CLI import no longer receives stale results.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Signing out of a single instance clears its credentials but not its cached data. authStore.signOutLocally (src/features/auth/store/authStore.ts:779-783), which the per-instance sign-outs call, clears the sign-in and its flags but never touches the query cache, and signOutOfInstance (src/features/cluster/signOutOfInstance.ts:13-26) adds nothing that does. Only the full sign-outs clear the cache (src/features/auth/handlers/clearAuthStateLocally.ts:15 and :25).

So after a per-instance sign-out, in the same tab:

  • The instance's queries, keyed by its id (for example [<id>, 'get_components']), stay cached. A later sign-in to that instance starts from the previous session's results until each query refetches.
  • A read started before the sign-out still completes into that cache and resolves to its caller. reloadRootEntries is one: its sign-out guard from #1987 only refuses a reload called after the sign-out, so a CLI import already waiting on it (src/features/instance/applications/components/NewApplication/useCheckCLI.ts:27-33) still gets the old tree and sets focus and selection from it.

Found by code reading while reviewing #1987.

Fix direction: drop the instance's queries, which also takes its in-flight reads out of the cache, wherever a per-instance sign-out runs, the way the full sign-out clears the whole cache.

Review-Deferral: abdc32183bb41ec9 severity=nit category=correctness

🤖 Generated by Claude Code (Claude Opus 5.5); posted via @dawsontoth.

Lenguaje dominante
TypeScript
Estrellas
5
Forks
4
Merge medio
1 d 20 h
PR fusionados (30 d)
140

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de HarperFast/studio

Todos los issues de HarperFast/studio

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.