-
-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beta #164
Conversation
## Summary by Sourcery Bug Fixes: - Fixed token generation issues caused by the command suffix. Co-authored-by: Mirror Hunter <dpmirror@proton.me>
Reviewer's Guide by SourceryThis pull request refactors the status command, removing the overview page and associated logic. It also updates the default branch to 'beta' and fixes a bug in the shortener logic. Sequence diagram for simplified status command flowsequenceDiagram
participant User
participant Bot
participant TaskDict
User->>Bot: Send status query
Bot->>TaskDict: Get task data
alt Next/Previous page
Bot->>Bot: Update page number
else Status change
Bot->>TaskDict: Update task status
end
Bot->>User: Return status message with navigation buttons
Class diagram for bot commands updateclassDiagram
class BotCommands {
+StartCommand: str
+MirrorCommand: list
+YtdlCommand: list
+LeechCommand: list
}
note for BotCommands "StartCommand simplified to 'start'"
State diagram for URL shortener logicstateDiagram-v2
[*] --> CheckShorteners
CheckShorteners --> ReturnOriginal: No shorteners available
CheckShorteners --> AttemptShorten: Shorteners available
AttemptShorten --> ReturnShortened: Success
AttemptShorten --> RetryAttempt: Failure
RetryAttempt --> AttemptShorten: Retry < 4
RetryAttempt --> ReturnOriginal: Retry >= 4
ReturnShortened --> [*]
ReturnOriginal --> [*]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @5hojib - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please provide documentation explaining the rationale behind removing the status overview feature ('ov' command). This seems like a significant reduction in monitoring capabilities that should be justified.
- The PR title and description are too vague. Please add a proper description explaining the purpose and impact of these changes.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -257,8 +256,7 @@ async def get_readable_message(sid, is_user, page_no=1, status="All", page_step= | |||
for label, status_value in list(STATUSES.items()): | |||
if status_value != status: | |||
buttons.data_button(label, f"status {sid} st {status_value}") | |||
buttons.data_button("♻️", f"status {sid} ref", position="header") | |||
button = buttons.build_menu(8) | |||
button = buttons.build_menu(8) if buttons else None | |||
msg += f"<b>CPU:</b> {cpu_percent()}% | <b>FREE:</b> {get_readable_file_size(disk_usage(Config.DOWNLOAD_DIR).free)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): This line creates a refresh button that won't work since its handler was removed from status.py
The refresh button handler (data[2] == "ref" case) was removed from status.py, but this code still tries to create the refresh button. This will lead to a non-functional UI element.
Summary by Sourcery
Enhancements: