Skip to content

Add send-to-device (email books to e-readers)#1

Merged
bndct-devops merged 7 commits into
mainfrom
feature/send-to-device
May 28, 2026
Merged

Add send-to-device (email books to e-readers)#1
bndct-devops merged 7 commits into
mainfrom
feature/send-to-device

Conversation

@bndct-devops
Copy link
Copy Markdown
Owner

@bndct-devops bndct-devops commented May 27, 2026

Summary

  • Add SMTP-based book delivery to e-readers (Kindle, Kobo, or any email address)
  • Users configure device email addresses in Settings, then one-click send from book detail or bulk-send from the dashboard
  • Admin Email tab shows SMTP status, all devices across users, and send history
  • Full docs page + in-app contextual "Learn more →" links

Changes

Backend

  • SMTP config via TOME_SMTP_* env vars (host/port/user/password/from/TLS/SSL/daily-limit)
  • UserDevice model — per-user device addresses (max 10)
  • Email service (stdlib smtplib) — single send, bulk send over one connection, test email
  • API router — device CRUD, single/bulk send with 50/day rate limit, admin SMTP status/test/devices/history

Frontend

  • SendToDeviceModal (single + bulk modes); Settings device CRUD with setup-guide fallback
  • "Send to Device" on book detail + dashboard bulk bar (members+ only)
  • Admin "Email" tab (status, test, all devices, send history)
  • Contextual "Learn more →" links in Settings and the admin Email tab

Docs & site

  • New /docs/send-to-device page (provider setup as collapsible callouts, Kindle approved-sender note, limits)
  • Updated docs nav, configuration env table, admin docs; changelog Unreleased entry (+ mirror)
  • Reusable collapsible variant added to the Callout component
  • Fixed a site-wide Astro dev bug where React islands weren't hydrating (Vite optimizeDeps); production was unaffected

CI

  • PR template: added checklist (incl. a docs "Learn more" checkpoint); pytest now runs on PRs

Screenshots

Settings — device management

added

Send dialog (single / bulk)

send
bulk

Admin Email tab

admin

Not-configured setup guide

guide

Checklist

  • pytest passes (281 tests)
  • npm run build clean
  • Manually tested the happy path (real SMTP — single + bulk delivery confirmed)
  • Docs updated
  • In-app "Learn more →" link points to the new docs
  • Screenshots added (all states, all themes)
  • No secrets or credentials committed

Testing

End-to-end against real Fastmail SMTP: single send, bulk send (one connection), guest 403, member allowed, duplicate device 400, max-10 cap 400, oversized file 413, daily-limit 429, send-history logging. All passing.

Notes

  • Versioning: additive/backwards-compatible → lands in Unreleased, ships in the next minor (v1.1), not a major bump. Documented in the changelog now; tag the release when ready.
  • Docs page lives under Features in the nav (it's a first-class feature, not just an integration).
  • No new Python dependencies — stdlib smtplib + email.mime.

bndct-devops and others added 7 commits May 27, 2026 18:57
Users can add device email addresses in Settings and send books
directly to Kindle, Kobo, or any email address. Supports single
and bulk send (max 25), 50/user/day rate limit, 25 MB attachment
limit. Admin Email tab shows SMTP status, all devices, and send
history. Settings page shows setup guide when SMTP is not configured.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Settings (empty/prefilled/added), send modal (single/bulk), and the
admin Email tab with populated SMTP status, devices, and send history.
Adds the corresponding shots to the screenshot script with padding
injection and a cleanup hook for the device-added shot.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Vite failed to detect react-dom/client's createRoot export when
pre-bundling, breaking all client:load islands in dev (theme-aware
screenshots, copy buttons, search). Force optimizeDeps to include
the React entry points. Production builds were unaffected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
New /docs/send-to-device page (SMTP setup with collapsible per-provider
callouts, device management, sending, admin Email tab, limits). Wired
into the docs nav, configuration env table, and admin docs. Added
contextual "Learn more →" links in Settings and the admin Email tab.

Adds a reusable collapsible variant to the Callout component, a docs
checkpoint to the PR template, and refreshes the configured-state
screenshots to show the new docs links.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Documents the feature in CHANGELOG.md and the docs-site mirror. The
mirror gains an Unreleased section reflecting the canonical changelog
(also surfaces the already-merged API token scopes + favicon entries
that were sitting uncommitted).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@bndct-devops bndct-devops marked this pull request as ready for review May 28, 2026 17:21
@bndct-devops bndct-devops merged commit ff56a04 into main May 28, 2026
2 checks passed
@bndct-devops bndct-devops deleted the feature/send-to-device branch May 28, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant