Files
DeepTutor/web/app
Bingxi Zhao (Frank) afade979b1 fix(web): open a deep book URL on the book, not on the library
Opening a book's URL directly — a bookmark, a new tab, a refresh — drew the
library first: the empty list one level above the book, with "Loading…" inside
it, and then a jump to the reader once the fetch landed. From the reader's side
that reads as a bad route or a missing book, on the URL they had just asked for
(#1440).

The route already knows the answer. `view` started at `list` and only became
`reader` after `loadBookDetail` returned, so one piece of state was answering
two questions: which surface is this, and is its data here yet. A book id in
the path settles the first before any request is made, so the initial view is
now derived from it and `opening` renders the book's own shell — sidebar and
all — while the data is in flight.

That makes a failed load worse than it was, so it is handled here too: it used
to leave the reader on a loaded library, and would now leave them in a shell
that never fills. A load that fails says why and returns them to the library,
URL included.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 02:06:16 +08:00
..
2026-09-02 04:09:11 +08:00
2026-09-02 04:09:11 +08:00
2026-09-06 13:46:29 +08:00