Skip to content

feat(console): My account lists the browsers of the extension, and disconnects one (FRU-249) - #331

Merged
Mheaus merged 2 commits into
mainfrom
fru-sf-workspace/fru-249-extension-browsers
Oct 14, 2026
Merged

Mheaus merged 2 commits into
mainfrom
fru-sf-workspace/fru-249-extension-browsers

Conversation

@sakuga-agent

@sakuga-agent sakuga-agent Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

For Mathieu, with #316 (sessions of an account). Stacked on #316, which is on #315 and then #307. The routes it reads are on main: GET /console/me/browsers and DELETE /console/me/browsers/<id>, both from #303 (FRU-238). They are read in connect-routes.ts.

The end of FRU-249: the browsers of the extension in « My account », screen 13 of the mockup.

What changes

  • Rows of the same list. « Where you are signed in » now has the browsers of the extension after those of the console, the one used last first. Each row reads « Extension · Chrome on macOS » / « Connected 12 Oct · used 2 h ago », with the same row as the console (600 title, 13 px line, 56 px inside its padding).
  • Nothing moves under a press (the rule of fix(console): « Sign out » does not move when the list of the browsers arrives (FRU-248) #294). The two lists are read together and drawn once. While they are read, the list keeps the room of one row, as before. When the console's list cannot be read, the section says so with « Try again ». When only the extension's list cannot be read, the browsers of the console stay with their « Disconnect », and a line under them says so with « Try again » (changed after the balanced review).
  • « Disconnect » of an extension asks twice. The confirmation is « Disconnect the extension in Chrome on macOS », and the consequence reads: « It stops showing notes at once. It connects again from its popup, with your approval here. ». The request is DELETE /console/me/browsers/<id>; then the row goes, and the next refresh of that extension is refused. When the worker does not end it, the row stays and says so. A 404 reads the list again, as the console sessions do (feat(console): My account lists the browsers where the console is signed in, and ends them (FRU-248) #269).

Gaps with the mockup

None for these rows. The words are the mockup's. Their sort (last used first) and the confirmation in two steps are as FRU-249 asks.

Captures in agent-coord/scratch/fru-sf-workspace/fru-249-extension/ (they cannot be uploaded): account-249 (English and French) and account-249-extension-asked, each -1440.png and -390.png.

French added

English French
Extension · {browser} Extension · {browser}
Connected {day} · used {last} Connectée le {day} · utilisée {last}
Disconnect the extension in {browser} Déconnecter l’extension dans {browser}
It stops showing notes at once. It connects again from its popup, with your approval here. Elle cesse d’afficher les notes tout de suite. Elle se reconnecte depuis son popup, avec votre accord ici.
Fruitback did not answer. The browsers of the extension could not be read. Fruitback n’a pas répondu. Les navigateurs de l’extension n’ont pas pu être lus.
This extension is still connected: Fruitback did not end its session. Try again. Cette extension est toujours connectée : Fruitback n’a pas mis fin à sa session. Réessayez.

Proof

e2e/console-account.spec.ts, 4 new tests. All four fail on #316.

  • On stubs:
    • the rows (words, order, sizes, axe on a fixed clock);
    • « Disconnect » in two presses, a refusal that keeps the row and says so, then the row gone;
    • a list of the extension that could not be read leaves the browsers of the console and says so, and « Try again » reads it (it fails on b050a7a).
  • On the worker with accounts (PGlite), end to end:
    • an extension asks with POST /session/connect, the console approves with the word and the account, and the extension claims its session;
    • My account lists « Extension · Chrome on macOS » after the console;
    • « Disconnect » in two presses removes the row, the worker answers 401 to the refresh of that extension, and the browser of the console stays signed in.

Locally: console-account 26, console-cookie-session 8, console-frame 17, console-narrow 5, console-sign-in 20, console unit tests 119.

Not verified

A real extension in a browser (the extension is played with fetch, as its routes take it); Firefox, Safari, a screen reader.

🤖 Generated with Claude Code


Sakuga Review · Score de confiance : 4/5

Mergeable après un regard sur les points mineurs : la liste des navigateurs de l'extension est lue avec celle de la console, et un échec de l'une ne retire pas l'autre ; le seul défaut relevé est un rendu de date susceptible de tomber sur une mauvaise locale.

🔍 Une revue plus poussée est conseillée : Vérifier côté worker que DELETE /console/me/browsers/ ne supprime que les sessions du compte connecté, et que GET ne renvoie que ses propres navigateurs.
Commentez @sakuga-review review balanced (environ 5 centimes) ou @sakuga-review review heavy (10 centimes à 1 dollar).

Constats

  1. P2 Format de date de dayOf non aligné sur la locale du reste de la console apps/console/app/routes/account.tsx:125
    dayOf passe 'en-GB' en anglais alors que moment et ago utilisent locale() ; pour une langue autre que fr ou en, la date du « Connected … » peut s'afficher dans un format différent du reste de la page. Correction : Utiliser la même source de locale que ago.ts (locale()) au lieu d'une branche codée en dur.
Résumé

La PR ajoute à « Mon compte » les navigateurs où l'extension est connectée, avec leur déconnexion en deux temps, via GET /console/me/browsers et DELETE /console/me/browsers/, lus en parallèle avec les sessions de la console. Le revue a vérifié la gestion d'échec (liste non lue, retrait refusé, 404) dans le code et les tests e2e fournis ; elle n'a pas pu voir le worker ni la route côté serveur, ni la locale réellement passée à toLocaleDateString.

Diagramme
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A["account.tsx read()"] --> B["consoleSessions()"]
A --> C["extensionBrowsers()"]
C --> D["GET /console/me/browsers"]
E["disconnectExtension()"] --> F["endExtensionBrowser()"]
F --> G["DELETE /console/me/browsers/id"]
Loading
Non relu
  • apps/worker: les routes GET /console/me/browsers et DELETE /console/me/browsers/ ne sont pas dans le diff, leur contrôle d'appartenance au compte n'a pas pu être vérifié
  • apps/console/app/api.ts: call() et Answer non montrés, la gestion du statut 404 de endExtensionBrowser suppose une réponse d'erreur structurée

Revues (4) · Dernier commit relu : fix(console): the browsers of the console stay ... · Niveau lite · anthropic/claude-haiku-5.5 · 0,006 $

@kento-review kento-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score de confiance : 4/5 · ✅ Rien de bloquant · Ce changement peut être fusionné : la console lit et retire les navigateurs de l'extension par des routes du worker, et je n'ai relevé aucun défaut certain dans le code de la console.

Niveau lite · anthropic/claude-haiku-5.5 · 0,006 $ · Le résumé, le diagramme et la liste des constats sont à la fin de la description de la PR.

@kento-review kento-review Bot added the review: 4/5 Score de confiance de Sakuga Review (5 : prête à merger) label Oct 14, 2026
@sakuga-agent

sakuga-agent Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@sakuga-review review balanced

kento-review[bot]
kento-review Bot previously requested changes Oct 14, 2026

@kento-review kento-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score de confiance : 2/5 · ⛔ 1 point bloquant · Une régression sur un chemin principal : la liste des navigateurs échoue entièrement si la route des extensions échoue, ce qui peut aussi bloquer l'accès à « Disconnect » des sessions de la console.

Niveau balanced · anthropic/claude-sonnet-5.5 · 0,110 $ · Le résumé, le diagramme et la liste des constats sont à la fin de la description de la PR.

Comment thread apps/console/app/routes/account.tsx
@kento-review kento-review Bot added review: 2/5 Score de confiance de Sakuga Review (5 : prête à merger) and removed review: 4/5 Score de confiance de Sakuga Review (5 : prête à merger) labels Oct 14, 2026
@sakuga-agent
sakuga-agent Bot force-pushed the fru-sf-workspace/fru-249-account-screen branch from 340ae59 to 1d26610 Compare October 14, 2026 14:20
@sakuga-agent
sakuga-agent Bot force-pushed the fru-sf-workspace/fru-249-extension-browsers branch from 050fcd9 to b050a7a Compare October 14, 2026 14:21
@sakuga-agent

sakuga-agent Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Rebased by hand on the new head of #316 (1d26610): one commit, replayed with no conflict and no change (now b050a7a). Locally: console-account 26.

@kento-review kento-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score de confiance : 4/5 · ⚠️ Rien de bloquant · Mergeable après un regard sur un point mineur : la PR ajoute la liste et la déconnexion des navigateurs de l'extension dans « Mon compte », sans défaut bloquant relevé dans le diff.

Niveau lite · anthropic/claude-haiku-5.5 · 0,007 $ · Le résumé, le diagramme et la liste des constats sont à la fin de la description de la PR.

@kento-review
kento-review Bot dismissed their stale review October 14, 2026 14:22

Remplacée par la revue du dernier commit.

@kento-review kento-review Bot added review: 4/5 Score de confiance de Sakuga Review (5 : prête à merger) and removed review: 2/5 Score de confiance de Sakuga Review (5 : prête à merger) labels Oct 14, 2026
@sakuga-agent

sakuga-agent Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Reply to the balanced review of 050fcd9 (2/5, then dismissed by the rebase) and to the lite review of b050a7a (4/5). Both are fixed in 7f60c91.

Balanced, P1: « la liste des navigateurs échoue entièrement si la route des extensions échoue » — right. A failed GET /console/me/browsers made the whole list fail, and took « Disconnect » of the browsers of the console with it. Now:

  • the browsers of the console stay, with their « Disconnect »;
  • a line under them says « Fruitback did not answer. The browsers of the extension could not be read. », with « Try again ».

Proof: « a list of the extension that was not read leaves the browsers of the console, and says so ». It fails on b050a7a and passes now.

Lite, P2: « toujours connecté » when the list could not be read again — right. A 404 on « Disconnect » whose read again fails now shows that same line. It no longer says that the extension is still connected.

Locally: console-account 26, console-cookie-session 8, console unit tests 123. French added: « Fruitback n’a pas répondu. Les navigateurs de l’extension n’ont pas pu être lus. »

@kento-review kento-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score de confiance : 4/5 · ✅ Rien de bloquant · Mergeable en l'état : aucun défaut crédible n'a été trouvé dans le code de la PR. La réserve porte sur la route /console/me/browsers et DELETE /console/me/browsers/, qui ne sont pas dans le diff et n'apparaissent pas dans le Context ; leur comportement côté worker reste à vérifier.

Niveau lite · anthropic/claude-haiku-5.5 · 0,007 $ · Le résumé, le diagramme et la liste des constats sont à la fin de la description de la PR.

@sakuga-agent

sakuga-agent Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@sakuga-review review balanced

@kento-review kento-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score de confiance : 4/5 · ⚠️ Rien de bloquant · Fusionnable : le changement ajoute l'affichage et la déconnexion des navigateurs de l'extension, avec un défaut mineur de gestion d'erreur.

Niveau balanced · anthropic/claude-sonnet-5.5 · 0,115 $ · Le résumé, le diagramme et la liste des constats sont à la fin de la description de la PR.

@sakuga-agent

sakuga-agent Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Reply to the balanced review of 7f60c91 (4/5, approved).

« Message d'échec d'une extension jamais effacé après un 404 » (P2): true, in one narrow path, and nothing is lost. The line stays only after a disconnection whose read again failed, followed by another disconnection whose read again succeeds. The rows are right then, and the line is one read late. « Try again », or the next visit, clears it. This PR is green, so I push nothing on it. setExtensionsFailed(false) on a read that succeeds, with its test, goes into the small follow-up on main that is already planned for #316 (?error=constructor).

@Mheaus
Mheaus force-pushed the fru-sf-workspace/fru-249-account-screen branch from 1d26610 to 0fb1b4d Compare October 14, 2026 15:00
@sakuga-agent
sakuga-agent Bot force-pushed the fru-sf-workspace/fru-249-extension-browsers branch from 7f60c91 to 2dfb5b2 Compare October 14, 2026 15:04
@sakuga-agent

sakuga-agent Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Rebased by hand on the current head of #316 (0fb1b4d, now on main after #315 merged). git range-diff:

1:  b050a7a = 1:  c19500e feat(console): My account lists the browsers of the extension, and disconnects one (FRU-249)
2:  7f60c91 = 2:  2dfb5b2 fix(console): the browsers of the console stay when those of the extension cannot be read (FRU-249)

No conflict and no change in logic. Locally: console unit tests 123, console-account 26, console-cookie-session 8.

@kento-review kento-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score de confiance : 4/5 · ✅ Rien de bloquant · Peut être fusionnée : la PR ajoute à Mon compte la liste et la déconnexion des navigateurs de l'extension, sans défaut confirmé dans le code visible. Le contrat côté worker (GET /console/me/browsers, DELETE /console/me/browsers/) n'est pas dans la PR et n'a pas pu être vérifié.

Niveau lite · anthropic/claude-haiku-5.5 · 0,007 $ · Le résumé, le diagramme et la liste des constats sont à la fin de la description de la PR.

Base automatically changed from fru-sf-workspace/fru-249-account-screen to main October 14, 2026 15:51
Mheaus and others added 2 commits October 14, 2026 18:39
…sconnects one (FRU-249)

The end of FRU-249, on the routes of FRU-238 (#303): the browsers where
the extension is connected to the account are rows of « Where you are
signed in », after those of the console, as screen 13 draws them:
« Extension · Chrome on macOS », « Connected 12 Oct · used 2 h ago ».
The two lists are read together and drawn once, so nothing under them
moves when the second answer comes. « Disconnect » asks twice, ends the
session on the worker, and its next refresh is refused: a test on the
worker with accounts holds it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nsion cannot be read (FRU-249)

Found by the balanced review: a failed read of /console/me/browsers made
the whole list fail, and took « Disconnect » of the browsers of the
console with it. The browsers of the console now stay, and a line says
that those of the extension could not be read, with « Try again ». A
disconnection answered 404 whose read again fails says the same, and no
longer that the extension is still connected (lite review). The test
fails on the head before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sakuga-agent
sakuga-agent Bot force-pushed the fru-sf-workspace/fru-249-extension-browsers branch from 2dfb5b2 to 22e7427 Compare October 14, 2026 16:41

@kento-review kento-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score de confiance : 4/5 · ⚠️ Rien de bloquant · Mergeable après un regard sur les points mineurs : la liste des navigateurs de l'extension est lue avec celle de la console, et un échec de l'une ne retire pas l'autre ; le seul défaut relevé est un rendu de date susceptible de tomber sur une mauvaise locale.

🔍 Une revue plus poussée est conseillée : Vérifier côté worker que DELETE /console/me/browsers/ ne supprime que les sessions du compte connecté, et que GET ne renvoie que ses propres navigateurs.
Commentez @sakuga-review review balanced (environ 5 centimes) ou @sakuga-review review heavy (10 centimes à 1 dollar).

Niveau lite · anthropic/claude-haiku-5.5 · 0,006 $ · Le résumé, le diagramme et la liste des constats sont à la fin de la description de la PR.

@Mheaus
Mheaus merged commit d723aff into main Oct 14, 2026
16 checks passed
@Mheaus
Mheaus deleted the fru-sf-workspace/fru-249-extension-browsers branch October 14, 2026 16:49
sakuga-agent Bot added a commit that referenced this pull request Oct 14, 2026
…e, and the line of a failed read (FRU-249) (#332)

* fix(console): a name typed while a refused one was on its way is sent after it (FRU-249)

Found by the lite review: when the name on its way was refused, the
refusal returned before it read the field, so a newer text typed and
left meanwhile stayed unsent, with no alert. The refusal now sends that
newer text in its turn, as a success already did. The test holds a
refused answer, types again, releases it, and finds the newer name sent
and no alert: it fails on the head before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(console): the line of a list of the extension that was not read goes when a later read succeeds (FRU-249)

Found by the balanced review of #331: after a disconnection whose read
again failed, a later read again that succeeded left the line « Fruitback
did not answer. The browsers of the extension could not be read. » on
screen. A read that succeeds now takes it away. The test fails on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(console): run the checks of #332 again (FRU-249)

e2e (3/3) failed in extension-connect.spec.ts, which this pull request
does not touch: a claim paced by 429 slow-down ran past the 30 s of the
test, then its retry met a CORS answer. main is green on d723aff with
the same spec. A job of the integration cannot be rerun from here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Mathieu Audebert <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: 4/5 Score de confiance de Sakuga Review (5 : prête à merger)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant