APP: segment-based reading progress tracker and continue-reading prompt#1697
Open
johan-bell wants to merge 46 commits into
Open
APP: segment-based reading progress tracker and continue-reading prompt#1697johan-bell wants to merge 46 commits into
johan-bell wants to merge 46 commits into
Conversation
Collaborator
Author
ivanslabbert
left a comment
Contributor
There was a problem hiding this comment.
Split documentation restructuring into separate issue
…angoToDexie for content retrieval and improve filtering logic
Shared WPM resolution, word counting, and per-block dwell bounds keep SingleContent estimates and the progress tracker on the same math.
Expose get/set/remove helpers and a reactive ref so Continue Reading can subscribe to progress changes across tabs.
…tes. Dwell accumulates per prose block only while the user is not skimming, so fast scrolls do not count as read progress.
Replace scroll-depth tracking with the dwell-based composable on the prose body and restore saved scroll position on return visits.
Show in-progress text articles from localStorage instead of recomputing eligibility from scroll position alone.
Add a written guide and diagram for how visibility, scroll velocity, and per-block dwell combine to power the Continue Reading row.
… reading progress tracker files. Update state declaration to use const for better clarity.
…ved reactivity. Clean up code formatting for better readability.
Scale the skim velocity threshold with language WPM and centralize idle and scroll-sample constants used by the tracker.
…ates. Require block bottom in viewport, scale skim detection from language WPM, pause dwell after inactivity, and auto-restore scroll on article reopen.
Cover block-end eligibility, WPM-scaled velocity, idle pause, no-scroll progress, and scroll restore on mount.
Document block-end, WPM-scaled skim, idle pause, and auto-restore behavior across the markdown guide and draw.io diagram.
…mproved type safety.
… eligibility logic. Introduce new functions for estimating words per pixel and resolving active blocks. Update scroll velocity handling to use words per second instead of pixels per second, improving accuracy in tracking reading progress.
… for skim detection and block dwell logic. Introduce functions for estimating words per pixel and computing scroll velocity in words per second, improving clarity and accuracy in reading progress tracking.
…for resolving active blocks and computing scroll velocity in words per second. Enhance skim detection logic and update test cases to reflect changes in state management and velocity handling, ensuring accurate tracking of reading progress.
…ds per pixel and computing scroll velocity in words per second. Refactor existing tests to ensure accurate validation of skim detection and velocity calculations, enhancing overall test coverage and reliability.
…changes in block eligibility and skim detection logic. Clarify the calculation of reading speed in words per second and enhance descriptions of tracking behavior, including idle pauses and scroll restoration on article reopen.
…ext presence, regardless of video content. Update documentation to clarify tracking conditions and improve descriptions of functionality.
Split tall prose blocks into viewport-height segments so gate 1b works on mobile, show a resume card on article reopen, and fix tracker tests for jsdom. Co-authored-by: Cursor <cursoragent@cursor.com>
… and update event emissions. The prompt now directly emits 'continue' and 'dismiss' events without intermediate state management. Update SingleContent page to handle prompt visibility based on user interaction.
Automated P0/P1 scenarios, ContinueReading homepage tests, and QA results doc for merge sign-off. Co-authored-by: Cursor <cursoragent@cursor.com>
Restore overlay props and layout from the conflict resolution skipped during rebase.
Enhance the README for the reading progress tracker with detailed explanations of tracking mechanics, segment calculations, and gate conditions. Introduce a new diagram for visual representation of the tracking process. Update references in existing documentation to ensure consistency and clarity.
Introduce a new document listing socket.io message names and their descriptions for API and client communication. Additionally, add several architecture diagrams, including data flows, permission systems, and data models, to enhance understanding of the system's structure and interactions. Update the REST API documentation with a detailed overview and workflow diagram to clarify data synchronization processes.
Enhance clarity and organization of documentation by updating references to guides and architecture diagrams. Key changes include: - Expanded descriptions in `CLAUDE.md` and `README.md` to include guides and index links. - Updated paths in `permissions.service.ts` to reflect new diagram locations. - Adjusted documentation in `app` and `cms` to point to the correct guides for translations and project automation. - Created a new `README.md` in the `docs` directory to serve as an index for documentation. - Archived historical schema upgrades in a new directory for better organization. These updates aim to improve navigation and accessibility of project documentation.
This commit introduces significant changes to the content progress tracking system, merging reading and media progress into a unified structure stored under `contentProgress`. Key updates include: - Renamed functions and variables to reflect the new content progress model. - Migrated legacy `readingProgress` and `mediaProgress` data into the new format. - Updated UI components to display content in progress under a single "Continue" section, replacing the previous "Continue Watching" and "Continue Reading" components. - Enhanced tests to cover the new progress tracking logic and ensure proper functionality across components. These changes aim to streamline the user experience and improve the maintainability of the codebase.
This commit updates the SingleContent test suite to incorporate better handling of content progress tracking. Key changes include: - Added `removeReadingProgress` and `syncContentProgressFromStorage` to ensure proper state management during tests. - Cleared local storage and reset timers in the `afterEach` hook for consistent test environments. - Replaced `waitForExpect` with `flushPromises` and `nextTick` for more reliable asynchronous handling. These improvements aim to enhance test reliability and maintainability.
Show max(reading%, watching%) without duration labels so the Continue row treats articles and video consistently.
Expose --desktop-sidebar-w so fixed overlays can align with the content column when the sidebar is expanded or collapsed.
Use a progress bar, X dismiss, flexible width for i18n, content-column centering on desktop, and spacing above the mobile nav.
Remove unused home.continue.watch/read keys and align the compact prompt action label with the meeting wording.
3460c15 to
a6aeca0
Compare
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.
Review
Status: Ready for review
Supersedes #923 — that PR was merged by mistake and
mainwas reverted to8d56696f. This is the rebased branch (9955287c) with segment-based tracking, continue prompt UX fix, and QA specs. Commit history from the old PR is on this branch; review thread starts fresh here.Related issue: #912
Summary
Changes
useReadingProgressTracker.ts— segment collection, visibility/skim/dwell gates, localStorage persistence, scroll restore with guard windowContinueReadingPrompt.vue+SingleContent.vue— resume card;continuePromptHandledprevents prompt reappearing after ContinueContinueReading.vue— homepage row from savedreadingProgressreadingTime.ts— shared dwell and skim-cap math (language WPM)docs/reading-progress-tracker.md+ diagram — architecture and gate documentationreadingProgressTracker.qa.spec.ts,ContinueReading.spec.ts,docs/qa/reading-progress-tracker-results.md(63 automated tests passing)home.continue.readTest plan
readingProgressand homepage rowcd app && npm run test -- --run src/composables/useReadingProgressTracker.spec.ts src/qa/readingProgressTracker.qa.spec.ts src/components/HomePage/ContinueReading.spec.ts