Skip to content

Commit 673d3b8

Browse files
fix(native): show the read verdict in the FileViewerHost body with a Retry button (#2)
After `fetcher.read` returned `{ error }` the host set the top error bar but `content` stayed `null`, so `loading || html === null` kept the "Fetching …" spinner drawing under the message and the only way out was close/reopen. - On a read failure the body now renders the fetcher's verdict (e.g. the liveness-aware "This session isn't responding — is it online?") with a Retry button that re-runs `fetcher.read` for the same request; while the retry is in flight the normal loading state shows again. - The top error bar is reserved for failures on top of a displayed file (save, editor bridge), so the same message is never shown twice. - The `!fetcher` "No active session" branch was unreachable behind the spinner condition; it is checked first now. Adds the first component spec in @codeam/ide-native: react-dom into jsdom with thin DOM stubs for the RN primitives (`src/test/setup.tsx`), driven through the real `FileViewerProvider`. Refs: codeagent-rtbh Co-authored-by: Edgar Durand <edgar@privacyhawk.com>
1 parent 96bd58b commit 673d3b8

7 files changed

Lines changed: 732 additions & 17 deletions

File tree

0 commit comments

Comments
 (0)