Launch repair does not re-check the view selection after the fallback global write

Ouverte
#2,492 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
40/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
backend

Piste de recherche

Start in src/core/webview/webviewMessageHandler.ts: read the selection check that gates the re-pin and fallback branches, then follow the fallback's awaited global profile write up to the activateProviderProfile call near line 724. Find the existing compare-and-set-on-values helper this stack uses elsewhere and reuse its shape to re-read the current selection after the write. Done when a moved selection skips activation and logs, with a test covering a profile switch landing during the awaited write; PR 1560 and issue 2488 give the surrounding context.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Residual window in the launch repair this branch guards: the selection check is evaluated once, before the profile-existence lookup, and it correctly gates both the re-pin branch and the fallback branch in src/core/webview/webviewMessageHandler.ts. Nothing re-reads this view's selection after the fallback's global write completes, so a profile switch that lands while that write is awaited still reaches activateProviderProfile (line 724) and can move the view the user just moved.

This is not a defect in the guard: the guard covers the window it was written for (the existence lookup). Closing this later window needs a selection re-read after the global write and before the activation, with the activation skipped and logged when the selection moved - the same compare-and-set-on-values shape this stack already uses elsewhere.

Recorded here rather than changed in PR 1560 because a second production change on that head would reopen the compare-and-set design discussion the PR has already answered, and because the durable close is the record-level write revision tracked as step 2 of issue 2488. Found by CodeRabbit on PR 1560, thread 4604037875.

Langage dominant
TypeScript
Étoiles
2k
Forks
301
Merge moyen
3 j 14 h
PR mergées (30 j)
103

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Zoo-Code-Org/Zoo-Code

Toutes les issues de Zoo-Code-Org/Zoo-Code

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.