Add on-device app log for failed saves, images, and summaries - #70
Merged
Merged
Conversation
Record article-download, image/thumbnail, and summarization failures in a bounded IndexedDB log, surfaced on the Diagnostics screen with filtering and copy-to-clipboard. This makes failures inspectable from mobile, where the JS console is not available.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Failures were only visible in the JavaScript console plus a transient snackbar. On mobile there's no console, so a failed save, a broken image/thumbnail download, or a failed summary left no trace.
What
Adds an app-level event log persisted in IndexedDB and surfaced on the Diagnostics screen.
logsDexie table (schema v5) andsrc/utils/logging.ts(recordLog,clearLogs,formatLogsForCopy). Bounded to the last 500 entries; logging is fire-and-forget and never throws.fetch.logcan't exist (lib/src/ingestion.ts)lib/src/ingestion.ts)lib/src/ingestion.ts,ArticleScreen.tsx)tools.ts) and PDF/image/paste ingest errors (SubmitScreen.tsx)/diagnostics(Preferences → Diagnostics) with level/category filters and a copy-to-clipboard button so the log can be pasted off a phone. Local only — nothing is uploaded or synced.Notes
The existing per-article
saves/<slug>/fetch.logis untouched and still shown in the article's Edit Info drawer; this is a separate, app-wide log.Testing
npx tsc --noEmit— cleannpm run lint— no new warningsnpx jest— 281 passedDocs updated: README FAQ entry and CHANGELOG.