Skip to content

Промежуточный итого по мастер-классу#17

Merged
Untru merged 29 commits intomasterfrom
develop
Aug 12, 2025
Merged

Промежуточный итого по мастер-классу#17
Untru merged 29 commits intomasterfrom
develop

Conversation

@Untru
Copy link
Owner

@Untru Untru commented Aug 12, 2025

Промежуточный итого по мастер-классу

Summary by CodeRabbit

  • New Features

    • Pluggable command system with asynchronous handling for faster responses.
    • Enhanced file publication with richer outputs and returned links.
    • More robust startup with automatic retries.
  • Changes

    • Text messages now return a “not supported” notice.
  • Documentation

    • Added comprehensive tutorials and master-class articles.
    • Removed outdated development guide.
  • Chores

    • Added sample environment configuration file.
    • Updated package mapping and dependencies.

@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces a command-based Telegram bot architecture with interface implementations, async handlers, logging, and storage-backed history. Reworks startup (retry loop), packaging, and dependencies. Adds publishers interface, enhances Gist publisher, adjusts publication manager APIs, adds data storage classes, updates docs, and provides a new .env example.

Changes

Cohort / File(s) Summary
Configuration & Packaging
packagedef, .env.example2
Set env version to 2.0.0-rc.7, pin autumn 4.3.11, map executable, lower version to 0.0.1; add sample SHAREBOT envs.
Startup & Entry
main.os, src/core/Классы/Запускатор.os
Remove pre-launch scan; add retry loop (10 attempts) with logging and final error on bot start.
Bot Controller & Commands
src/controller/Классы/ТелеграммБот.os, .../ИнтерфейсКоманда.os, .../КомандаКлавиатура.os, .../КомандаСообщение.os, .../КомандаФайл.os, .../ВалидаторИнтерфейсов.os, .../ПарамметрыБота.os
Switch to array-injected commands; add logging; iterate commands via ПодходитПоУсловию then async Обработать; implement ИнтерфейсКоманда; add interface validator; remove exported parameter functions; adjust texts and logging.
Publishing Core & Interfaces
src/core/Классы/МенеджерПубликаций.os, .../ИнтерфейсПубликатор.os, .../ПарамертыРазбора.os, .../ПубликаторGist.os, .../ПубликаторPaste1C.os, src/core/Модули/РаботаСМодулями.os
Refactor to storage-backed history, rename/expand exports (e.g., СписокПубликаций, НайтиЗаписиОФайле, ИнформацияОФайлеПоИД, СохранитьЗаписьОФайле); add publisher interface; minor param fix; significantly enhance Gist publisher (auth headers, payload, updates, error handling, summary local gen); declare Paste1C implements interface; export ДеревоОбъектов, remove exported ОглавлениеПоДаннымGist.
Data Storage
src/data/Классы/ХранилищеИсторияПубликаций.os, .../ХранилищеИсторияФайлов.os
New storage classes with exported save/query stubs for publications and files; provide save operations, placeholders for fetch.
Documentation
DEVELOPMENT_GUIDE.md (deleted), Make.md, архив.md
Remove old dev guide; add extensive Russian how-to docs and master-class article.

Sequence Diagram(s)

sequenceDiagram
  participant Main as main.os
  participant Runner as Запускатор
  participant Bot as ТелеграммБот
  participant Log as Лог

  Main->>Runner: ПриЗапускеПриложения()
  loop up to 10 attempts
    Runner->>Log: Ошибка/Инфо "Старт"
    Runner->>Bot: Запустить()
    alt exception
      Runner->>Log: Ошибка(Подробности)
    end
  end
  Runner->>Log: Ошибка("Не удалось запустить бот")
