Skip to content

Enhance My Recitation Collection functionality - #733

Draft
dhakar66 wants to merge 4 commits into
developfrom
feat/CreateCollectionButtonFunctionality
Draft

Enhance My Recitation Collection functionality#733
dhakar66 wants to merge 4 commits into
developfrom
feat/CreateCollectionButtonFunctionality

Conversation

@dhakar66

@dhakar66 dhakar66 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator
  • Added support for 'myRecitationCollection' navigation source in appRouterProvider.
  • Updated navigation context to include language for recitation items.
  • Implemented completion tracking for chants in My Recitation Collection, allowing users to mark chants as completed.
  • Introduced MyRecitationCompletionService to handle chant completion requests during reading.
  • Updated UI components to reflect completion state and language for recitation items.
  • Refactored related models and providers to support new features and ensure consistency across the application.

this branch consists the functionality of checkbox marking. integrated with backend. and number of days streak completed.

for each button such as add to practice and bookmarks and share i will make a new branch.

- Added support for 'myRecitationCollection' navigation source in appRouterProvider.
- Updated navigation context to include language for recitation items.
- Implemented completion tracking for chants in My Recitation Collection, allowing users to mark chants as completed.
- Introduced MyRecitationCompletionService to handle chant completion requests during reading.
- Updated UI components to reflect completion state and language for recitation items.
- Refactored related models and providers to support new features and ensure consistency across the application.
@dhakar66
dhakar66 requested a review from tentamdin September 8, 2026 04:58
@dhakar66 dhakar66 self-assigned this Sep 8, 2026
@dhakar66
dhakar66 marked this pull request as draft September 8, 2026 04:58
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds ordered reader navigation and daily completion tracking for user-created recitation collections, including completion APIs, state providers, language propagation, and collection-row status UI.

  • Adds personal-collection completion requests and Riverpod state management.
  • Carries collection items and languages through adjacent reader navigation.
  • Marks completion from reader lifecycle, swipe, and finish paths.
  • Extends reader controls and routing for the new navigation source.

Confidence Score: 3/5

The PR should not merge until personal chants stop completing on mere display and adjacent items no longer inherit an unrelated chant's language.

Reader initialization currently records each newly displayed personal-collection chant, while adjacent navigation can resolve nullable-language items using the preceding item's language and display the wrong version.

Files Needing Attention: lib/features/reader/presentation/screens/reader_screen.dart; lib/features/reader/domain/services/navigation_service.dart

Important Files Changed

Filename Overview
lib/features/reader/presentation/screens/reader_screen.dart Adds initialization-time personal chant completion, causing displayed chants to be recorded before the user advances or finishes.
lib/features/reader/domain/services/navigation_service.dart Adds personal collection navigation and adjacent language propagation, but incorrectly inherits the previous item's language when the destination language is null.
lib/features/practice/presentation/providers/my_recitation_completion_service.dart Adds container-scoped request coordination and deduplication for personal collection completion.
lib/features/practice/presentation/providers/my_recitation_collections_providers.dart Adds per-collection loading, submission, error, and completed-ID state.
lib/features/practice/presentation/screens/my_recitation_collection_screen.dart Builds ordered reader context, enables collection reading, and displays completion status.
lib/features/practice/data/datasource/my_recitation_collections_remote_datasource.dart Adds authenticated today-completion and chant-completion endpoint calls with duplicate handling.
lib/features/reader/data/models/navigation_context.dart Adds the personal collection source and per-item language metadata throughout PlanTextItem value semantics.

Sequence Diagram

sequenceDiagram
  participant U as User
  participant C as Collection screen
  participant R as Reader
  participant N as Navigation
  participant P as Completion provider
  participant API as Completion API
  U->>C: Open chant
  C->>R: Push reader with collection context
  R->>P: Complete displayed chant on initialization
  P->>API: POST chant completion
  U->>R: Swipe next
  R->>P: Complete current chant
  R->>N: Navigate adjacent
  N->>R: Replace reader with next chant
  R->>P: Complete next chant on initialization
Loading
Prompt To Fix All With AI
### Issue 1
lib/features/reader/presentation/screens/reader_screen.dart:132-136
**Reader Open Completes Chants**

When a user opens a personal-collection chant or swipes onto an adjacent one, reader initialization calls `completeCurrent`, causing the newly displayed chant to be recorded as complete before the user advances or finishes it.

### Issue 2
lib/features/reader/domain/services/navigation_service.dart:57
**Previous Language Leaks Forward**

When an adjacent personal-collection item has no language, this fallback assigns the previous item's language, causing the reader to resolve the destination chant in the wrong language instead of using the configured content-language behavior.

```suggestion
        language: adjacentText.language,
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Enhance My Recitation Collection functio..." | Re-trigger Greptile

Comment thread lib/features/reader/presentation/screens/reader_screen.dart Outdated
Comment thread lib/features/reader/domain/services/navigation_service.dart Outdated
- Introduced a new API endpoint to fetch the completion days count for a specific recitation collection.
- Updated MyRecitationCollectionsRemoteDatasource to include the new method for fetching completion days.
- Added MyRecitationCollectionCompletionDaysCountResponse model to handle the response from the new API.
- Enhanced MyRecitationCollectionsRepository to integrate the new completion days count functionality.
- Modified MyRecitationCollectionCompletionState to track if a chant has been completed in the current session.
- Updated MyRecitationCollectionScreen to show a completion sheet when all chants are completed, displaying the total days count.
- Refactored related UI components to accommodate the new completion tracking logic and ensure a seamless user experience.
… from ReaderScreen to streamline code and improve maintainability.
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