From 778d7d3f12938c1d15d7b9a78aa7a361523a0060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Wed, 26 Aug 2026 18:32:29 +0000 Subject: [PATCH] the reader reads the param the platform actually passes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clicking a message did nothing. the reading pane stayed on "Select an email to read" whatever you opened, and it had been that way since email became a plugin. the reader asks the URL which message is open. it asked for `emailId`, which was the param name back when email was part of the platform and declared its own `/email/:emailId` route. a plugin declares no routes: the platform mounts every one at `` and `/:section`, so the id arrives as `section`. asking for `emailId` got undefined, `selectedId` was null on every render, and the pane rendered its empty state. nothing else was wrong, which is why this took so long to place — the list showed, the link navigated, the URL changed, and both API routes return full data (verified against the real 19k-message store: /messages carries every snippet, /thread/:id returns 55KB of html). one undefined param, and the whole right-hand side of the screen looked dead. still accepts `emailId`, so this keeps working if email ever gets its own route again. the underlying smell is the platform naming a plugin's param for it — worth fixing there, not here. Co-Authored-By: Claude Opus 5 Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043 --- web/shared.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/web/shared.ts b/web/shared.ts index d154d4a..b9090a3 100644 --- a/web/shared.ts +++ b/web/shared.ts @@ -1,6 +1,6 @@ import { useParams } from 'react-router'; -// Which email is open is `/email/:emailId`. The route pair already existed, but the URL was a mirror +// Which email is open is `/email/:id`. The route pair already existed, but the URL was a mirror // rather than the state: the selection lived in an `EMAIL_SELECTED` global and two effects copied it // back and forth with the route. That round-trip is what kept a row a `