Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Location: `src/Trale/miniapp-src/src/`. The test greps the base file name (e.g.
| `AdminSystemScreen.tsx` | `admin-system` (owner only) | Under «Ещё»: the background job queue and translations of the last day, test pushes to oneself, the older one-off broadcast by segment. |
| `VerbReviewScreen.tsx` | `verb-review` (owner only; `?screen=verb-review[&verb=<lemma>]`) | Review of the verbs a model wrote. Anyone the server refuses sees «Нет доступа.» and nothing else. Queue: what needs attention first (unverified tenses → tenses verified but the verb not approved → approved), counts, filters «ждут / непроверенные времена / проверены / все», search in Russian or Georgian. One verb per screen: Russian meaning, lemma with Cyrillic, who asked and when, «Заметки моделей» folded; every tense a block — verified ones folded to a line, unverified ones open with six forms, transcription, the Russian phrase and «есть / нет в текстах» — with «Подтвердить», «Исправить» (inline, six fields) and «Убрать время»; the block updates in place and the result stays at the bottom of the screen. «← Предыдущий / N из M / Следующий глагол →» walk the batch. «Вставить исправление» (`components/admin/VerbFixPaste.tsx`, `verbFix.ts`): the whole review of the verb as one pasted text — lines «глагол: <lemma>», «<tense as named on the screen or its key>: six forms» («—» for an empty cell), «подтвердить: <tenses>», «глагол проверен»; it shows what changes (old → new form) and refuses a fix for another verb, an unknown tense, a wrong number of forms or an approval with tenses left unverified; «Применить» sends the edits, then the confirmations, then the approval, by the same requests as the buttons, and stops at the first refusal. «Глагол проверен» (or «Подтвердить всё и отметить проверенным» with a confirmation), «Снять отметку», «Пересобрать» (asks first for an approved verb). `components/admin/TenseBlock.tsx`, `components/admin/verbReview.ts`. |
| `AdminUserScreen.tsx` | `admin-user` (owner only; `?screen=admin-user&id=<telegram id>`) | A person's card: when and where from they came (`AcquisitionSource` in words), access and until when, last study, whether the bot reaches them; lessons, words, quizzes, verb sessions; payments; answers in surveys; «Написать» → the conversation (the owner may write first); grant / revoke a subscription with a confirmation. |
| `AdminBroadcastScreen.tsx` | `admin-broadcast` (owner only; `&key=<campaign>` opens an existing one) | One broadcast. A new one goes by steps, each on its own screen: text → button and where it leads (chosen by the name of a mini-app screen, or an own address) → gift of access days → audience, test group or everyone, optional own name → sending: «Отправить себе» (a trial to the owner only), pick recipients (asks first), «Отправить следующие 25» (closed until recipients are picked; asks first, names the gift). The server names the campaign (`broadcast-<yyyy>-<MM>`). An opened one starts on its sending: the rest of the group, or «Дослать ещё одной группе» — the same campaign, so nobody gets the message or the gift twice, and the screen says so. The flow is a focused mode: no tab bar, «шаг N из 5» and «Закрыть» in the header (asks before closing something unfinished), «Назад / Дальше» pinned to the bottom. Until recipients are picked the unfinished broadcast is saved on the device (`localStorage`, `admin/useKept.ts`) and offered again from the list. The sending step also has «Или назначь время — уйдёт само»: a day, an hour and a time zone (Тбилиси by default; Москва, Берлин, Лондон, UTC) and «Запланировать» — no recipients are picked, the server sends it at that moment to whoever is in the group then (`admin/schedule.ts` turns the wall clock of the zone into UTC). A scheduled broadcast shows «Запланирована на …» with «Отменить расписание» and nothing to pick or send by hand. A pasted broadcast takes the lines `когда: 28.11.2026 12:00` and `пояс: Тбилиси`. |
| `AdminBroadcastScreen.tsx` | `admin-broadcast` (owner only; `&key=<campaign>` opens an existing one) | One broadcast. A new one goes by steps, each on its own screen: text → button and where it leads (chosen by the name of a mini-app screen, or an own address) → gift of access days → audience, test group or everyone, optional own name → sending: «Сначала отправить себе» (a trial to the owner only), then one choice «Сейчас / Позже» and one main button. «Сейчас»: «Отправить всем — N чел.» (or «Отправить пробной группе — N чел.») asks once with the head count, the text and the gift, writes down the recipients and hands the sending to the server (`send-all`) — the mini-app can be closed, the bot reports when it is done. «Позже»: a day, an hour and a time zone (Тбилиси by default; Москва, Берлин, Лондон, UTC) and «Запланировать на …» — no recipients are picked, the server sends it at that moment to whoever is in the group then (`admin/schedule.ts` turns the wall clock of the zone into UTC). A broadcast pasted as one text opens right on this step with everything filled, so it takes one button; a pasted time selects «Позже». The server names the campaign (`broadcast-<yyyy>-<MM>`). An opened one starts on its sending: «Отправить — ждут N чел.» if recipients are written down but not sent to (stopped, or the sending did not start), otherwise «Отправить остальным из группы» or «Дослать ещё одной группе» — the same campaign, so nobody gets the message or the gift twice, and the screen says so. The flow is a focused mode: no tab bar, «шаг N из 5» and «Закрыть» in the header (asks before closing something unfinished), «Назад / Дальше» pinned to the bottom. Until it is sent or scheduled the unfinished broadcast is saved on the device (`localStorage`, `admin/useKept.ts`) and offered again from the list. A scheduled broadcast shows «Запланирована на …» with «Отменить расписание» and nothing to pick or send by hand. A pasted broadcast takes the lines `когда: 28.11.2026 12:00` and `пояс: Тбилиси`. |
| `SurveyBuilderScreen.tsx` | `admin-survey` (owner only) | Survey builder, four steps on separate screens with «Назад / Дальше». A survey is a form: the first question goes to the bot as buttons, the rest are answered in the mini-app. A survey may carry a gift of access days for answering: then the message has one button, every question — the first too — is in the mini-app, and the gift is given after the last question to whoever answered at least one. 1 «Выбери опрос» — ready-made forms (`SurveyPresets`: «Тем, кто пользуется», «Тем, кто перестал», «Тем, кто платил») and «Собрать свой»; a survey left half sent waits here under «Не дослано» («отправлено N из M», «Продолжить»). «Тем, кто платил» is a thank-you with four questions and a month of access for answering them («Ответить на вопросы», 30 days). 2 «Вопросы» — the bot message as a preview, «Поменять вступление» («Поменять сообщение» for a gift survey), the tile «Подарок» (days of full access, 0 — no gift; the button's caption; that the gift comes after the last question for at least one answer and how the days are added to the access a person has; a reminder to fix the promise when the days differ from the ready form's), a card per question with «Изменить», up / down, remove; «Добавить вопрос» (ready ones from the bank or one's own, 6 at most); «Посмотреть как пользователь» walks the form without recording anything. A question opens on its own screen (`components/admin/SurveyQuestionEditor.tsx`): text, «Выбор варианта» / «Свободный ответ», options by taps (rename, remove, add, ready ones), the switch «Другое — свой ответ». The first question must have options, 4 at most — the builder says why and does not go on (not for a gift survey: nothing of it goes to the chat). «Посмотреть как пользователь» of a gift survey can be walked as «Подписка закончилась», «Подписка действует» or «Пожизненный» — the line about the gift above the questions and the last screen follow. «Отправить себе» of a gift survey is a trial: the owner walks the screens a person with their access would get, marked «Пробная отправка», and no days are given. A question with a headline number says so; renaming its buttons keeps the number, removing one of its two key options or the question itself is said in red (`components/admin/surveyHeadline.ts`). 3 «Кому отправить» — an audience with its size (by access, or by whether people studied in the last 30 days), «Сначала пробной группе» / «Сразу всем». 4 «Отправка» — «Отправить себе» (a trial to the owner only, the whole form can be walked), pick recipients (asks first, sends nothing), «Отправить следующие 25» (closed until recipients are picked; asks first), status, «Смотреть ответы»; after a test group the rest of the audience is picked here too, also after coming back (`resume`). The campaign's name is made by the server; once recipients are picked the questions are fixed. The builder is a focused mode too: no tab bar, «шаг N из 4» and «Закрыть», «Назад / Дальше» pinned to the bottom; an unfinished survey is saved on the device and offered on the first step as «Продолжить черновик». |
| `AdminFeedbackScreen.tsx` | `admin-feedback` (owner only) | «Связь» tab. Its root is three sections under a segmented switch — «Сообщения» (opens first), «Опросы» («Новый опрос» on top, the list with what is unfinished), «Экран покупки» — each with its own address (`admin-messages`, `admin-surveys`, `admin-paywall`); a survey's results and a conversation open on top. A conversation the owner started first is listed too («отвечено», «ты: …»). Earlier wording of the same content follows. List: «Что смутило? — экран покупки», «Написали автору», and every survey sent to people — by its first question, with the date, the audience, received / answered / reached the end, «не дослано» when recipients still wait. A survey's own screen: the funnel «получили → ответили на первый вопрос → открыли форму в мини-аппе → дошли до конца», then every question with counts per option, shares and what was written («Другое», free answers); a question with a headline number shows it first (the share of «Очень расстроюсь» without «Уже не пользуюсь»); chips narrow the answers to those who chose one option of the first question; «Продолжить отправку». A survey with a gift has its own funnel — «получили → открыли → ответили хотя бы на один вопрос → дошли до конца → получили подарок» — and the same line in the list; a form without a headline question simply shows no headline number. A tap on an id opens the user. `components/admin/feedbackView.tsx`. Every text has «Ответить» → the conversation with its author (`components/admin/FeedbackThread.tsx`): who it is, their texts with where each came from, the owner's answers with what Telegram said («человек заблокировал бота — ответ не доставлен»), a field with a preview of the bot message, «Отправить», «Не требует ответа». «Сообщения от людей» lists everyone who wrote something with the status — «новое» / «человек ответил» / «отвечено» / «не требует ответа» — and the filter «Без ответа»; the count of the unanswered is on the admin's «Отзывы» tile. |
| `FeedbackScreen.tsx` | `feedback` (`?screen=feedback[&fc=<campaign key>][&thread=1]`) | «Написать автору»: a text field (2000 characters), «Отправить», thanks. Entries: the tile in `Profile.tsx` settings, «Написать подробнее» under an answer to a one-question survey (then the message is tied to that campaign) and «Ответить» under the author's answer in the bot. Once the author has answered, the latest messages of the conversation are shown above the field («Наша переписка»). Says «Отвечу сюда же, в чат с ботом.» and when the daily limit is reached. |
Expand Down
Loading
Loading