feat/onboarding-help #127

Merged
EgorEast merged 131 commits from feat/onboarding-help into main 2026-10-16 16:24:01 +00:00
Owner

Онбординг в приложении (#124)

Зачем

В приложении нет обучения пользователей. Добавлена система контекстных обзоров: кнопка «?» в шапке каждого экрана открывает выбор сценария, после которого запускается spotlight-тур — затемнение с «дыркой» вокруг реальных элементов интерфейса и карточками-подсказками.

Что внутри

Кнопка «?» и пикер

  • «?» на всех пользовательских экранах: централизованно в layout'ах, склейка с кастомными headerRight через OnboardingHelpRow, отдельные ряды на безшапочных табах
  • «?» открывает пикер сразу, без модалки-подтверждения; список разбит на группы «На этом экране» / «Глобальные» (поле screens у сценария, exact-match)
  • 17 сценариев: listen, player, playlists, search, share, history, offline, settings, playlist-menu, read*, study* (* — под фича-флагами) + авто-сценарии welcome / whatsNew

Механика тура

  • Spotlight через SVG-маску (react-native-svg — уже был в зависимостях, новых пакетов нет); карточка шага с «Назад / Далее / Готово», счётчиком и закрытием; Android back завершает тур
  • Цели: OnboardingTarget, хук useOnboardingTargetRef и паттерн onboardingTargetId для переиспользуемых компонентов; замер — мультисемпл 100/500/1200/2500 мс + transitionEnd + onLayout (не ловит середину анимаций и загрузку списков)
  • Многоэкранные туры: шаги с route (наследование маршрута), навигация через router.navigate без дублей стека, оверлей скрывается на время перехода
  • Тур выполняет действия сам: tapActionId — трёхкратная имитация тапа → действие → автопереход: открытие меню плеера, выбор «Подробнее», печать запроса «лицемерие» в поиске, нажатие первой проповеди
  • Подсветка областей: areaTargetIds — затемнение фона с «дырками» и цветной заливкой зон (края перемотки в плеере); зоны остаются живыми для тапа
  • Интерактивные шаги (waitFor: 'sermonSelected' | 'paused') и interactive-шаги — карточка над живым UI, пользователь выполняет действие сам
  • Автоскролл к целям вне вьюпорта (в обе стороны, с анимацией); шаги со скрытыми целями
    исключаются из колоды (skipIfMissing) — счётчик «Шаг N из M» показывает реальные числа,
    последний видимый шаг завершает тур кнопкой «Готово»; задизейбленные, но отрисованные
    пункты — подсвечиваются

Автозапуск и настройки

  • Первый запуск → тур «Добро пожаловать»; смена версии → «Что нового» (sinceVersion); отметка «видел» пишется до старта, при выключенных турах — не пишется
  • Переключатель «Обзоры и подсказки» в настройках: прячет все «?», блокирует автозапуск
  • Ключи tours_disabled / tours_seen_version добавлены в резервное копирование (replace + merge)

Архитектура

  • Новая FSD-срезка src/features/onboarding/ (Reatom-модель, сценарии как данные, оверлей-хост в _RootLayout)
  • Правило зафиксировано в AGENTS.md (правило 6) и docs: новая фича или изменение поведения → обнови онбординг в том же PR
  • Межслойные @x-мосты между фичами удалены как нарушение правила «@x только между сущностями»: контракт настроек импорта спущен в shared/model/importSettings, экшены плеера инлайнены в виджет, для поиска — dependency inversion (generic wrapper-пропы + регистрация действий на экране)

Тесты

298 suites / 2505 тестов (+208 к baseline): модель тура, фильтры сценариев, оверлей (фазы, тапы, ожидания), бэкап round-trip, useAutoTours, tooltipPosition. lint / types / knip / steiger / depcruise — чисто.

Документация

  • docs/features/onboarding.md — полное описание механик + гайд «как добавить сценарий/цель»
  • Обновлены 16 файлов docs/screens/*.md, contracts/storage.md, features/player.md, features/settings-backup.md, architecture.md, conventions.md, decisions.md
  • debt.md — записи закрыты

Проверить руками

  • Тур «Плеер» на свежей установке (на девайсе с сохранённой проповедью waitFor-шаги предвыполнены)
  • Тур «Меню плейлиста» под админом и без (шаги скрытых пунктов пропускаются)
  • Скролл пикера до последнего пункта
  • Поведение «Далее» в туре плеера (не пробивает на «следующую проповедь»)
## Онбординг в приложении (#124) ### Зачем В приложении нет обучения пользователей. Добавлена система контекстных обзоров: кнопка **«?»** в шапке каждого экрана открывает выбор сценария, после которого запускается spotlight-тур — затемнение с «дыркой» вокруг реальных элементов интерфейса и карточками-подсказками. ### Что внутри **Кнопка «?» и пикер** - «?» на всех пользовательских экранах: централизованно в layout'ах, склейка с кастомными `headerRight` через `OnboardingHelpRow`, отдельные ряды на безшапочных табах - «?» открывает пикер сразу, без модалки-подтверждения; список разбит на группы **«На этом экране»** / **«Глобальные»** (поле `screens` у сценария, exact-match) - 17 сценариев: listen, player, playlists, search, share, history, offline, settings, playlist-menu, read\*, study\* (\* — под фича-флагами) + авто-сценарии welcome / whatsNew **Механика тура** - Spotlight через SVG-маску (`react-native-svg` — уже был в зависимостях, новых пакетов нет); карточка шага с «Назад / Далее / Готово», счётчиком и закрытием; Android back завершает тур - Цели: `OnboardingTarget`, хук `useOnboardingTargetRef` и паттерн `onboardingTargetId` для переиспользуемых компонентов; замер — мультисемпл 100/500/1200/2500 мс + `transitionEnd` + `onLayout` (не ловит середину анимаций и загрузку списков) - **Многоэкранные туры**: шаги с `route` (наследование маршрута), навигация через `router.navigate` без дублей стека, оверлей скрывается на время перехода - **Тур выполняет действия сам**: `tapActionId` — трёхкратная имитация тапа → действие → автопереход: открытие меню плеера, выбор «Подробнее», печать запроса «лицемерие» в поиске, нажатие первой проповеди - **Подсветка областей**: `areaTargetIds` — затемнение фона с «дырками» и цветной заливкой зон (края перемотки в плеере); зоны остаются живыми для тапа - **Интерактивные шаги** (`waitFor: 'sermonSelected' | 'paused'`) и `interactive`-шаги — карточка над живым UI, пользователь выполняет действие сам - Автоскролл к целям вне вьюпорта (в обе стороны, с анимацией); шаги со скрытыми целями исключаются из колоды (`skipIfMissing`) — счётчик «Шаг N из M» показывает реальные числа, последний видимый шаг завершает тур кнопкой «Готово»; задизейбленные, но отрисованные пункты — подсвечиваются **Автозапуск и настройки** - Первый запуск → тур «Добро пожаловать»; смена версии → «Что нового» (`sinceVersion`); отметка «видел» пишется до старта, при выключенных турах — не пишется - Переключатель **«Обзоры и подсказки»** в настройках: прячет все «?», блокирует автозапуск - Ключи `tours_disabled` / `tours_seen_version` добавлены в резервное копирование (replace + merge) ### Архитектура - Новая FSD-срезка `src/features/onboarding/` (Reatom-модель, сценарии как данные, оверлей-хост в `_RootLayout`) - Правило зафиксировано в AGENTS.md (правило 6) и docs: **новая фича или изменение поведения → обнови онбординг в том же PR** - Межслойные `@x`-мосты между фичами удалены как нарушение правила «@x только между сущностями»: контракт настроек импорта спущен в `shared/model/importSettings`, экшены плеера инлайнены в виджет, для поиска — dependency inversion (generic wrapper-пропы + регистрация действий на экране) ### Тесты 298 suites / 2505 тестов (+208 к baseline): модель тура, фильтры сценариев, оверлей (фазы, тапы, ожидания), бэкап round-trip, `useAutoTours`, `tooltipPosition`. lint / types / knip / steiger / depcruise — чисто. ### Документация - `docs/features/onboarding.md` — полное описание механик + гайд «как добавить сценарий/цель» - Обновлены 16 файлов `docs/screens/*.md`, `contracts/storage.md`, `features/player.md`, `features/settings-backup.md`, `architecture.md`, `conventions.md`, `decisions.md` - `debt.md` — записи закрыты ### Проверить руками - Тур «Плеер» на **свежей установке** (на девайсе с сохранённой проповедью `waitFor`-шаги предвыполнены) - Тур «Меню плейлиста» под админом и без (шаги скрытых пунктов пропускаются) - Скролл пикера до последнего пункта - Поведение «Далее» в туре плеера (не пробивает на «следующую проповедь»)
- Reatom tour model: start/next/prev/end actions and a target-rect registry
- 7 onboarding scenarios (listen, playlists, history, offline, settings, read, study)
- Offer confirm dialog and scenario picker modal behind a header help button
- Spotlight tour overlay with SVG mask, tooltip card and measuring target wrapper
- Pure tooltip-position helper plus unit tests for model, helper, modals and overlay

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
OnboardingTarget rendered a plain collapsable={false} View with no style, so
wrapping flex:1 children (history.rows, offline.rows, study.tabs) collapsed
their layout, and wrapping the absolutely-positioned animated MiniPlayer
(player.mini) produced a zero-size wrapper that the zero-size guard dropped.

- add an optional style passthrough to OnboardingTarget and give the flex
  targets style={{ flex: 1 }}
- extract the shared active-target measurement into useTargetMeasure and add
  useOnboardingTargetRef, which measures a node via a ref without a wrapper
- forward a ref through MiniPlayer and attach the target ref to its root
  AnimatedPressable, so player.mini is measured with its animated positioning

Signed-off-by: egoreast <egor.east@yandex.ru>
The history.header-menu step target was never wrapped in OnboardingTarget,
so the step degraded to a centered text card. The missing wrap was found
during the onboarding docs review.

Signed-off-by: egoreast <egor.east@yandex.ru>
Add docs/features/onboarding.md: "?" flow, 7 scenarios, spotlight targets,
architecture, per-screen integration
Mention the "?" button in 14 screen docs and index the feature doc in
docs/README.md
Add three onboarding debt entries (no first-launch auto-start, no completion
persistence, single-screen scenarios)

Signed-off-by: egoreast <egor.east@yandex.ru>
- New rule 6: features and behavior changes must update or add
  onboarding scenarios/targets in the same PR
- Add onboarding feature doc to the docs read-list

Signed-off-by: egoreast <egor.east@yandex.ru>
- Add tours_disabled/tours_seen_version keys, toursDisabledAtom,
  setToursDisabled/loadToursDisabled/setToursSeenVersion in shared/model
- Add ToursSettingsItem to SettingsScreen and hide HelpHeaderButton when
  tours are disabled
- Include both keys in settings backup (read/build/apply, merge+replace)
- Add settings.tours onboarding target and scenario step
- Update storage/onboarding/settings-backup/state/settings docs

Signed-off-by: egoreast <egor.east@yandex.ru>
- OnboardingStep.route + overlay-driven router.push per active step
- Hide tooltip until the target rect arrives (1200ms wait, no flicker)
- Remove useStartScenarioTour; picker starts the tour directly
- Add route/target ids across scenarios and wrap more/playlists.create
- Update onboarding docs; close single-screen tours debt

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
- Auto-start on first launch and what's-new on version change now implemented (debt closed)
- Tour completion state now persisted via tours_seen_version (debt closed)

Signed-off-by: egoreast <egor.east@yandex.ru>
- Reusable page components self-wrap their spotlight target via optional onboardingTargetId
- OnboardingTarget.id is optional: undefined renders children bare
- Explicit wraps remain only for structural elements, cross-layer components
  and the ref-based mini player

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Clamp the computed tooltip top into the visible window in every branch, and
render a registered-but-fully-off-screen target rect as if it were missing:
no dim hole, centered card, no 1.2s wait. Prevents a pure-dim dead end when
the highlighted element is scrolled below the fold.

Signed-off-by: egoreast <egor.east@yandex.ru>
Screens register their main scrollable via useTourScrollable; when an active
target measures below the fold, useTargetAutoScroll scrolls it into view and
re-measures on a bounded +300/+700ms schedule before highlighting. Fully
off-screen rects fall back to the centered-card safety net from the previous
commit. ListenScreen and ReadScreen register their ScrollView.

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Add an optional `screens` field to OnboardingScenario — the exact routes a
scenario belongs to (undefined = global). ScenarioPickerModal splits the
visible list into «На этом экране» (exact pathname match) and «Глобальные»
(the rest), skipping empty groups. Row rendering is extracted into
ScenarioPickerRow/ScenarioPickerGroup; the picker now reads the pathname.

Signed-off-by: egoreast <egor.east@yandex.ru>
The active target was measured once, early — mid transition or before async
data shifted the layout — so the highlight could land in the wrong place.
Now it re-measures on a bounded schedule (100/500/1200/2500 ms) alongside the
transitionEnd listener and onLayout re-measure; timers clear on deactivation.
registerOnboardingTargetRect skips the atom write when the rect is unchanged,
so repeated samples of a settled target no longer spam writes.

Signed-off-by: egoreast <egor.east@yandex.ru>
The overlay was a modal during the tap phase, so it swallowed every touch and
the screen did not respond. The hint now renders in a non-modal pass-through
layer (TourTapLayer: absolute-fill, pointerEvents none) while the real UI stays
live. If the user taps the control and reaches the route first, the tap phase
cancels instead of blinking on a screen we already left; the route effect does
not re-navigate.

Signed-off-by: egoreast <egor.east@yandex.ru>
Rename «таб «Ещё»»/«Таб «Ещё»» to «экран «Ещё»»/«Экран «Ещё»» across the
scenario texts, onboarding/navigation/screens docs and the AdminPanelButton
comment (zero old occurrences repo-wide). Document the picker grouping by
current screen (screens field, exact-match, «На этом экране»/«Глобальные»),
the bounded multi-sample re-measure, and the pass-through tap phase.
HelpHeaderButton opens the picker directly — no confirmation dialog.

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Interactive waitFor steps rendered inside the RN Modal (full-screen dim +
tooltip), which swallowed every touch: the player scenario asks the user to
tap a sermon / pause the mini player, but taps never reached the app, so
fresh users dead-ended.

Render the card in the same non-modal pass-through pattern as the tap phase
while the wait condition is unmet: an absolute-fill layer with
pointerEvents='none' holding the tooltip card positioned via
computeTooltipLayout. No dim, no hole — the live UI stays visible and fully
interactive so the user can perform the real action. The card wrapper gets
pointerEvents='auto' so close/prev stay tappable and the tour is cancellable.

Once the condition is satisfied the overlay switches back to the modal
(dim + hole + primary button). The modal JSX moved to a dedicated
TourSpotlight component so the overlay stays a thin dispatcher.

Signed-off-by: egoreast <egor.east@yandex.ru>
Starting a tour wipes the rect registry, so a scenario's first navigation
fired before the step's tapTargetId rect was measured and the tap hint never
played. useStepNavigation now holds navigation up to HOLD_FOR_TAP_MS (500ms,
real timer cleared on tour end / step change) while a declared tap target's
rect is still missing: if it registers in time the normal blink phase runs,
otherwise the tour navigates without the hint.

useTargetAutoScroll passed bottomInset: 0 to isRectOutsideViewport while
useStepNavigation used the real insets.bottom, so a target hidden only by the
bottom safe area was never scrolled into view. OnboardingTarget now reads
useSafeAreaInsets and forwards the real bottom inset.

Docs: wait-phase behaviour (live UI, pass-through cancellable card) and the
first-step tap-hint hold.

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Android 12+ forbids starting a foreground service from the background
(ForegroundServiceStartNotAllowedException). Cold-start restore could reach
LockScreenControls full activation while paused/backgrounded, so expo-audio
caught and logged the failed FGS start.

Gate only the full-activation path on AppState.currentState === 'active'
(in-place updateLockScreenMetadata does not start the service): while
backgrounded, stash the latest { player, metadata } and lazily register an
AppState listener; on the next 'active' transition activate only if the
pending player is still the tracked one (clear() invalidates it). Lock-screen
controls still appear via the notification fallback until then.

Extract the retry/versioning loop into LoadedRetryScheduler to keep
LockScreenControls within the file-size limit. Existing suites now pin
AppState.currentState = 'active'; new LockScreenControls.test.ts covers
immediate activation, deferral-then-foreground, clear() invalidation and the
in-place update path.

Signed-off-by: egoreast <egor.east@yandex.ru>
The «?» icon was always black: native headerRight call sites coerced the
resolved header tint with a typeof-string check, falling back to undefined.
On native React Navigation passes a ColorValue that is not a JS string, so the
value was discarded and HelpHeaderButton fell back to currentTheme.text outside
the header tint context.

Widen HelpHeaderButton/OnboardingHelpRow tintColor to ColorValue and pass
props.tintColor raw from app/_RootLayout.tsx and app/(tabs)/listen/_layout.tsx
(mirroring SettingsHeaderMenu). Playlist-context rows now forward their sibling
icon color: playlist -> headerIconColor (COLORS.white in cover mode),
my-playlists/playlist-edit -> currentTheme.primary. Tests assert the default
theme text color and an explicit override.

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Add a generic mechanism for scenario steps to make the tour DO something
instead of navigating or just telling:

- lib/tourActions.ts — module registry (registerTourAction / unregisterTourAction
  / getTourAction) following the tourScrollable precedent, with tests.
- OnboardingStep gains tapActionId. An action step is demonstrative: after
  blinking on its tapTargetId the tour runs the registered action and advances
  on its own (ACTION_ADVANCE_DELAY_MS = 1000); it never navigates.
- lib/useTourTapFlow.ts extracts the shared hold-for-rect / 3-pulse blink /
  self-navigation-race / tour-end reset machinery.
- lib/useTourActionStep.ts performs the action once the blink is done (or the
  rect never registered) and auto-advances via goToNextOnboardingStep; a missing
  action still advances. isPerformingAction hides the overlay while the live UI
  shows the action's result.
- Tests: registry register/get/unregister; the action step blinks, performs and
  advances, and advances when the action is missing.

Signed-off-by: egoreast <egor.east@yandex.ru>
The «Подробнее» tour now performs the player actions itself instead of
describing them as text cards:

- features/onboarding/@x/expandable-player.ts + widgets/expandable-player/
  @x/onboarding.ts — @x pair exposing register/unregisterTourAction and the
  usePlayerTourActions({ openMenu, showDetails }) hook.
- ui/FullscreenContent/useFullscreenTourActions.ts wires the player's menu and
  details handlers (details also closes the menu, mirroring a real menu-item
  tap) into the registry; useFullscreenHandlers invokes it while mounted.
- PlayerMenuItems «Подробнее» row is wrapped in OnboardingTarget
  player-fullscreen.menu-details; DetailsOverlay root — player-fullscreen.details.
- player-description scenario reworked to three steps: open the menu, pick
  «Подробнее», then highlight the details widget with its clickable timecodes.
- getCacheActionLabel extracted to widgets/expandable-player/lib to keep
  PlayerMenuItems within the 130-line limit after the target wrap.
- Tests: @x hook registration/unregistration, menu-details rect registration,
  and the reworked scenario shape.

Signed-off-by: egoreast <egor.east@yandex.ru>
- features/onboarding.md: new «Действия тура (tapActionId)» section documenting
  perform-then-advance, hold-for-rect, live-UI blink, the overlay hide during the
  action, the @x bridge (open-player-menu / show-player-details) and the reworked
  player-description scenario; updated the step shape, scenario table, target ids
  (player-fullscreen.menu-details / player-fullscreen.details), call-site list,
  «Как добавить» and test inventory.
- features/player.md: notes the details overlay and «Подробнее» row targets and the
  registered tour actions.

Debt: the onboarding entry added in 244f9bf concerns the `search` scenario not
opening search itself (search-results.group-sermons), not the player menu / text
cards — it is unrelated to this work and stays open.

Signed-off-by: egoreast <egor.east@yandex.ru>
The search scenario no longer starts with a closed search and a degraded
centered card: the first step performs a registered tour action that opens
the search (the same handler as the magnifier button), the second waits for
`searchActive` (query >= MIN_QUERY_LENGTH), and only then the group target
`search-results.group-sermons` exists to be highlighted.

- Add `useTourActionRegistrar(id, action)` (features/onboarding): registers
  a tour action while the owning component is mounted, unregisters on unmount.
- Add `useOpenSearch` (features/sermon-search) — the toggle's press handler,
  reused by `SearchToggleButton` and registered as `open-listen-search` in
  `ListenScreen`.
- Extend the `waitFor` union with `searchActive`; `useWaitForSatisfied` reads
  it through the `features/sermon-search/@x/onboarding` bridge (no cross-feature
  barrel import).
- Close the debt entry "Сценарий search на /listen не открывает поиск сам"
  (docs/debt.md) and refresh docs/features/onboarding.md.

Checks: yarn lint (0 errors), check:types, check:unused, check:fsd,
check:circular (pre-existing book-reader warns only), jest 289 suites / 2394 tests.

Signed-off-by: egoreast <egor.east@yandex.ru>
refactor(player): inline player tour actions and add speed/sound
Some checks failed
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Has been cancelled
13fc6adf45
Drop the features/onboarding ↔ widgets/expandable-player @x pair (cross-slice
@x is now entities-only). usePlayerTourActions moves to
widgets/expandable-player/lib and reads the tour-action registry from the
onboarding barrel — widgets → features is a legal downward import.

The fullscreen player now also registers open-player-speed-menu and
open-player-sound-settings, mirroring the real menu-item taps. The menu page
lives in playerMenuViewAtom so the tour can switch to the speed page.

Signed-off-by: egoreast <egor.east@yandex.ru>
TourWaitLayer now renders translucent highlights for an area step's registered
rects (primary fill, primary border, radius 12, no dim) and takes the tooltip
anchor from the first available rect; the card stays the only touchable layer.

A step gains areaTargetIds (highlight clickable zones — the invisible edge seek
strips) and interactive (float the card over the live UI, no spotlight modal).
PlayerEdgeSeekZones wraps both EdgeSeekZone strips as player-fullscreen.edge-back
/ .edge-forward; the wrapper carries the absolute positioning so the strip layout
is unchanged. PlayerMenuItems/PlayerSpeedMenu/SoundSettingsBottomSheet expose the
menu-speed, menu-sound, speed-menu and sound-sheet targets.

player-intro step 1 becomes an area step; player-speed/player-sound become
3-step interactive flows driving the menu actions themselves.

Signed-off-by: egoreast <egor.east@yandex.ru>
Remove the features/onboarding ↔ features/sermon-search @x pair and the moved
OnboardingSearchGroupHeader adapter. The search feature no longer imports
features/onboarding: SearchGroupedResults/SearchSermonGroup/SearchGroup take
generic groupHeaderWrapper/firstRowWrapper render props, and ListenScreen owns
the OnboardingTarget wrappers (search-results.group-sermons / .first-sermon).

The page registers the tour actions itself (useSearchTourActions): type-search-query
types «лицемерие» into the real search atom prefix by prefix (cancellable), and
press-first-sermon presses the first rendered result via useSermonPlayback. A
demonstrative action step without a tap target now runs on activation.

The search scenario becomes a 6-step interactive flow (open, type, groups, press,
choose playlist, row menu) and waitFor loses the unused searchActive branch.

Signed-off-by: egoreast <egor.east@yandex.ru>
Document areaTargetIds (clickable-area highlights in TourWaitLayer), interactive
steps, and the page-owned dependency-inversion pattern (generic wrapper props +
page-registered actions) that replaced the feature-to-feature @x bridges. Update
the search/player scenario rows, target/action tables and tests list; note the
entities-only @x restriction in architecture/conventions/decisions; refresh the
player edge-zone, menu speed/sound and listen search-tour docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
Move the sermon-audio-import storage contract (key, zod schema,
read/persist/load, defaults and ImportSettings type) down to
src/shared/model/importSettings.ts. The last feature-to-feature @x bridge
(features/sermon-audio-import/@x/settings-backup.ts) is deleted; both
settings-backup and sermon-audio-import now depend on the shared contract
via the shared/model barrel. Update the backup scalar consumers, the
feature hook/utils and the applyBackupScalars test mock accordingly, and
refresh the storage/settings-backup/architecture/conventions docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
fix(player): correct edge seek wording in the tour
All checks were successful
CI / dco (pull_request) Successful in 9s
CI / checks (pull_request) Successful in 6m25s
a9ec5c9455
The player intro tour described the edge zones as a single tap, but the
actual gesture is a double tap (first tap arms the burst, each following
quick tap steps ±10s); long-press keeps the continuous scrub. Update the
player-intro step text and the onboarding scenario table wording.

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
fix(onboarding): keep pass-through tour card interactive
All checks were successful
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Successful in 6m28s
abb540a445
Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): playlist menu tour opens the menu and walks its items
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 6m38s
d0a30d1256
Signed-off-by: egoreast <egor.east@yandex.ru>
The picker's scroll area was content-sized inside the shared Modal's maxHeight
contentContainer, so the last row was clipped and the list could not scroll.
Bound the column with flexShrink: 1 so the ScrollView gets a shorter viewport,
and pad the scroll content by insets.bottom + INDENTS.low so the last row clears
the system nav bar.

Signed-off-by: egoreast <egor.east@yandex.ru>
Wrap the «?» IconButton in OnboardingTarget with a fixed app-wide id
(app.help-button): every mounted instance registers it during a tour, but
zero-size measurements on hidden screens are rejected, so only the active
screen's button holds the rect. Point whatsNew step 1 and a new welcome step 2
at it, and refresh the scenario-shape tests (welcome is now 8 steps).

Signed-off-by: egoreast <egor.east@yandex.ru>
fix(player): make the fullscreen player menu trigger white
All checks were successful
CI / dco (pull_request) Successful in 8s
CI / checks (pull_request) Successful in 6m38s
f12beedea7
The ⋮ menu icon used the muted #9ca3af gray while every neighboring
fullscreen icon (close, transport, stop-all, help) renders #fff, so the
trigger read as disabled against the dark player backdrop. Tint it white like
the rest and lock the parity with a style assertion.

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): skip tour steps for hidden menu items
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 6m38s
20ff04ea45
Add OnboardingStep.skipIfMissing: a step whose target never registers within
600 ms is dropped (forward, or backwards when entered with «Назад»); first/last
boundaries end the tour so the cascade never loops. Mark every playlist-menu item
step skipIfMissing, drop /listen/playlist from the playlists scenario screens, and
update the onboarding/playlist docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
Merge branch 'main' into feat/onboarding-help
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 6m56s
0f2bbb39f9
feat(onboarding): spotlight the disabled offline-remove row in the playlist tour
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 6m34s
a71621527b
Signed-off-by: egoreast <egor.east@yandex.ru>
fix(onboarding): real step count in tours with skipped steps
All checks were successful
CI / dco (pull_request) Successful in 16s
CI / checks (pull_request) Successful in 8m12s
bfbd584a7e
Skipped `skipIfMissing` steps are now removed from the tour deck, so the
«Шаг N из M» counter shows real numbers and the last visible step closes the
tour with «Готово» instead of the tour ending abruptly after the trailing
hidden steps.

- onboardingTourAtom state gains `skippedIndexes`; new `skipOnboardingStep`
  drops the current step and lands on the nearest surviving neighbor, staying
  put (never ending) when nothing survives that way.
- goToNext/goToPrev move to the nearest non-skipped neighbor.
- New pure `resolveTourProgress` / `resolveHiddenStepIndexes` drive the card
  counter, «Готово» (isLastVisible) and «Назад» (isFirstVisible); hidden
  skipIfMissing targets are dropped once any of them has registered.
- useSkipMissingStep uses the deck semantics; the overlay passes the real
  index/total. Extracted useExpiredStepKey to keep the overlay in budget.

Server playlist (publish/clear/delete hidden): counter shows «из 7» and the
history-mark step ends the tour with «Готово».

Signed-off-by: egoreast <egor.east@yandex.ru>
- rename the playlist-menu scenario to «Экран плейлиста» and widen its
  description to cover both playlist management and sermons
- append an interactive «Меню проповеди» step anchored to the first sermon
  row (playlist.first-row), listing the real row-menu items
- wrap the first playlist track row in OnboardingTarget so the interactive
  step's card anchors to it while staying pass-through (no dim)
- extend tests: scenario shape (11 steps, last interactive + targetId),
  picker row titles, overlay pass-through anchoring and step-count deck
- fix model skip-flow fixture for the new trailing step

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): add add-to-playlist tour on the playlist screen
All checks were successful
CI / dco (pull_request) Successful in 8s
CI / checks (pull_request) Successful in 6m45s
173642baea
- add the playlist-add scenario («Добавление в плейлист», three interactive
  steps anchored from the first sermon row) and register it in scenarios /
  scenariosById right after playlist-menu
- split the pure resolveStepRoute helper into its own lib module to keep
  scenarios.ts under the max-lines limit, rewire its two consumers
- extend tests: playlist-add scenario shape and the playlist picker group now
  listing both playlist tours
- update docs: onboarding scenario table/count (18) and the two playlist tours

Signed-off-by: egoreast <egor.east@yandex.ru>
The final «Меню проповеди» step of the playlist-menu tour now closes the
playlist dropdown that step 2 opened and marks the first row with the
translucent area fill, so the user sees exactly which row is meant.

- add the generic step field actionOnEnterId and lib/useStepEnterAction: a
  step performs a registered tour action once on activation (no blink, no
  auto-advance), guarded per step key;
- interactive wins over areaTargetIds: such a step stays in the pass-through
  layer and gets the area fills (without dim), so TourWaitLayer receives the
  resolved area rects on the interactive path;
- register close-playlist-menu next to open-playlist-menu via
  usePlaylistMenuTourActions;
- drop resolveAreaHoles for resolveAreaRects (id + rect, shared by the
  spotlight holes and the pass-through fills).

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): tour walks the playlist row menu
Some checks failed
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Has been cancelled
1bc153e9dd
The «Добавление в плейлист» tour now performs the whole row-menu flow
instead of describing it: it taps the first row, opens its dropdown,
spotlights each item with an explanation, presses «Добавить в плейлист»
and lets the user pick playlists in the modal.

Dependency inversion keeps entities free of features/onboarding:
- entities/track-list gains MenuActionItem (MenuItem + optional
  onboardingTargetId, plain data) and two generic props: renderMenuItem
  (wraps each dropdown row, e.g. in an OnboardingTarget) and bindMenuOpener
  (hands { open, close } to the owner); a first row's menu is driven
  without the entity importing the feature;
- MenuDropdown renders through an optional renderItem;
- pages/playlist sets onboardingTargetId only on the first row's actions
  (usePlaylistActions), wires the renderer, and registers
  open-playlist-row-menu / press-row-menu-add via
  usePlaylistRowMenuTourActions (press mirrors a real tap: close + open the
  add-to-playlist modal for the first sermon).

Signed-off-by: egoreast <egor.east@yandex.ru>
EgorEast force-pushed feat/onboarding-help from 1bc153e9dd
Some checks failed
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Has been cancelled
to 9be415ac07
All checks were successful
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Successful in 6m45s
2026-10-14 15:34:34 +00:00
Compare
fix(onboarding): intro step and forward-only actions in the add tour
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 6m47s
9dd0ac4243
The add-to-playlist tour opens with an intro card: the user reads that the
sermon menu is opened by long-press or the ⋯ button, then presses «Далее».

Action steps are now forward-only. onboardingStepDirectionAtom records the
direction of every step change; the tap flow performs its action only on
forward entry and renders the step statically on back. Backward navigation
skips action steps entirely, so «Назад» from the row-menu step lands on the
intro instead of replaying the blink and action in a loop.

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): add-tour checks favorites and highlights save
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 7m2s
06ddd3fd0d
Rework playlist-add into a 6-step add-only flow: drop the remove/mark/
history-remove steps, have the tour tick «Избранные» via
check-add-modal-favorites and spotlight «Сохранить» (the user saves).

Add dependency-inversion bindings to AddToPlaylistModal (renderRowWrapper/
renderSaveWrapper/bindControls) mirroring the track-list bind pattern; the
page wires OnboardingTarget ids and the tour action through
useAddToPlaylistTour + usePlaylistAddToPlaylist.

Signed-off-by: egoreast <egor.east@yandex.ru>
Cross-layer tests in pages/widgets imported the tour atoms through deep paths
(features/onboarding/model/targets, .../model/tour). Re-export onboardingTourAtom
and onboardingTargetRectsAtom from the slice barrel and rewire the three tests to
import from 'features/onboarding'.

Also lands the uncommitted model/ split that the working tree arrived with
(model.ts -> model/tour.ts + model/targets.ts) so the committed tree references
the new files.

Signed-off-by: egoreast <egor.east@yandex.ru>
A skipIfMissing step whose target is absent used to burn the full SKIP_MISSING_MS
hold even when the surface had already rendered its items. When another target's
rect is registered at activation, the missing target is proven absent, so drop the
step at once; the hold remains only while nothing has registered yet.

Signed-off-by: egoreast <egor.east@yandex.ru>
fix(onboarding): present the tap visualization above app overlays
Some checks failed
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Has been cancelled
5312a6c07c
The blink layer rendered inline in the screen subtree, so an open AnchoredDropdown
(zIndex 101) painted over it. Present the tap circle in its own native window — a
transparent Modal keyed per step — so a fresh window lands above previously
presented app dropdowns/modals. Touches are blocked for the ~2.4s blink; hardware
back ends the tour like the spotlight.

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): present playlist-add steps above the app modal
All checks were successful
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Successful in 6m55s
4f51a7a552
Steps whose target lives inside an app modal (the AddToPlaylist picker) rendered
under it. Add a per-step presentOnTop flag: TourSpotlight re-presents the tour
window (Modal keyed by the step key) so a fresh native window lands above modals
presented earlier. Mark the favorites and save steps; the save step is no longer
interactive so it is presented by the spotlight (highlighted, above the modal).

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
feat(player): pause button highlight and tour-driven fullscreen expand
Some checks failed
CI / dco (pull_request) Successful in 8s
CI / checks (pull_request) Has been cancelled
b65d21e5a8
Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): intro steps before action-first tours
All checks were successful
CI / dco (pull_request) Successful in 9s
CI / checks (pull_request) Successful in 6m50s
5e7c12635d
Add a plain intro card as step 0 to the seven tours whose first step is an
action (search, player-description, player-speed, player-sound, history,
offline, settings), so the action is visualized only after «Далее».

Update scenario shape tests (counts/order) and the overlay/component tests
that index into the affected scenarios. Document the authoring rule and
updated step counts in docs/features/onboarding.md.

Signed-off-by: egoreast <egor.east@yandex.ru>
Action-visualization steps (tapActionId) are no longer tour steps: they attach
to the preceding card as its exit transition, play on forward departure
(Next/Done) and are excluded from the step counter. Back always returns to the
previous card and never replays a visualization.

- add lib/tourDeck.ts (buildTourDeck, resolveDeckProgress, deckCardStep,
  resolveHiddenDeckIndexes, findNearestDeckIndex) and model/derived.ts
- rework model/tour.ts to a deck-based state
  { scenarioId, deckIndex, skippedDeckIndexes } + onboardingExitStepIndexAtom
- rework useStepNavigation/useTourTapFlow/useTourActionStep; add
  useActiveTourStep, useStepRoute, useTourDeckProgress, useTourVisuals
- wire the overlay/tap layer to deck entries; counter counts cards only
- update docs/features/onboarding.md to the deck model

Signed-off-by: egoreast <egor.east@yandex.ru>
docs(agents): tour starts with a card and visualizations are not steps
All checks were successful
CI / dco (pull_request) Successful in 9s
CI / checks (pull_request) Successful in 7m16s
7c7a96596c
Add two binding onboarding sub-rules to AGENTS.md rule 6: a tour always
starts with a description card (the first scenario step cannot be a
tapActionId visualization), and visualization steps are not tour steps
(they attach to the preceding card as an exit transition, are excluded
from the step counter, and Back returns to the previous card).

Signed-off-by: egoreast <egor.east@yandex.ru>
perf(offline): smooth the cached sermons list rendering
Some checks failed
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Has been cancelled
7c43fc2565
The offline list stalled the JS thread while it loaded: filterCachedSermons
ran one synchronous native File.exists (via audioCacheService.isCached) per
candidate in a single Promise.all tick, and the FlatList mounted rows in the
default 21-viewport window, each row firing its own cache check and
subscriptions. Chunk the cache filter through mapWithYields (yields between
batches) and cap the list window (initialNumToRender/maxToRenderPerBatch 8,
windowSize 7). OfflineRow was already memoized with stable props.

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): offline tour waits for the cache and clearer entry steps
All checks were successful
CI / dco (pull_request) Successful in 9s
CI / checks (pull_request) Successful in 6m36s
172e6446c0
The caching-switch step spotlit the switch before the offline list had loaded,
so the highlight sat off-target while the heavy load stalled the thread. Add an
offlineLoaded wait condition sourced from entities/offline-cache
(offlineSermonsLoadedAtom, exported through @x/onboarding and set by
features/offline-sermons once the load settles): the pass-through card shows
while loading, the spotlight lands once the list is stable. Reword the three
more.* entry steps to the «Чтобы открыть X, тапните по этому пункту.» pattern.

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
fix(onboarding): settings tour steps follow the screen order
All checks were successful
CI / dco (pull_request) Successful in 8s
CI / checks (pull_request) Successful in 6m39s
dc13d14566
Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): add backup tour
All checks were successful
CI / dco (pull_request) Successful in 9s
CI / checks (pull_request) Successful in 6m36s
ceb09863b8
Signed-off-by: egoreast <egor.east@yandex.ru>
- backup scenario now covers /listen, /more and /settings and opens from the
  intro card, the «Ещё» tab tap, the settings-item step and the backup section
  (8 steps).
- intro card routes to /listen and the settings-item tapTargetId sits on the
  /settings step, so the resume offsets (full / 1 / 3) and both tap blinks hold
  with the unchanged resume mechanism.
- picker grouping tests and onboarding docs updated.

Signed-off-by: egoreast <egor.east@yandex.ru>
«Глобальные» now holds only scenarios without screens (player,
welcome/whatsNew); a scenario bound to other screens is not offered
on a foreign screen at all, so its target-less cards never show there.
Update picker grouping tests and the onboarding docs grouping rule.

Signed-off-by: egoreast <egor.east@yandex.ru>
The share scenario now starts on «Ещё» too: an intro card, a tab.more
lead-up and a more.share-item entry card (with a tap hint) before the
QR/copy/site steps, so the tour no longer shows plain text cards when
started from «Ещё». MoreScreen exposes more.share-item as a target.

Signed-off-by: egoreast <egor.east@yandex.ru>
The search scenario now starts on «Ещё» too: an intro card and a tab.listen
lead-up (with a tap hint) precede the search-toggle step, so the tour
navigates from «Ещё» instead of blinking on a screen that has no search UI.
Deck-index-dependent tests move with the inserted lead-up.

Signed-off-by: egoreast <egor.east@yandex.ru>
Document the share/search multi-screen lead-ups: updated scenario rows
(screens and steps), the more.share-item target id, and the screen docs
for «Ещё», «Поделиться приложением» and «Слушать».

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): make the backup tour global and drop the More-screen step
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 6m56s
e18daa6d01
The backup scenario no longer declares `screens`, so it is offered from the
«Глобальные» group of every picker (including «Ещё», where it was missing)
instead of only the /listen, /more and /settings screen groups.

- drop the redundant «Экран „Ещё"» card + tab.more blink; the intro card
  already names the path
- turn the «Настройки» step into the navigation step: route /more, tap and
  target `more.settings-item`
- keep the settings.backup section step (route /settings) and the
  folder/export/import/autosync steps: 7 steps total
- tests: update the scenario shape and picker grouping (backup global in
  every picker, absent from all screen groups); remove the backup resume
  tests (global tours always start at 0, covered by the generic global case)
- docs: onboarding.md backup row + grouping/matrix notes; more.md notes the
  backup tour is offered from «Ещё» via «Глобальные»

Signed-off-by: egoreast <egor.east@yandex.ru>
Mirror of the exit mechanism: a pure navigation/visualization step that
precedes a card attaches to it as an entry transition and plays on forward
entry into that card. Such a step has a `tapTargetId` and a route but no
`targetId` (nothing to spotlight) and no `tapActionId` (nothing to perform);
the scenario's opening step is never one, so a leading tap step stays the
opening card (read keeps its intro card).

- tourDeck: `TourDeckEntry` gains `entryStepIndexes`; consecutive entry steps
  attach to the following card in order, trailing ones are dropped loudly;
  `resolveDeckProgress` still counts cards only
- model: `onboardingEntryStepIndexAtom` + `advanceEntryTransition`; start/next
  seed the phase on the landed card, prev/skip/end cancel it. The skip flow
  moves to `model/skip.ts` and the deck resolver to `lib/resolveDeck.ts`
  (model/tour.ts stays within the file-size limit)
- playback: `useTourPhase` resolves the card or its entry/exit step;
  `useTourEntryStep` blinks each entry (hold-for-rect + route navigation) and
  advances the phase, landing on the card. A step whose screen is already
  reached is skipped instantly (no blink, no navigation); «Назад» lands on the
  previous card and never replays the phase
- start: a card entered through entry transitions is its own lead-up target,
  so a global scenario started on the card's screen skips the intro and lands
  on it (resolveTourStart)
- tests: deck attachment/counter, entry-step shape (opening card excluded),
  forward blink-then-land, instant skip on the reached screen, prev-no-replay,
  and the model wiring

Signed-off-by: egoreast <egor.east@yandex.ru>
The share scenario no longer declares `screens`, so it is offered from the
«Глобальные» group of every picker (including «Ещё» and «Слушать») instead of
only the /more and /share screen groups.

- turn the «Ещё» tab and «Поделиться приложением» row steps into two entry
  transitions (tapTargetId + route, no targetId): they play only when the tour
  starts from a foreign screen. From «Ещё» the tab blink auto-skips (already
  there); from «Поделиться приложением» the whole lead-up skips and the tour
  starts on the QR card («1 из 3»)
- deck: intro card, QR card, copy card, site card (4 counted) + 2 entry
  transitions folded onto the QR card
- tests: share global in every picker and absent from all screen groups; the
  two lead-up steps fold onto the QR card as entry transitions; resume from
  /listen (full), /more (tab auto-skips) and /share (starts on the QR card)
- docs: onboarding.md share row + entry-transitions section, more.md and
  share.md notes

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
fix(onboarding): visualize the More tab tap in the backup tour
All checks were successful
CI / dco (pull_request) Successful in 9s
CI / checks (pull_request) Successful in 6m58s
95534b54fe
Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
fix(search): visualize search taps and present the picker step on top
All checks were successful
CI / dco (pull_request) Successful in 9s
CI / checks (pull_request) Successful in 7m6s
f2008e36b7
Signed-off-by: egoreast <egor.east@yandex.ru>
Global tours started from a nested screen without a tab bar (History,
Offline, …) could not visualize a tab: the tab target was never registered
there, so the visualization was lost.

Extend entry transitions with a pure-navigation variant: a step with
`route` but no `tapTargetId` navigates without blinking (no hold, no
blink), stays non-counted, and is still auto-skipped when `pathname`
already matches its route.

Data: add a leading return entry before the tab card in the three global
scenarios whose first card targets a tab — `search` (`/listen`), `share`
and `backup` (`/more`). From a nested screen the tour returns to the tab
screen first; the tab card then spotlights the (now registered) tab.
`share` and `backup` tab steps become cards (`targetId: 'tab.more'`) so
the return lands on a real visualization. Starting on the tab screen
resumes on the tab card (intro skipped, return entry auto-skipped).

Update deck/scenario/resume tests and the entry-transition docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
- Make the row cache item a single toggle card ("Добавить в офлайн" <->
  "Удалить из офлайна") and drop the separate row removal card.
- Keep the tour on the playlist screen (its tab bar is visible) and blink
  the "Ещё" tab as an entry transition before navigating to /more.
- Drop the /listen return step; the deck is now 5 cards (8 raw steps).
- Update the scenario table and test notes in docs/features/onboarding.md.

Signed-off-by: egoreast <egor.east@yandex.ru>
- Add `globalFallback?: boolean` to OnboardingScenario: a screen-bound
  scenario is offered in the "Глобальные" group on screens it does not name.
- backup keeps `screens: ['/more', '/settings']`, share `['/more', '/share']`,
  both with `globalFallback: true`: local on "Ещё"/"Настройки"/"Поделиться",
  global everywhere else (as before).
- ScenarioPickerModal groups by screens + globalFallback; screen-bound
  scenarios without the flag stay hidden on foreign screens (playlist tours).
- Player picker keeps offering globalFallback scenarios route-agnostically.
- Extract the OnboardingScenarioId union into lib/scenarioId.ts to keep
  scenarios.ts under the 130-line limit.
- Update the grouping matrix tests and docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
- Add optional step field `cardPosition?: 'bottom'` (valid with presentOnTop).
- TourSpotlight anchors such a card at the screen bottom
  (bottom = insets.bottom + INDENTS.medium) instead of the target rect, so
  the highlighted rows of the SermonPlaylistPicker modal stay visible.
- The search tour's "Выберите плейлист" step sets cardPosition: 'bottom'.
- Cover the bottom anchor in TourSpotlight.test and the scenario shape in
  scenarios.test; document the field in docs/features/onboarding.md.

Signed-off-by: egoreast <egor.east@yandex.ru>
The backup intro card carried route '/listen', so the tour skipped it when
started on the scenario's own screens, and the «Ещё» tab was a spotlight
card instead of a blink. Make the intro routeless, fold the tab into a
single entry transition (blink + navigation) on the «Настройки» card, and
drop the now-redundant pure-navigation return.

A tour started on a scenario's first screen now always plays from the
opening routeless intro card: resolveScenarioEntryOffset returns a card
entered through entry transitions as-is only when the tour resumes
mid-path, not on the first screen.

Update the backup shape/deck/resume tests and the entry-navigation tests.

Signed-off-by: egoreast <egor.east@yandex.ru>
The «Слушать» and «Ещё» tab steps were spotlight cards, contradicting the
authoring rule that tab navigation is a blink visualization. Turn both into
entry transitions (tapTargetId without targetId): the tab blinks and the
tour navigates, and the card counts drop by one in each scenario.

Move the tap explanation into the preceding intro card and let the item
cards simply name the action they open (history/offline/settings keep their
combined first-nav cards that spotlight the item). Rename the welcome
«Экран «Ещё»» card to «Меню «Ещё»» so no step titled «Экран «Ещё/Слушать»»
remains a spotlight card.

Update the deck/shape/resume tests, the overlay/entry-navigation deck
indices, and the onboarding docs (scenario rows and the authoring rule).

Signed-off-by: egoreast <egor.east@yandex.ru>
Spell out that a tour starts with a plain description card (no
route/tapTargetId), that navigation transitions (tab-bar return, tab
blink) are non-counted entry transitions after it, and that visualizations
attach as exit/entry transitions and never count as steps.

Signed-off-by: egoreast <egor.east@yandex.ru>
The search tour was route-less, so the picker always offered it under
«Глобальные». Give it `screens: ['/listen']` plus `globalFallback: true`:
on «Слушать» it now sits in «На этом экране», on every other screen it
stays in «Глобальные» (still startable there with its lead-up).

Extract the picker's grouping predicates into a pure
`lib/scenarioGrouping.ts` and cover them with a co-located test — the flat
row order on /listen is identical before and after, so the pure test is
what actually pins the grouping.

Update the scenario shape/resume tests and the onboarding docs
(grouping description, scenario matrix row, search resume wording).

Signed-off-by: egoreast <egor.east@yandex.ru>
The «Выберите плейлист» step already spotlights above the picker modal
(presentOnTop), but the dialog itself stayed under the dim. Give the step
areaTargetIds: ['search.picker-modal'] so the spotlight cuts a hole under
the picker window and marks it with a translucent fill.

SermonPlaylistPicker gains a generic containerWrapper around its dialog;
useSermonPlayback bakes it into the modal element and SearchGroupedResults
forwards it, so ListenScreen (which owns both the picker and the tour)
wraps the dialog in the OnboardingTarget target. The feature keeps its
dependency inversion — it never imports features/onboarding.

Split ListenScreen's search header into ListenSearchHeader and the results
styles into a module to stay within the line limit.

Cover the picker DI, the wrapper forwarding, the spotlight hole/fill and
the scenario shape; update the onboarding docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
The search lead-up carried a pure-navigation return entry before the tab
entry. The return reached /listen first, so the tab entry's route was
already satisfied and it auto-skipped without ever blinking — the tap
circle never rendered from any screen.

Drop the return entry and let the tab entry navigate on its own, matching
backup: from a foreign screen it holds for the rect, blinks the tab, then
navigates to /listen; on /listen it auto-skips. Cover both in the overlay
(a TapIndicator modal then navigation / no tab phase) and the entry-hook
tests, and keep the pure-navigation variant covered by a dedicated
scenario.

Update the scenario shape/deck tests and the onboarding docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
Rework the search scenario into the user's sequence: intro card → «Слушать»
tab entry blink → «Кнопка поиска» card → search-open exit (which now also types
the demo query) → «Группы результатов» → «Включить проповедь» card →
first-sermon exit blink → «Выберите плейлист» → «Меню проповеди» (closes the
picker on enter, spotlights the row's ⋯ trigger). 9 raw steps, 6 cards.

Fix the invisible blinks: a card → hint handoff unmounted the card's native
Modal and mounted the tap Modal in one commit, so the new presentation was
dropped. Render the hint inside the same TourSpotlight Modal (content swap)
instead of a second one — the native window stays presented. Delete TourTapLayer.

Thread the page-owned menu-button wrapper down to the first sermon row's ⋯
trigger (SearchGroupedResults → SearchSermonGroup → SearchResultsRow →
SermonSearchRow → TracksListItem → TracksListItemContent), keeping the entity
onboarding-agnostic. Expose closePicker from useSermonPlayback and register it
as close-sermon-playlist-picker on ListenScreen.

Decompose files pushed past 130 lines: useTrackListItemMenu, TourSpotlight.styles,
ListenScreen.styles.

Signed-off-by: egoreast <egor.east@yandex.ru>
Rename the scenario «Плейлисты» → «Мои плейлисты» (avoid confusion with server
playlists). The first card now visualizes a tap on the section title and opens
the full list; its text explains that the title tap — not a «Все» button —
opens the list.

Add a generic `renderTitleWrapper` prop to the shared Slider so a page can wrap
the rendered section title without the shared layer importing onboarding.
MyPlaylistsSlider threads `titleOnboardingTargetId` into it and ListenScreen
passes `listen.my-playlists-title`. Extract the slider item builders into
myPlaylistsSliderItems to keep the component under the line limit.

Signed-off-by: egoreast <egor.east@yandex.ru>
Document the reworked search tour (intro → tab blink → «Кнопка поиска» →
search-open with the demo query → results → «Включить проповедь» →
first-sermon blink → picker → «Меню проповеди»), the close-picker action and
the first-sermon-menu target, and the playlists rename with the title target.
Note that the tap hint now shares the spotlight Modal (TourTapLayer removed).
Update listen/search-results/more/architecture to match.

Signed-off-by: egoreast <egor.east@yandex.ru>
A target that leaves the surface (a closed dropdown, a swapped row) kept its
rect in onboardingTargetRectsAtom. The skipIfMissing instant-skip reads any
registered rect as proof the surface rendered, so a stale rect made a card
whose target had not measured yet drop instantly. registerOnboardingTargetRect
now accepts a null rect and deletes the key; useTargetMeasure releases its
target's rect on unmount.

Signed-off-by: egoreast <egor.east@yandex.ru>
The row-menu cache item is a toggle: the add card now names the swap to
«Удалить из офлайна», and a separate skipIfMissing card covers the cached
sermon whose row menu shows the removal item instead.

Signed-off-by: egoreast <egor.east@yandex.ru>
The tour is offered on «Ещё», so the intro's navigation talk is stale: the intro
card and the item card become one first step that points at the «Офлайн» row.
The wait hint is now per-condition: the passive offlineLoaded wait reads
«Загружаем офлайн-кэш…» instead of asking for an action.

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): merge the settings intro and split the theme step
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 7m20s
fec395c34b
The settings tour now opens on a single lead-up card on «Ещё» that merges the old
intro and the «Настройки» tap, so starting from /settings pre-skips just that one
card (skippedDeckIndexes [0], «1 из 6»). The «Оформление» card keeps only the theme
text, and a new «Динамические цвета» step spotlights settings.dynamic-colors
(skipIfMissing — the row exists only on Android 12+).

Signed-off-by: egoreast <egor.east@yandex.ru>
feat(onboarding): same-screen starts skip the lead-up including the intro
All checks were successful
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Successful in 7m5s
6da8803290
Starting a tour on one of its own screens now skips the whole lead-up — the
routeless intro card and the tab entries — so the first shown card is the
screen's first card and the counter reads «1 из N». resolveSameScreenEntryOffset
finds the first deck entry reached from the pathname (its effective route or one
of its entry transitions) without rewinding over the intro; resolveScenarioEntryOffset
keeps the rewind for global and foreign-screen starts, which still play the full
tour from card 0. settings from /more now starts on the «Настройки» card,
search from /listen on «Кнопка поиска», share from /more on share.qr, backup
from /more on «Настройки»; backup from /history keeps the full deck with the intro.

Signed-off-by: egoreast <egor.east@yandex.ru>
docs(agents): same-screen tour starts skip the lead-up
All checks were successful
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Successful in 6m50s
486fc6cb7c
Add a binding bullet to AGENTS.md rule 6: starting a tour on one of its own
screens skips the lead-up (intro card and tab entries), the first shown step is
the screen's first card and the counter reads «Шаг 1 из N»; the intro text stays
in the data for starts from foreign screens. Mirror the wording in the onboarding
resume section.

Signed-off-by: egoreast <egor.east@yandex.ru>
Split the search tour's «Кнопка поиска» exits: `open-listen-search` now only
opens the overlay, and a new `type-search-query` exit types the full demo word
«лицемерие» prefix by prefix (~100ms each, ~700ms total, under the 1000ms
advance) into `searchQueryAtom`. Previously typing was folded into the open and
got cancelled after the first letter.

Restore the «Вводим запрос» step in the search scenario between the search-open
exit and the «Группы результатов» card, update the deck/scenario tests, add an
overlay test proving the exits play in order (open then type) before advancing,
and refresh the onboarding/listen/architecture docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
Signed-off-by: egoreast <egor.east@yandex.ru>
feat(search): show the typing card while the query types
All checks were successful
CI / dco (pull_request) Successful in 6s
CI / checks (pull_request) Successful in 7m7s
14417bdbee
The «Вводим запрос» step becomes an interactive card with an on-enter
action instead of an exit: the pass-through card floats over the live
search UI while type-search-query types the demo query into the visible
field, and the user presses «Далее» to reach the «Группы результатов»
card — no auto-advance.

Update the scenario shape and deck tests (the typing step is now its own
card), the overlay behavior test (typing runs in parallel with the card,
advance only on «Далее», enter action fires once), and the onboarding docs.

Signed-off-by: egoreast <egor.east@yandex.ru>
Starting the «Резервное копирование» tour from the «Ещё» screen now lands on a new
screen-local intro card explaining that tapping «Настройки» makes the backup,
instead of the bare «Настройки» spotlight card. The card is routeless and inherits
«/more» from the tab entry above it, so a same-screen start from «Ещё» opens it
(deckIndex 1, skippedDeckIndexes [0]); starts from foreign screens keep the full
tour from step 0. A start from «Настройки» now skips the foreign intro, the tab
entry and this intro card, landing on the backup section (deckIndex 3,
skippedDeckIndexes [0, 1, 2]).

docs/features/onboarding.md updated: the «Старт тура» example chain, the backup
scenarios-table row (new card + 8 cards + 1 tab transition) and the multi-screen
authoring section, plus the scenarios.test.ts description.

Signed-off-by: egoreast <egor.east@yandex.ru>
docs(more): correct backup and share tour description on «Ещё» screen
All checks were successful
CI / dco (pull_request) Successful in 6s
CI / checks (pull_request) Successful in 7m21s
512696e17a
The previous text wrongly called `backup` a screen-less global tour and misdescribed the
`share` resume point; now mirrors docs/features/onboarding.md (screen-local intro card
«Резервная копия», share resumes on `share.qr` with the `more.share-item` entry
transition). Follow-up to commit f484a0a per review finding.

Signed-off-by: egoreast <egor.east@yandex.ru>
EgorEast changed title from feat/onboarding-help to WIP: feat/onboarding-help 2026-10-16 07:49:26 +00:00
fix(onboarding): open playlists tour with section card before title tap
All checks were successful
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Successful in 7m8s
b1acdadfae
first card spotlights the section on /listen; the header tap is now an
entry transition into the create card

Signed-off-by: egoreast <egor.east@yandex.ru>
a clipped below-fold view never registers a window rect, so the tour now
measures it relative to the scroll container and centres it once per activation

Signed-off-by: egoreast <egor.east@yandex.ru>
chore: remove ocx config
Some checks failed
CI / dco (pull_request) Successful in 5s
CI / checks (pull_request) Has been cancelled
5b0091b2ad
Signed-off-by: egoreast <egor.east@yandex.ru>
fix(onboarding): re-measure targets after tour scrolls
All checks were successful
CI / dco (pull_request) Successful in 6s
CI / checks (pull_request) Successful in 7m1s
21ac6a1a4d
non-active targets measured once at tour start; a clipped target below the
fold never registered a rect, so the next entry transition navigated without
its tap hint. Tour scrolls now bump a scroll epoch (+700 ms, after the
animation settles) and non-active targets re-measure on it.

Signed-off-by: egoreast <egor.east@yandex.ru>
The share tour previously used a pure-navigation return transition to /more
before the tab entry; it reached the tab route itself, so the tab entry
auto-skipped and the «Ещё» tab tap was never visualized. Drop the return
transition: the tab entry now navigates and blinks from any screen.

Add a routeless screen-local intro card after the tab entry (mirrors the backup
scenario): a same-screen start from «Ещё» lands on a card explaining the
«Поделиться приложением» tap instead of the foreign intro, then the
more.share-item entry blinks and opens /share.

Deck: 5 cards + 2 entry transitions; resume from /more → deck 1 (skipped [0],
«1 of 4»), from /share → deck 2 (skipped [0,1], «1 of 3»).

Update scenario/entry tests and the onboarding docs to match.

Signed-off-by: egoreast <egor.east@yandex.ru>
refactor(onboarding): drop inert entry-step texts and isolate the share return-entry test
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 7m18s
e82d460a5e
- Entry transitions never render a card, and OnboardingStep types text/title as optional
  card content ("they carry neither"), so the share scenario's tab.more and
  more.share-item entry steps drop their inert texts.
- The synthetic returnScenario test resolves the deck via scenariosById[scenario.id]
  on advance; swap it into the registry in beforeEach/afterEach (same pattern as the
  entry-transitions describe) instead of relying on the real share deck coincidentally
  matching.

Signed-off-by: egoreast <egor.east@yandex.ru>
chore: bump Expo SDK 57 patch versions, regenerate expo-router patch
All checks were successful
CI / dco (pull_request) Successful in 7s
CI / checks (pull_request) Successful in 9m2s
3f59812b99
Bump Expo SDK 57 packages to latest patch releases: expo ~57.0.30,
expo-asset ~57.0.20, expo-constants ~57.0.22, expo-crypto ~57.0.4 (^ -> ~),
expo-linking ~57.0.13, expo-notifications ~57.0.23, expo-router ~57.0.28,
expo-sharing ~57.0.23 (^ -> ~) with its plugin registered in app.config.ts,
expo-splash-screen ~57.0.10, jest-expo ~57.0.6.

Regenerate patches/expo-router+57.0.28.patch: content is byte-identical to
the 57.0.25 one (upstream useLinking.native.js is unchanged between the two
versions, bug not fixed upstream - patch stays until Expo SDK 58, see
docs/debt.md).

Verified: all 4 patches apply cleanly on a fresh install (no version-mismatch
warnings), yarn check:patches green, jest green (310 suites / 2664 tests).

Docs: update patch filename references, add 57.0.28 re-validation note, fix
stale warning stack line (useLinking.native.js 129 -> 127). Sync .omc
project memory patch listing.

Signed-off-by: egoreast <egor.east@yandex.ru>
EgorEast changed title from WIP: feat/onboarding-help to feat/onboarding-help 2026-10-16 16:21:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Slovo_Propovedi/slovo-propovedi-mobile!127
No description provided.