Skip to content

feat: add LectureTags collection with targeting rules - #267

Merged
Ardnived merged 5 commits into
mainfrom
feature/266-lecture-tags
Apr 13, 2026
Merged

Ardnived merged 5 commits into
mainfrom
feature/266-lecture-tags

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • Create new LectureTags collection (src/collections/tags/LectureTags.ts) with label field, rulesField (targeting rules for pathProgress, totalMeditationsViewed, totalLecturesViewed), and bidirectional join to lectures
  • Add tags hasMany relationship field to the Lectures collection
  • Register in wemeditate-app project visibility (not wemeditate-web)
  • Include database migration for lecture_tags table and lectures_rels junction table

Closes #266

Test plan

  • CRUD operations: create, read, update, delete lecture tags
  • Label required validation
  • Rules field: valid range rules accepted, max > min validation, null/empty rules OK
  • JSON schema defines additionalProperties: false for client-side validation
  • Bidirectional join: lectures reference tags, join field reflects on tag
  • Join field updates when lecture tags are reassigned
  • Factory function creates tags with defaults and overrides
  • All existing tests still pass (691 passed, 2 pre-existing skips)
  • Build succeeds

Test Results

  • Integration tests: 691 passed, 2 skipped (pre-existing in app-cards and lessons)
  • E2E tests: not applicable (no UI changes)
  • Build: ✓ Success

🤖 Generated with Claude Code

Ardnived and others added 5 commits April 13, 2026 12:50
Create LectureTags collection for categorizing and targeting lectures
to specific users based on app progress. Add tags hasMany relationship
to Lectures collection with bidirectional join.

Closes #266

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add createLectureTag factory to testData.ts and comprehensive
integration tests covering CRUD, rules validation, JSON schema
configuration, and bidirectional join with lectures.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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.

Create LectureTags collection with targeting rules and bidirectional Lectures relationship

1 participant