WellNuo/.scheme/wellnuo-web-prototypes.json
Sergei 8af7a11cd9 Fix WiFi credentials cache implementation in SecureStore
- Fix saveWiFiPassword to use encrypted passwords map instead of decrypted
- Fix getWiFiPassword to decrypt from encrypted storage
- Fix test expectations for migration and encryption functions
- Remove unused error variables to fix linting warnings
- All 27 tests now passing with proper encryption/decryption flow

The WiFi credentials cache feature was already implemented but had bugs
where encrypted and decrypted password maps were being mixed. This commit
ensures proper encryption is maintained throughout the storage lifecycle.
2026-01-31 15:55:24 -08:00

180 lines
42 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"_schemeog": {
"schema_id": "cml2yvpx7000tllp7rtd5mzka",
"name": "WellNuo Web - ASCII Prototypes",
"description": "Прототипы экранов веб-версии WellNuo для работы с BLE-сенсорами с десктопа",
"synced_at": "2026-01-31T23:55:00.000Z"
},
"elements": [
{
"id": "browser-check",
"type": "card",
"title": "🌐 Browser Check",
"color": "light_yellow",
"borderColor": "orange",
"tags": ["entry"],
"description": "Entry point — проверка поддержки Web Bluetooth",
"connections": [
{"to": "unsupported", "label": "❌ Safari/Firefox"},
{"to": "login", "label": "✅ Chrome/Edge"}
]
},
{
"id": "unsupported",
"type": "ascii",
"title": "Unsupported Browser",
"borderColor": "red",
"tags": ["error"],
"asciiContent": "┌────────────────────────────────────────────┐\n│ │\n│ ⚠️ Браузер не поддерживается │\n│ │\n│ Для работы с Bluetooth-сенсорами │\n│ используйте: │\n│ │\n│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │\n│ │ Chrome │ │ Edge │ │ Opera │ │\n│ │ [Скачать]│ │ [Скачать]│ │ [Скачать]│ │\n│ └──────────┘ └──────────┘ └──────────┘ │\n│ │\n│ ─────────── или ─────────── │\n│ │\n│ Мобильное приложение: │\n│ ┌────────────┐ ┌────────────┐ │\n│ │ App Store │ │Google Play │ │\n│ └────────────┘ └────────────┘ │\n│ │\n└────────────────────────────────────────────┘"
},
{
"id": "login",
"type": "ascii",
"title": "Login",
"borderColor": "blue",
"tags": ["auth"],
"asciiContent": "┌────────────────────────────────────────────┐\n│ │\n│ WellNuo │\n│ │\n│ Вход в систему │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ 📧 Email │ │\n│ └──────────────────────────────────────┘ │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ Получить код │ │\n│ └──────────────────────────────────────┘ │\n│ │\n│ │\n│ Нет аккаунта? Скачайте приложение │\n│ │\n└────────────────────────────────────────────┘",
"connections": [{"to": "verify-otp", "label": "send OTP"}]
},
{
"id": "verify-otp",
"type": "ascii",
"title": "Verify OTP",
"borderColor": "blue",
"tags": ["auth"],
"asciiContent": "┌────────────────────────────────────────────┐\n│ ← Назад │\n├────────────────────────────────────────────┤\n│ │\n│ Введите код из письма │\n│ │\n│ ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │\n│ │ _ │ │ _ │ │ _ │ │ _ │ │ _ │ │ _ │ │\n│ └───┘ └───┘ └───┘ └───┘ └───┘ └───┘ │\n│ │\n│ Отправить повторно (59 сек) │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ Подтвердить │ │\n│ └──────────────────────────────────────┘ │\n│ │\n└────────────────────────────────────────────┘",
"connections": [
{"to": "enter-name", "label": "new user"},
{"to": "dashboard", "label": "existing"}
]
},
{
"id": "enter-name",
"type": "ascii",
"title": "Enter Name",
"borderColor": "blue",
"tags": ["auth"],
"asciiContent": "┌────────────────────────────────────────────┐\n│ │\n│ Как вас зовут? │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ Имя │ │\n│ └──────────────────────────────────────┘ │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ Фамилия │ │\n│ └──────────────────────────────────────┘ │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ Продолжить │ │\n│ └──────────────────────────────────────┘ │\n│ │\n└────────────────────────────────────────────┘",
"connections": [{"to": "add-beneficiary", "label": "next"}]
},
{
"id": "add-beneficiary",
"type": "ascii",
"title": "Add Loved One",
"borderColor": "blue",
"tags": ["auth"],
"asciiContent": "┌────────────────────────────────────────────┐\n│ ← Назад │\n├────────────────────────────────────────────┤\n│ │\n│ Добавьте близкого человека │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ Имя │ │\n│ └──────────────────────────────────────┘ │\n│ │\n│ Отношение: │\n│ ┌────────┐ ┌────────┐ ┌────────┐ │\n│ │ Мама │ │ Папа │ │ Другое │ │\n│ └────────┘ └────────┘ └────────┘ │\n│ │\n│ ┌──────────────────────────────────────┐ │\n│ │ Добавить │ │\n│ └──────────────────────────────────────┘ │\n│ │\n└────────────────────────────────────────────┘",
"connections": [{"to": "dashboard", "label": "success"}]
},
{
"id": "dashboard",
"type": "ascii",
"title": "Dashboard",
"borderColor": "green",
"tags": ["main"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ WellNuo [👤 Profile] │\n├─────────────────────────────────────────────────────┤\n│ │\n│ Добро пожаловать, John! │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 👵 Мама │ │\n│ │ ───────────────────────────────────────── │ │\n│ │ Сенсоры: 3 активных │ │\n│ │ Последняя активность: 5 мин назад │ │\n│ │ │ │\n│ │ [Открыть] [Настройки] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 👴 Папа │ │\n│ │ ───────────────────────────────────────── │ │\n│ │ Сенсоры: 2 активных │ │\n│ │ │ │\n│ │ [Открыть] [Настройки] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ + Добавить близкого │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘",
"connections": [
{"to": "beneficiary-detail", "label": "открыть"},
{"to": "profile", "label": "profile"}
]
},
{
"id": "beneficiary-detail",
"type": "ascii",
"title": "Beneficiary Detail",
"borderColor": "green",
"tags": ["main"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ ← Dashboard 👵 Мама │\n├─────────────────────────────────────────────────────┤\n│ │\n│ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ │\n│ │ Обзор │ │Сенсоры │ │История │ │Настрой.│ │\n│ └────────┘ └────────┘ └────────┘ └────────┘ │\n│ │\n│ ══════════════════════════════════════════════ │\n│ │\n│ Сенсоры (3) [+ Добавить] │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🟢 WP_523_81A14C │ │\n│ │ Кухня • Онлайн • 2 мин назад │ │\n│ │ [Настройки] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🟡 WP_524_92B25D │ │\n│ │ Спальня • Онлайн • 15 мин назад │ │\n│ │ [Настройки] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🔴 WP_525_A3C36E │ │\n│ │ Гостиная • Оффлайн • 2 часа │ │\n│ │ [Настройки] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘",
"connections": [
{"to": "add-sensor", "label": "+ добавить"},
{"to": "device-settings", "label": "настройки"}
]
},
{
"id": "add-sensor",
"type": "ascii",
"title": "Add Sensor (BLE Scan)",
"borderColor": "purple",
"tags": ["ble"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ ← Назад Добавить сенсор │\n├─────────────────────────────────────────────────────┤\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 1. Включите сенсор (зажмите 3 сек) │ │\n│ │ 2. Убедитесь что Bluetooth включён │ │\n│ │ 3. Нажмите \"Начать поиск\" │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🔍 Начать поиск │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ Найденные устройства: │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 📶 WP_526_B4D47F ████░░ -65dBm │ │\n│ │ [Подключить] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 📶 WP_527_C5E58G ██░░░░ -78dBm │ │\n│ │ [Подключить] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘",
"connections": [{"to": "setup-wifi", "label": "подключить"}]
},
{
"id": "setup-wifi",
"type": "ascii",
"title": "WiFi Setup",
"borderColor": "purple",
"tags": ["ble"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ ← Назад Настройка WiFi │\n├─────────────────────────────────────────────────────┤\n│ │\n│ Подключено к: WP_526_B4D47F │\n│ │\n│ Шаг 2 из 4: Настройка WiFi │\n│ ████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 50% │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ Доступные сети: │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 📶 Home_WiFi_5G ████░░ -45dBm │ │\n│ │ 🔒 Защищённая [Выбрать] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 📶 Home_WiFi ███░░░ -58dBm │ │\n│ │ 🔒 Защищённая [Выбрать] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ Или введите вручную: │\n│ │\n│ ┌─────────────────────────────────────────────┐ │\n│ │ Название сети (SSID) │ │\n│ └─────────────────────────────────────────────┘ │\n│ │\n│ ┌─────────────────────────────────────────────┐ │\n│ │ Пароль 👁️ │ │\n│ └─────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Подключить сенсор │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘",
"connections": [{"to": "setup-success", "label": "success"}]
},
{
"id": "setup-success",
"type": "ascii",
"title": "Setup Success",
"borderColor": "green",
"tags": ["ble"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ │\n│ │\n│ ✅ │\n│ │\n│ Сенсор успешно добавлен! │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ WP_526_B4D47F │ │\n│ │ ───────────────────────────────────────── │ │\n│ │ WiFi: Home_WiFi_5G │ │\n│ │ Статус: Онлайн │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ Укажите местоположение: │\n│ │\n│ ┌─────────────────────────────────────────────┐ │\n│ │ Например: Кухня, Спальня, Гостиная │ │\n│ └─────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Готово │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘",
"connections": [{"to": "beneficiary-detail", "label": "готово"}]
},
{
"id": "device-settings",
"type": "ascii",
"title": "Device Settings",
"borderColor": "orange",
"tags": ["settings"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ ← Назад Настройки сенсора │\n├─────────────────────────────────────────────────────┤\n│ │\n│ WP_523_81A14C │\n│ 🟢 Онлайн │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ Местоположение │\n│ ┌─────────────────────────────────────────────┐ │\n│ │ Кухня │ │\n│ └─────────────────────────────────────────────┘ │\n│ │\n│ Описание │\n│ ┌─────────────────────────────────────────────┐ │\n│ │ Возле холодильника │ │\n│ └─────────────────────────────────────────────┘ │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🔄 Изменить WiFi │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🗑️ Удалить сенсор │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘",
"connections": [{"to": "setup-wifi", "label": "изменить WiFi"}]
},
{
"id": "profile",
"type": "ascii",
"title": "Profile",
"borderColor": "orange",
"tags": ["settings"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ ← Dashboard Профиль │\n├─────────────────────────────────────────────────────┤\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 👤 │ │\n│ │ John Doe │ │\n│ │ john@example.com │ │\n│ │ [Изменить] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ Настройки │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🌙 Тёмная тема [OFF] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🔔 Уведомления [ON] │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Выйти │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘",
"connections": [{"to": "login", "label": "logout"}]
},
{
"id": "error-ble-disabled",
"type": "ascii",
"title": "Error: BLE Disabled",
"borderColor": "red",
"tags": ["error"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ │\n│ ⚠️ │\n│ │\n│ Bluetooth выключен │\n│ │\n│ Для поиска сенсоров необходимо │\n│ включить Bluetooth на вашем компьютере. │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ Windows: Настройки → Bluetooth │\n│ macOS: Системные настройки → Bluetooth │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Попробовать снова │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘"
},
{
"id": "error-ble-permission",
"type": "ascii",
"title": "Error: BLE Permission",
"borderColor": "red",
"tags": ["error"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ │\n│ 🔒 │\n│ │\n│ Доступ к Bluetooth запрещён │\n│ │\n│ Браузер запросил разрешение на доступ │\n│ к Bluetooth, но оно было отклонено. │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ Как исправить: │\n│ 1. Нажмите 🔒 в адресной строке │\n│ 2. Найдите \"Bluetooth\" │\n│ 3. Выберите \"Разрешить\" │\n│ 4. Обновите страницу │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Попробовать снова │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘"
},
{
"id": "error-connection-lost",
"type": "ascii",
"title": "Error: Connection Lost",
"borderColor": "red",
"tags": ["error"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ │\n│ 📡 │\n│ │\n│ Соединение с сенсором потеряно │\n│ │\n│ Возможные причины: │\n│ • Сенсор слишком далеко │\n│ • Сенсор выключился │\n│ • Помехи Bluetooth │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ 🔄 Переподключиться │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Отменить │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘"
},
{
"id": "error-wifi",
"type": "ascii",
"title": "Error: WiFi Failed",
"borderColor": "red",
"tags": ["error"],
"asciiContent": "┌─────────────────────────────────────────────────────┐\n│ │\n│ 📶 │\n│ │\n│ Не удалось подключить сенсор к WiFi │\n│ │\n│ Возможные причины: │\n│ • Неверный пароль │\n│ • Сеть недоступна │\n│ • Слабый сигнал WiFi │\n│ │\n│ ───────────────────────────────────────────────── │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Попробовать снова │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Выбрать другую сеть │ │\n│ └───────────────────────────────────────────────┘ │\n│ │\n└─────────────────────────────────────────────────────┘"
}
],
"tagsDictionary": [
{"id": "tag-entry", "name": "entry", "color": "#FFC107"},
{"id": "tag-auth", "name": "auth", "color": "#2196F3"},
{"id": "tag-main", "name": "main", "color": "#4CAF50"},
{"id": "tag-ble", "name": "ble", "color": "#9C27B0"},
{"id": "tag-settings", "name": "settings", "color": "#FF9800"},
{"id": "tag-error", "name": "error", "color": "#F44336"}
]
}