-
Notifications
You must be signed in to change notification settings - Fork 892
Completed #46
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
base: main
Are you sure you want to change the base?
Completed #46
Conversation
WalkthroughThis update introduces a new prank application using Tkinter in Python, which displays random notifications, roasts on Backspace, and riddles to close the app. Two new HTML files implement similar notification loop concepts for the web, with interactive controls and playful UI behaviors. The README is updated to reflect the project's specifics and team details. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GUI (Tkinter)
participant Notification (plyer)
participant Keyboard Listener (pynput)
participant Threading
User->>GUI (Tkinter): Clicks "Start"
GUI (Tkinter)->>Threading: Starts notification and key listener threads
Threading->>Notification (plyer): Periodically triggers notifications
User->>Keyboard Listener (pynput): Presses Backspace
Keyboard Listener (pynput)->>Notification (plyer): Shows roast notification
User->>GUI (Tkinter): Attempts to close window
GUI (Tkinter)->>User: Presents riddle popup
User->>GUI (Tkinter): Submits riddle answers
GUI (Tkinter)->>GUI (Tkinter): Validates answers
alt All correct
GUI (Tkinter)->>GUI (Tkinter): Close app
else Incorrect
GUI (Tkinter)->>User: Prompt to retry
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 5
🧹 Nitpick comments (4)
README.md (2)
17-17
: Fix spelling error: "recieves" → "receives"-This prototype of an app is a chaotic devil thats triggers a loop of notifications for a certain time period whenever the user recieves a random message/notification. The notification pops up with random pointless facts, cringe dialogues. +This prototype of an app is a chaotic devil thats triggers a loop of notifications for a certain time period whenever the user receives a random message/notification. The notification pops up with random pointless facts, cringe dialogues.
37-37
: Fix spelling error: "chatpgt" → "ChatGPT"-For Software: with the help of chatpgt and mentors +For Software: with the help of ChatGPT and mentorsuseless_project.html (1)
7-7
: Remove space after = in rel attribute- <link rel= "stylesheet" href="style.css"> + <link rel="stylesheet" href="style.css">NOTLOOP_INFINITE CRINGE.py.py (1)
1-1
: Consider renaming file to remove double .py extensionThe filename "NOTLOOP_INFINITE CRINGE.py.py" has a redundant .py extension.
Rename the file to
NOTLOOP_INFINITE_CRINGE.py
(also replacing spaces with underscores for better compatibility).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
NOTLOOP_INFINITE CRINGE.py.py
(1 hunks)README.md
(1 hunks)useless_project.html
(1 hunks)useless_project2.html
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~17-~17: Ensure spelling is correct
Context: ...a certain time period whenever the user recieves a random message/notification. The noti...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~37-~37: Ensure spelling is correct
Context: ...entation For Software: with the help of chatpgt and mentors # Installation VSCODE, GIT...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 Ruff (0.12.2)
NOTLOOP_INFINITE CRINGE.py.py
91-91: Do not use bare except
(E722)
🔇 Additional comments (2)
NOTLOOP_INFINITE CRINGE.py.py (2)
94-109
: Well-implemented threading architectureGood use of threading.Event for coordination and app.after() to ensure GUI operations run on the main thread. The daemon threads ensure clean shutdown.
130-132
: Consider preventing app closure until riddles are solvedCurrently,
on_app_close()
shows the riddle window but doesn't prevent the main app from closing. Users can close both windows without solving riddles.If you want to force riddle solving before exit, consider:
def on_app_close(): if messagebox.askyesno("Exit", "You must solve riddles to exit. Continue?"): show_riddle_lock() # Don't call app.destroy() here - let riddle window handle it
def on_key_press(key): | ||
try: | ||
if key == keyboard.Key.backspace: | ||
roast = random.choice(roasts) | ||
show_notification(roast) | ||
except: | ||
pass | ||
|
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.
Replace bare except with specific exception handling
Bare except
clauses can hide unexpected errors. Specify the exception type you're handling.
def on_key_press(key):
try:
if key == keyboard.Key.backspace:
roast = random.choice(roasts)
show_notification(roast)
- except:
+ except AttributeError:
pass
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def on_key_press(key): | |
try: | |
if key == keyboard.Key.backspace: | |
roast = random.choice(roasts) | |
show_notification(roast) | |
except: | |
pass | |
def on_key_press(key): | |
try: | |
if key == keyboard.Key.backspace: | |
roast = random.choice(roasts) | |
show_notification(roast) | |
except AttributeError: | |
pass |
🧰 Tools
🪛 Ruff (0.12.2)
91-91: Do not use bare except
(E722)
🤖 Prompt for AI Agents
In NOTLOOP_INFINITE CRINGE.py.py around lines 86 to 93, the bare except clause
in the on_key_press function should be replaced with a specific exception type
to avoid hiding unexpected errors. Identify the likely exceptions that could
occur in the try block, such as KeyError or IndexError, and catch only those
specific exceptions instead of a bare except. This will improve error handling
clarity and debugging.
- [Libraries used] | ||
- [Tools used] | ||
- Languages used - Python | ||
- Frameworks used - playwright |
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.
Remove "playwright" from frameworks - it's not used in the implementation
The codebase doesn't use playwright. The Python application uses tkinter for GUI, not playwright.
-- Frameworks used - playwright
+- Frameworks used - tkinter
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- Frameworks used - playwright | |
- Frameworks used - tkinter |
🤖 Prompt for AI Agents
In README.md at line 31, remove the mention of "playwright" from the list of
frameworks since it is not used in the codebase. Replace or update the
frameworks section to accurately reflect the technologies actually used, such as
tkinter for the GUI.
<body> | ||
|
||
<button onclick="startLoop()">Start NotiLoop</button> | ||
<button onclick="stopLoop()">Stop</button> |
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.
Add missing ID to stop button - JavaScript code references non-existent element
The JavaScript code tries to access document.getElementById("stopBtn")
but the stop button doesn't have an ID, causing a null reference error.
- <button onclick="stopLoop()">Stop</button>
+ <button id="stopBtn" onclick="stopLoop()">Stop</button>
Also applies to: 62-73
🤖 Prompt for AI Agents
In useless_project.html at line 14 and also lines 62 to 73, the stop button
element lacks an ID attribute, but the JavaScript code references it using
document.getElementById("stopBtn"), causing a null reference error. Add the
attribute id="stopBtn" to the stop button element to ensure the JavaScript can
correctly find and interact with it.
const stopBtn = document.getElementById("stopBtn"); | ||
|
||
stopBtn.addEventListener("mouseenter", () => { | ||
const maxX = window.innerWidth - stopBtn.offsetWidth; | ||
const maxY = window.innerHeight - stopBtn.offsetHeight; | ||
|
||
const newX = Math.random() * maxX; | ||
const newY = Math.random() * maxY; | ||
|
||
stopBtn.style.left = `${newX}px`; | ||
stopBtn.style.top = `${newY}px`; | ||
}); |
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.
💡 Verification agent
🧩 Analysis chain
Verify button positioning CSS exists
The stop button movement code sets left
and top
properties, which only work with absolute or fixed positioning. Ensure your style.css
includes appropriate positioning for the stop button.
🏁 Script executed:
#!/bin/bash
# Check if style.css exists and contains positioning for stopBtn
if [ -f "style.css" ]; then
echo "Checking for stopBtn positioning in style.css:"
rg -A 2 -B 2 "#stopBtn|button.*position" style.css || echo "No positioning found for stopBtn"
else
echo "style.css not found"
fi
Length of output: 71
Add explicit positioning for the stop button
The mouseenter
handler sets left
and top
, but there’s no CSS defining the stop button’s positioning—without position: absolute
(or fixed
), those styles won’t take effect.
• No style.css
was found in the repo, so the button’s positioning isn’t defined anywhere.
• Add one of the following:
- A CSS rule in your stylesheet:
#stopBtn { position: absolute; }
- An inline style on the button element:
<button id="stopBtn" style="position: absolute;">Stop</button>
This will ensure your randomized left
/top
values actually move the button.
🤖 Prompt for AI Agents
In useless_project.html around lines 62 to 73, the stop button's CSS positioning
is not set, so the left and top styles applied in the mouseenter event do not
move the button. Fix this by adding a CSS rule that sets #stopBtn to position:
absolute, either by adding a style block or inline style on the button element,
ensuring the left and top properties take effect and the button moves as
intended.
<script> | ||
if ('serviceWorker' in navigator) { | ||
navigator.serviceWorker.register('sw.js'); | ||
} | ||
</script> |
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.
Add error handling for service worker registration
The service worker registration lacks error handling and doesn't verify HTTPS context. Service workers only work in secure contexts (HTTPS or localhost).
<script>
if ('serviceWorker' in navigator) {
- navigator.serviceWorker.register('sw.js');
+ navigator.serviceWorker.register('sw.js')
+ .then(registration => console.log('Service Worker registered:', registration))
+ .catch(error => console.error('Service Worker registration failed:', error));
}
</script>
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
<script> | |
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('sw.js'); | |
} | |
</script> | |
<script> | |
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('sw.js') | |
.then(registration => console.log('Service Worker registered:', registration)) | |
.catch(error => console.error('Service Worker registration failed:', error)); | |
} | |
</script> |
🤖 Prompt for AI Agents
In useless_project2.html around lines 9 to 13, the service worker registration
code lacks error handling and does not check if the page is served over HTTPS or
localhost. Update the script to first verify that the context is secure (HTTPS
or localhost) before attempting registration. Add a .catch block to the
navigator.serviceWorker.register promise to handle and log any registration
errors.
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
30-32
: “playwright” is still listed but never used – replace with Tkinter
Same observation made in a previous review; it hasn’t been applied.-- Frameworks used - playwright +- Frameworks used - tkinter
🧹 Nitpick comments (4)
README.md (4)
17-19
: Typos & grammar in the description hurt credibility
recieves
,thats triggers
, and verb-number mismatches make the text look rushed. Quick polish:-This prototype of an app is a chaotic devil thats triggers a loop of notifications for a certain time period whenever the user recieves a random message/notification. The notification pops up with random pointless facts, cringe dialogues. -This app further adds to the mess by sending roasts that melts your brain whenever user hit backspace. -It adds more to the chaos by pushing the user to solve riddles to close this loop. +This prototype is a chaotic devil that triggers a loop of notifications whenever the user receives a message/notification. The pop-ups contain random pointless facts and cringe dialogues. +The app piles on by sending brain-melting roasts every time the user hits Backspace. +To exit, the victim must solve a riddle, adding even more chaos.
37-37
: Minor typo – “chatpgt” → “ChatGPT”-For Software: with the help of chatpgt and mentors +For Software: with help from ChatGPT and mentors
39-39
: Installation section isn’t actionableListing tools isn’t enough. Provide concrete steps:
- VSCODE, GITHUB, PYTHON +```bash +# 1. Clone the repo +git clone https://github.com/<org>/notloop.git +cd notloop + +# 2. Create a virtual environment (optional) +python -m venv .venv +source .venv/bin/activate # Windows: .venv\Scripts\activate + +# 3. Install dependencies +pip install -r requirements.txt + +# 4. Run the app +python NOTLOOP_INFINITE\ CRINGE.py.py +```
87-88
: “TEAMWORK” doesn’t explain individual rolesReaders (and judges) usually want to know who did what—coding, design, docs, etc. Consider replacing with something more descriptive.
-- RISHANANDA VR - TEAMWORK -- ANIKA KARUVAN KAVIL - TEAMWORK +- RISHANANDA V R – Lead developer, Tkinter UI, notification logic +- ANIKA KARUVAN KAVIL – Riddle engine, documentation, testing
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~17-~17: Ensure spelling is correct
Context: ...a certain time period whenever the user recieves a random message/notification. The noti...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~37-~37: Ensure spelling is correct
Context: ...entation For Software: with the help of chatpgt and mentors # Installation VSCODE, GIT...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (2)
README.md (2)
4-4
: Inconsistent product name – pick one spelling and stick to itThe repo contains a file named
NOTLOOP_INFINITE CRINGE.py.py
, while the README headline says “NOTILOOP”. Readers will assume these are two different things. Align the spelling so the project is searchable and unambiguous.-# NOTILOOP: INFINITE CRINGE 🎯 +# NOTLOOP: INFINITE CRINGE 🎯 # or rename the code file – just be consistent
33-33
: Python 3.13 isn’t released yet – verify required versionUnless you’re testing against an alpha build, advertise the latest stable (3.12) to avoid scaring users who think they need an unreleased interpreter.
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
30-32
: Frameworks list still incorrect – remove Playwright
Playwright is not used anywhere in the code base; the GUI is built with Tkinter. We pointed this out in the previous review but the line remains unchanged.- - Frameworks used - playwright + - GUI framework – Tkinter
🧹 Nitpick comments (4)
README.md (4)
17-19
: Fix typos / grammar in project description
Multiple small issues make the text hard to read (“thats triggers”, “recieves”, etc.).-This prototype of an app is a chaotic devil thats triggers a loop of notifications for a certain time period whenever the user recieves a random message/notification. The notification pops up with random pointless facts, cringe dialogues. -This app further adds to the mess by sending roasts that melts your brain whenever user hit backspace. -It adds more to the chaos by pushing the user to solve riddles to close this loop. +This prototype is a chaotic devil that triggers a loop of notifications whenever the user receives a message/notification. The notification pops up with random pointless facts and cringe dialogues. +The app further adds to the mess by sending roasts that melt your brain whenever the user hits Backspace, +and it pushes the user to solve riddles to close the loop.
37-37
: Correct “chatpgt” typo-For Software: with the help of chatpgt and mentors +For Software: with the help of ChatGPT and mentors
39-40
: Installation section needs concrete steps
Listing tools (“VSCODE, GITHUB, PYTHON”) is not actionable. Provide real commands (e.g.,pip install -r requirements.txt
) and minimum Python version.
25-26
: Subject-verb agreement
“Messages that roasts” → “messages that roast”.-Sends you messages that roasts you +Sends you messages that roast you
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~17-~17: Ensure spelling is correct
Context: ...a certain time period whenever the user recieves a random message/notification. The noti...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~37-~37: Ensure spelling is correct
Context: ...entation For Software: with the help of chatpgt and mentors # Installation VSCODE, GIT...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
31-31
: ‘playwright’ is still listed as a framework – replace with ‘tkinter’
Same as flagged in the previous round; the codebase uses Tkinter, not Playwright.- Frameworks used - playwright + Frameworks used - tkinter
🧹 Nitpick comments (5)
README.md (5)
17-19
: Fix spelling & grammar in the project description-This prototype of an app is a chaotic devil thats triggers a loop of notifications for a certain time period whenever the user recieves a random message/notification. The notification pops up with random pointless facts, cringe dialogues. -This app further adds to the mess by sending roasts that melts your brain whenever user hit backspace. +This prototype app is a chaotic prank that triggers a loop of notifications for a set period whenever the user receives a random message or notification. These notifications present pointless facts and cringe-worthy dialogues. +It further adds to the mess by sending roasts that melt your brain whenever the user hits the Backspace key.
37-37
: Typo: ‘chatpgt’ → ‘ChatGPT’-For Software: with the help of chatpgt and mentors +For Software: with the help of ChatGPT and mentors
42-42
: Heading level jumps from H1 to H3 – use H2 to satisfy MD001-### Project Documentation +## Project Documentation
76-76
: Convert bare URL to a Markdown link-https://github.com/RISHANANDA/team_firefly/blob/main/NOTLOOP_INFINITE%20CRINGE.py.py%20-%20team_firefly%20-%20Visual%20Studio%20Code%202025-08-02%2016-23-45.mp4 +[Demo video](https://github.com/RISHANANDA/team_firefly/blob/main/NOTLOOP_INFINITE%20CRINGE.py.py%20-%20team_firefly%20-%20Visual%20Studio%20Code%202025-08-02%2016-23-45.mp4)
46-49
: Screenshot placeholders need cleanupTypos (“SCreenshot”) and inconsistent naming make the section hard to read. Consider normalising and converting to a bullet list with proper image embeds.
Example:- **Screenshot 55** – Notifications popping up - **Screenshot 56** – Riddle prompt - **Screenshot ...** – User interface
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~17-~17: Ensure spelling is correct
Context: ...a certain time period whenever the user recieves a random message/notification. The noti...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~37-~37: Ensure spelling is correct
Context: ...entation For Software: with the help of chatpgt and mentors # Installation VSCODE, GIT...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.17.2)
README.md
42-42: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
76-76: Bare URL used
(MD034, no-bare-urls)
Summary by CodeRabbit
New Features
Documentation