Loading
sequenceDiagram
  participant Bot as ТелеграммБот
  participant TG as OPI_Telegram API
  participant Cmds as Команды[]
  participant Cmd as Команда*
  participant PM as МенеджерПубликаций
  participant StoreF as Хр.ИсторияФайлов
  participant StoreP as Хр.ИсторияПубликаций
  participant Pub as Публикатор*(Gist/Paste1C)
  participant Ext as External Service

  loop polling
    Bot->>TG: ПолучитьОбновления(Токен, таймаут, смещение)
    TG-->>Bot: result[]
    loop each Сообщение
      Bot->>Cmds: iterate
      alt ПодходитПоУсловию
        Bot->>Cmd: Обработать(Сообщение) (async)
        Cmd->>PM: ОбработатьФайл(...)
        PM->>StoreF: СохранитьИнформациюОФайле(...)
        PM->>Pub: Опубликовать(Тексты, Данные)
        Pub->>Ext: HTTP create/update
        Ext-->>Pub: response
        PM->>StoreP: СохранитьЗаписьОФайле(...)
        Cmd-->>Bot: done
        Bot-->>Cmds: Прервать (for this msg)
      end
    end
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

В ушах гудит мой ритм: “пинг-понг, оп-оп!”
Я, кролик-кодер, запускаю бот-отряд в галоп.
Команды строем — хоп! — интерфейс готов,
В гисты шуршит пушистый хвост файловых слов.
Логи мерцают, ретраи не спят —
Морковкой деплою: ship it, tap-tap! 🥕🚀


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb7b8ea and 288fba0.

⛔ Files ignored due to path filters (17)
  • images/bLBBIiD05DtFLynI5_q15r9mxKU4DhXmsaWILree5GH1A4ANfG_n0nersZOn_OLp_yWpqsAZD10Nmp3tddlEkVTECugzCBxk6DKoNXJfiw0RXu4nVhWBd0TjtwWhhtNfNVYbjBvHMcyXU48X0pmZHSRp9dqia2DNLGbzeZ7bey0hKjvB6SWZvdmNIEI1q2_6XaV7gaUH7t5dfQmxTiWKx_.svg is excluded by !**/*.svg
  • images/image-1.png is excluded by !**/*.png
  • images/image-10.png is excluded by !**/*.png
  • images/image-11.png is excluded by !**/*.png
  • images/image-12.png is excluded by !**/*.png
  • images/image-13.png is excluded by !**/*.png
  • images/image-14.png is excluded by !**/*.png
  • images/image-2.png is excluded by !**/*.png
  • images/image-3.png is excluded by !**/*.png
  • images/image-4.png is excluded by !**/*.png
  • images/image-5.png is excluded by !**/*.png
  • images/image-6.png is excluded by !**/*.png
  • images/image-7.png is excluded by !**/*.png
  • images/image-8.png is excluded by !**/*.png
  • images/image-9.png is excluded by !**/*.png
  • images/image.png is excluded by !**/*.png
  • images/демо.gif is excluded by !**/*.gif
📒 Files selected for processing (22)
  • .env.example2 (1 hunks)
  • DEVELOPMENT_GUIDE.md (0 hunks)
  • Make.md (1 hunks)
  • main.os (1 hunks)
  • packagedef (1 hunks)
  • src/controller/Классы/ВалидаторИнтерфейсов.os (1 hunks)
  • src/controller/Классы/ИнтерфейсКоманда.os (1 hunks)
  • src/controller/Классы/КомандаКлавиатура.os (2 hunks)
  • src/controller/Классы/КомандаСообщение.os (2 hunks)
  • src/controller/Классы/КомандаФайл.os (5 hunks)
  • src/controller/Классы/ПарамметрыБота.os (1 hunks)
  • src/controller/Классы/ТелеграммБот.os (3 hunks)
  • src/core/Классы/Запускатор.os (2 hunks)
  • src/core/Классы/ИнтерфейсПубликатор.os (1 hunks)
  • src/core/Классы/МенеджерПубликаций.os (6 hunks)
  • src/core/Классы/ПарамертыРазбора.os (0 hunks)
  • src/core/Классы/ПубликаторGist.os (1 hunks)
  • src/core/Классы/ПубликаторPaste1C.os (1 hunks)
  • src/core/Модули/РаботаСМодулями.os (1 hunks)
  • src/data/Классы/ХранилищеИсторияПубликаций.os (1 hunks)
  • src/data/Классы/ХранилищеИсторияФайлов.os (1 hunks)
  • архив.md (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Untru Untru merged commit 1a18c7d into master Aug 12, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant