{'heading': 'Three ways to filter the 60 guided practices in the app', 'summary': 'In the `Practices` tab (`PracticesView`), you can narrow down the 60 bundled guided sessions in three ways: (1) check the `RIGHT NOW` card at the top, which filters by the current time-of-day window and sorts by your active Ayurvedic constitution fit; (2) tap the horizontal filter chips (`All`, `Favorites`, `Meditation`, `Visualisation`, `Pranayama`, `Relaxation`, `Kriya`); or (3) use global search to match 19 metadata fields—including words spoken inside the practice script.', 'bullets': ['Six clock slots: `Dawn` (04:00–05:59), `Morning` (06:00–10:59), `Midday` (11:00–13:59), `Afternoon` (14:00–16:59), `Evening` (17:00–20:59), and `Night` (21:00–03:59).', 'Constitution-aware sorting: When you have saved an Ayurveda profile, `rightNowPractices` ranks time-matched sessions by `target.doshaFit(vata:pitta:kapha:)`.', 'Live chip counts: Each filter chip displays the exact count of age-eligible practices in that category (`All 60`, `Favorites`, etc.).', 'Deep script search: Typing a word into search checks not only titles and Sanskrit names, but also posture, eyes, guna, agni, contraindications, and every `PracticeCue` line.']}
In the `Practices` tab (`PracticesView`), you can narrow down the 60 bundled guided sessions in three ways: (1) check the `RIGHT NOW` card at the top, which filters by the current time-of-day window and sorts by your active Ayurvedic constitution fit; (2) tap the horizontal filter chips (`All`, `Favorites`, `Meditation`, `Visualisation`, `Pranayama`, `Relaxation`, `Kriya`); or (3) use global search to match 19 metadata fields—including words spoken inside the practice script.
Six clock slots: `Dawn` (04:00–05:59), `Morning` (06:00–10:59), `Midday` (11:00–13:59), `Afternoon` (14:00–16:59), `Evening` (17:00–20:59), and `Night` (21:00–03:59).
Constitution-aware sorting: When you have saved an Ayurveda profile, `rightNowPractices` ranks time-matched sessions by `target.doshaFit(vata:pitta:kapha:)`.
Live chip counts: Each filter chip displays the exact count of age-eligible practices in that category (`All 60`, `Favorites`, etc.).
Deep script search: Typing a word into search checks not only titles and Sanskrit names, but also posture, eyes, guna, agni, contraindications, and every `PracticeCue` line.
How the "RIGHT NOW" Card Matches Clock Time and Your Constitution
At the top of the `Practices` tab, the `RIGHT NOW` card automatically adapts to your device clock using `PracticeDaySlot.current()`. The day is divided into six traditional windows, each with its own guidance subtitle: `Dawn` (04:00–05:59, *"Quiet clarity before the day begins"*), `Morning` (06:00–10:59, *"Awaken attention and steady energy"*), `Midday` (11:00–13:59, *"Cool intensity and return to centre"*), `Afternoon` (14:00–16:59, *"Settle movement and restore focus"*), `Evening` (17:00–20:59, *"Release the day and turn inward"*), and `Night` (21:00–03:59, *"Soften effort and prepare for rest"*).
First, `rightNowPractices` filters the catalog to sessions tagged with the current time slot (`timeOfDay.contains(currentSlot.rawValue)`) and appropriate for the active profile's age (`minimalAgeMonths <= profile.ageInMonths`). Next, if you have set up a constitution or recent check-in in `AyurvedaConstitutionStore`, the app computes `target.doshaFit(vata: lhs.doshaVata, pitta: lhs.doshaPitta, kapha: lhs.doshaKapha)` and surfaces the highest-fit practice on the `Suggested` quick-launch button.
- No constitution required: If you have not saved an Ayurvedic constitution yet, `RIGHT NOW` still filters by the current time-of-day window in catalog order.
- Automatic refresh: Updating your constitution or completing a 5-question check-in posts `.ayurvedaConstitutionDidChange` and immediately updates the `Suggested` practice.
- Visual dosha ring: Every practice thumbnail displays a 3-color proportional arc ring (blue for Vata-pacifying, orange for Pitta-pacifying, green for Kapha-pacifying).
Using the Seven Horizontal Filter Chips and Live Counts
Below the `RIGHT NOW` card, a horizontal scroll bar presents the seven `PracticeListFilter` chips: `All`, `Favorites` (marked with a yellow star icon), `Meditation`, `Visualisation`, `Pranayama`, `Relaxation`, and `Kriya`. Notice that on individual practice rows and detail headers, `kindDisplayName("pranayama")` renders the concise label `BREATH` alongside the default duration (`practiceDuration(practice.durationSeconds)`).
Each chip displays a monospaced number next to its title (`practiceCount(for: filter)`), showing how many practices in your catalog belong to that category before you even tap it. Selecting a chip filters the list below, and if you simultaneously type into the global search bar, the search query narrows results *within* your currently selected chip rather than resetting your category filter.
- `All` chip: Shows all 60 bundled practices (filtered by profile age eligibility) in `catalogNumber` order.
- `Favorites` chip: Isolates practices where `effectiveIsFavorite` is true; if none are starred yet, an empty-state card explains *"Tap the star on a practice to add it to Favorites."*
- Five modality chips (`Meditation`, `Visualisation`, `Pranayama`, `Relaxation`, `Kriya`): Filter strictly by `practice.kind`.
What the 19-Field Search Bar Actually Searches
Sometimes you remember a specific instruction, posture requirement, or contraindication rather than a practice's title. In `PracticesView.matchesSearch(_:)`, typing into the global search bar runs a case- and diacritic-insensitive check (`localizedStandardContains`) across 19 distinct properties of every `Practice` record.
In addition to `title`, `sanskrit`, `practiceDescription`, `technique`, `sourceTradition`, `kind`, and `slug`, the search engine checks `posture` (such as `seated` or `supine`), `eyes` (`closed`, `soft`, `open`), `guna` (`sattvic`, etc.), `agni`, `goals`, `themes`, `timeOfDay`, `season`, `contraindications`, and the full text of every spoken cue (`practice.script.map(\.text)`).
- Search by posture or eye state: Type `supine` or `chair` to find practices that do not require floor sitting.
- Search by season or time of day: Type `evening`, `dawn`, `summer`, or `winter` to browse practices outside the current clock hour.
- Search inside spoken scripts: Type a phrase like `nostril`, `abdomen`, or `shoulder` to find every guided script that cues that landmark.
Frequently Asked Questions
Why does the Suggested practice on the RIGHT NOW card change at 11:00 AM and 5:00 PM?
`PracticeDaySlot.current()` switches from `Morning` (06:00–10:59) to `Midday` at 11:00, to `Afternoon` at 14:00, and to `Evening` at 17:00, re-filtering the library to practices authored for that time window.
What do the blue, orange, and green arcs around each practice thumbnail mean?
`PracticeThumbnailView` draws proportional ring segments for each dosha that the practice pacifies (`max(-practice.doshaVata, 0)` in blue, `max(-practice.doshaPitta, 0)` in orange, and `max(-practice.doshaKapha, 0)` in green).
Why did my search return "No Results" when I know a practice exists?
Check whether one of the category chips (`Favorites`, `Meditation`, `Kriya`, etc.) is currently selected; search filters inside the active chip, so tapping `All` searches across all 60 practices.





