docs(ui): cookie-rendered sidebar state, data-collapsed CSS, working overview links + link-checker gate
Three problems, one root cause each: 1. Sidebar jump: the server rendered its own default (current section open, rest collapsed) and restoreDocsNav corrected it after paint — open-then-close. Fix: persistence moved server-side. toggleCollapsible now writes a docs_nav cookie (strictly-necessary UI state, no identifiers, SameSite=Lax); ApplyNavOverrides merges it into the nav before render, so first paint IS the visitor's state. The post-paint restore is deleted. 2. Arrows out of sync / double-click: two visibility mechanisms disagreed. There was NO data-collapsed CSS at all — collapsed sections were only ever hidden by JS after paint, and the arrow rotation came from a different (server) state. Now: style.css hides on [data-collapsed=true] (single source of truth, server-rendered), applyCollapsed sets only the attribute, arrows rotate from the same merged value. Live check: 37/37 collapsibles arrow-consistent. 3. api-reference.md links: all 20+ quick links were directory-style (authentication/ etc.) that 404 on the docs site, plus stale targets (books/, ../collections-api.md, websocket 'coming soon'). Rewritten to real per-file links — all 9 unique targets return 200 live. Same rot fixed in admin/hash-conflicts.md, development.md, android-app.md, create_media_item.md, koreader-protocol.md; docs/index.md redirected from the deleted collections-api monolith (stale 530-line duplicate of the gated api/collections docs — deleted, per the WO2 doctrine). New gate: TestDocsRelativeLinks walks docs/developer/** and fails make test on any relative link that is directory-style or unresolvable — overview links can never silently rot again.
This commit is contained in:
1 parent
f1a6de7cd7
commit
a8f8c4def9
17 files changed
+241
-674
No files matched your search
@@ -4,34 +4,33 @@ Complete reference for Bookhoard REST API endpoints.
|
||||
|
||||
## Quick Links
|
||||
|
||||
- [Authentication](authentication/) - User registration, login, tokens
|
||||
- [Users](users/) - Profile management
|
||||
- [Admin](admin/) - Admin operations (user management)
|
||||
- [Libraries](libraries/) - Library management
|
||||
- [Books](books/) - Bulk book operations and downloads
|
||||
- [Media Items](media-items/) - Media item operations
|
||||
- [Progress](progress/) - Reading progress tracking
|
||||
- [Notes](notes/) - User notes management
|
||||
- [Highlights](highlights/) - Book highlights
|
||||
- [Ratings](ratings/) - Book ratings
|
||||
- [Devices](devices/) - Device registration, sync, and shelf management
|
||||
- [Analytics](analytics/) - Usage statistics
|
||||
- [Book Matching](book-matching/) - Search and link books
|
||||
- [Collections](collections/) - See [Collections API](../collections-api.md)
|
||||
- [Conflicts](conflicts/) - Sync conflict resolution
|
||||
- [Queue](queue/) - Sync queue management
|
||||
- [Scanner](scanner/) - Library scanning and watch mode (admin)
|
||||
- [System](system/) - Tunable system settings and configuration (admin)
|
||||
- [OPDS](opds/) - Open Publication Distribution
|
||||
- [KOReader](koreader/) - KOReader sync protocol
|
||||
- [Kobo](kobo/) - Kobo sync protocol (coming soon)
|
||||
- [WebSocket](websocket/) - Real-time sync events
|
||||
- [Authentication](authentication/login.md) - User registration, login, tokens
|
||||
- [Users](users/get_profile.md) - Profile management
|
||||
- [Admin](admin/list_users.md) - Admin operations (user management)
|
||||
- [Libraries](libraries/list_libraries.md) - Library management
|
||||
- [Media Items](media-items/get_media_item.md) - Media item operations
|
||||
- [Progress](progress/get_media_progress.md) - Reading progress tracking
|
||||
- [Notes](notes/get_notes.md) - User notes management
|
||||
- [Highlights](highlights/get_highlights.md) - Book highlights
|
||||
- [Ratings](ratings/get_ratings.md) - Book ratings
|
||||
- [Devices](devices/get_devices.md) - Device registration, sync, and shelf management
|
||||
- [Analytics](analytics/get_analytics.md) - Usage statistics
|
||||
- [Book Matching](book-matching/search_books.md) - Search and link books
|
||||
See [Collections Endpoints](collections/list_collections.md)
|
||||
- [Conflicts](conflicts/list_conflicts.md) - Sync conflict resolution
|
||||
- [Queue](queue/list_all_queue_items.md) - Sync queue management
|
||||
- [Scanner](scanner/scan_library.md) - Library scanning and watch mode (admin)
|
||||
- [System](system/get_settings.md) - Tunable system settings and configuration (admin)
|
||||
- [OPDS](opds/feeds.md) - Open Publication Distribution
|
||||
- [KOReader](koreader/sync_progress.md) - KOReader sync protocol
|
||||
- [Kobo](kobo/initialization.md) - Kobo sync protocol (coming soon)
|
||||
- [WebSocket](websocket/protocol.md) - Real-time sync events
|
||||
|
||||
---
|
||||
|
||||
## Authentication
|
||||
|
||||
See [Authentication Endpoints](authentication/)
|
||||
See [Authentication Endpoints](authentication/login.md)
|
||||
|
||||
- POST /api/auth/register - Register new user
|
||||
- POST /api/auth/login - User login
|
||||
@@ -48,7 +47,7 @@ See [Authentication Endpoints](authentication/)
|
||||
|
||||
## Admin
|
||||
|
||||
See [Admin Operations](admin/)
|
||||
See [Admin Operations](admin/list_users.md)
|
||||
|
||||
- GET /api/auth/users - List all users (admin)
|
||||
- PUT /api/auth/users/:id/max-devices - Update user device limit (admin)
|
||||
@@ -57,11 +56,11 @@ See [Admin Operations](admin/)
|
||||
|
||||
## Users & Profiles
|
||||
|
||||
See [User Management](users/)
|
||||
See [User Management](users/get_profile.md)
|
||||
|
||||
## Libraries
|
||||
|
||||
See [Library Management](libraries/)
|
||||
See [Library Management](libraries/list_libraries.md)
|
||||
|
||||
- GET /api/libraries/types - Get library types
|
||||
- POST /api/libraries - Create library (admin)
|
||||
@@ -83,13 +82,13 @@ See [Library Management](libraries/)
|
||||
|
||||
## Media Items
|
||||
|
||||
See [Media Item Operations](media-items/)
|
||||
See [Media Item Operations](media-items/get_media_item.md)
|
||||
|
||||
- GET /api/media-items - List media items
|
||||
- GET /api/media-items/:id - Get media item details
|
||||
- POST /api/media-items/bulk-delete - Bulk delete media items
|
||||
- POST /api/media-items/bulk-update - Bulk update media items (tags/contributors with normalization)
|
||||
- GET /uploads/library-{library_id}/{file_path} - Download book file / cover (JWT; see [Download Media Item](media-items/download_media_item.md))
|
||||
- GET /uploads/library-{library_id}/{file_path} - Download book file / cover (JWT; see [Download Media Item](media-items/download_media_item_file.md))
|
||||
- POST /api/media-items/:id/rating - Create rating
|
||||
- GET /api/media-items/:id/rating - Get rating
|
||||
- PUT /api/media-items/:id/rating - Update rating
|
||||
@@ -117,7 +116,7 @@ See [Media Item Operations](media-items/)
|
||||
|
||||
## Reading Progress
|
||||
|
||||
See [Progress Tracking](progress/) — in particular the
|
||||
See [Progress Tracking](progress/get_media_progress.md) — in particular the
|
||||
[Position Contract](progress/position-contract.md) (verification,
|
||||
healing, the OPF spine numbering hazard, and offset currencies) before
|
||||
writing a client.
|
||||
@@ -129,15 +128,15 @@ writing a client.
|
||||
|
||||
## Notes & Highlights
|
||||
|
||||
See [Notes Management](notes/) and [Highlights Management](highlights/)
|
||||
See [Notes Management](notes/get_notes.md) and [Highlights Management](highlights/get_highlights.md)
|
||||
|
||||
## Ratings
|
||||
|
||||
See [Ratings System](ratings/)
|
||||
See [Ratings System](ratings/get_ratings.md)
|
||||
|
||||
## Device Management
|
||||
|
||||
See [Device Registration & Sync](devices/)
|
||||
See [Device Registration & Sync](devices/get_devices.md)
|
||||
|
||||
- POST /api/devices/register - Initiate device registration
|
||||
- POST /api/devices/register/status - Check registration status
|
||||
@@ -157,7 +156,7 @@ See [Device Registration & Sync](devices/)
|
||||
|
||||
## System Settings & Configuration
|
||||
|
||||
See [System API](system/)
|
||||
See [System API](system/get_settings.md)
|
||||
|
||||
- GET /api/system/settings - List all tunable settings with metadata (admin)
|
||||
- PUT /api/system/settings - Validate, persist, and reload a single setting (admin)
|
||||
@@ -166,7 +165,7 @@ See [System API](system/)
|
||||
|
||||
## Analytics
|
||||
|
||||
See [Usage Analytics](analytics/)
|
||||
See [Usage Analytics](analytics/get_analytics.md)
|
||||
|
||||
- GET /api/analytics/reading-stats - Get reading statistics
|
||||
- GET /api/analytics/device-usage - Get device usage stats
|
||||
@@ -174,7 +173,7 @@ See [Usage Analytics](analytics/)
|
||||
|
||||
## Book Matching & Linking
|
||||
|
||||
See [Book Matching](book-matching/)
|
||||
See [Book Matching](book-matching/search_books.md)
|
||||
|
||||
- GET /api/media-items/search - Search media items
|
||||
- POST /api/sync/books/query - Query books for matching
|
||||
@@ -191,11 +190,11 @@ See [Book Matching](book-matching/)
|
||||
|
||||
## Collections
|
||||
|
||||
See [Collections API](../collections-api.md) or [Collections Endpoints](collections/)
|
||||
See [Collections Endpoints](collections/list_collections.md)
|
||||
|
||||
## Conflicts
|
||||
|
||||
See [Conflict Resolution](conflicts/)
|
||||
See [Conflict Resolution](conflicts/list_conflicts.md)
|
||||
|
||||
- GET /api/conflicts - List conflicts
|
||||
- GET /api/conflicts/:id - Get conflict details
|
||||
@@ -207,7 +206,7 @@ See [Conflict Resolution](conflicts/)
|
||||
|
||||
## Queue Management
|
||||
|
||||
See [Sync Queue](queue/)
|
||||
See [Sync Queue](queue/list_all_queue_items.md)
|
||||
|
||||
- GET /api/queue/devices/:device_id/stats - Get device queue stats
|
||||
- GET /api/queue/devices/:device_id/items - List device queue items
|
||||
@@ -218,7 +217,7 @@ See [Sync Queue](queue/)
|
||||
|
||||
## Scanner (Admin)
|
||||
|
||||
See [Scanner Operations](scanner/)
|
||||
See [Scanner Operations](scanner/scan_library.md)
|
||||
|
||||
- [Scanner Overview](scanner/overview.md) - Supported formats, metadata extraction, and features
|
||||
- POST /api/scanner/scan - Scan library (one-time) (ebooks, manga, comics)
|
||||
@@ -231,7 +230,7 @@ See [Scanner Operations](scanner/)
|
||||
|
||||
## OPDS
|
||||
|
||||
See [OPDS Feeds](opds/)
|
||||
See [OPDS Feeds](opds/feeds.md)
|
||||
|
||||
- GET /opds/devices/:deviceId/catalog - Get device catalog
|
||||
- GET /opds/devices/:deviceId/search - Search device catalog
|
||||
@@ -242,7 +241,7 @@ See [OPDS Feeds](opds/)
|
||||
|
||||
## KOReader Sync Protocol
|
||||
|
||||
See [KOReader Sync](koreader/) and [Sync Protocol](sync/koreader-protocol.md)
|
||||
See [KOReader Sync](koreader/sync_progress.md) and [Sync Protocol](sync/koreader-protocol.md)
|
||||
|
||||
- POST /api/sync/koreader/progress - Sync reading progress
|
||||
- GET /api/sync/koreader/resolve?sha256={hash} - Resolve a book UUID by file SHA-256
|
||||
@@ -254,7 +253,7 @@ See [KOReader Sync](koreader/) and [Sync Protocol](sync/koreader-protocol.md)
|
||||
|
||||
> **Status: Coming Soon** — Native Kobo sync is implemented server-side but not yet supported on real devices. These endpoints are under active development and may change.
|
||||
|
||||
See [Kobo Sync](kobo/) and [Sync Protocol](sync/kobo-protocol.md)
|
||||
See [Kobo Sync](kobo/initialization.md) and [Sync Protocol](sync/kobo-protocol.md)
|
||||
|
||||
- POST /api/sync/kobo/:token/markup - Sync markup highlights
|
||||
- POST /api/sync/kobo/:token/bookmark - Sync bookmarks
|
||||
@@ -264,7 +263,7 @@ See [Kobo Sync](kobo/) and [Sync Protocol](sync/kobo-protocol.md)
|
||||
|
||||
## WebSocket
|
||||
|
||||
See [WebSocket API](websocket/)
|
||||
See [WebSocket API](websocket/protocol.md)
|
||||
|
||||
- WS /ws/sync - Real-time sync events and notifications
|
||||
|
||||
|
||||
Reference in new issue
Block a user