add: like 100 random quotes#134
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
utils/randomText.ts (2)
180-181: Drop the dev-note comment and fix the stray indentation.
// updated time logicreads as a transient PR note rather than a useful invariant — the inline comments on Lines 183–186 already describe the windows. Line 181 also has an extra leading space that breaks the surrounding indentation.🧹 Cleanup
-// updated time logic - const hour = new Date().getHours(); + const hour = new Date().getHours();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@utils/randomText.ts` around lines 180 - 181, Remove the transient dev-note comment "// updated time logic" and fix the stray leading space before the declaration of the hour variable so indentation matches surrounding code; locate the line that declares const hour = new Date().getHours() in utils/randomText.ts and replace it with a properly indented declaration with no PR-note comment.
102-102: RenamenightOnlyTextstoeveningOnlyTextsto match its semantic role.
nightOnlyTextsnow serves the evening window (17:00–21:59) whilelateNightTextscovers the actual night/late-night band. Having two adjacent variables both prefixed "night" is confusing and made worse by the comment on Line 184 referring to it as "Evening". Renaming will make the four-bucket scheme self-documenting and reduce the chance that a future contributor edits the wrong array.♻️ Suggested rename
- const nightOnlyTexts = [ + const eveningOnlyTexts = [ `Good evening, ${name} 🌙`, ... ]; @@ - if (hour >= 17) return randomTextFromArray(nightOnlyTexts); // Evening: 5 PM – 9:59 PM + if (hour >= 17) return randomTextFromArray(eveningOnlyTexts); // Evening: 5 PM – 9:59 PMAlso applies to: 150-150, 184-184
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@utils/randomText.ts` at line 102, Rename the variable nightOnlyTexts to eveningOnlyTexts and update every usage and related comment to match the semantic window (17:00–21:59); specifically rename the array identifier nightOnlyTexts, update any references where it’s read or exported, and change the nearby comment that currently labels it "Evening" so it references eveningOnlyTexts; ensure lateNightTexts remains unchanged and run a quick search to replace all occurrences (including imports/exports and tests) to avoid unresolved symbol errors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@utils/randomText.ts`:
- Line 158: The string literal in utils/randomText.ts currently uses the phrase
"deep management" which is likely a wording slip; update that template (the
entry that reads `Quiet hours are the best for deep management. Go get ’em,
${name}. ⌨️`) to a more idiomatic phrase such as "deep work" or "deep focus" so
it becomes e.g. "Quiet hours are the best for deep work. Go get ’em, ${name}.
⌨️".
---
Nitpick comments:
In `@utils/randomText.ts`:
- Around line 180-181: Remove the transient dev-note comment "// updated time
logic" and fix the stray leading space before the declaration of the hour
variable so indentation matches surrounding code; locate the line that declares
const hour = new Date().getHours() in utils/randomText.ts and replace it with a
properly indented declaration with no PR-note comment.
- Line 102: Rename the variable nightOnlyTexts to eveningOnlyTexts and update
every usage and related comment to match the semantic window (17:00–21:59);
specifically rename the array identifier nightOnlyTexts, update any references
where it’s read or exported, and change the nearby comment that currently labels
it "Evening" so it references eveningOnlyTexts; ensure lateNightTexts remains
unchanged and run a quick search to replace all occurrences (including
imports/exports and tests) to avoid unresolved symbol errors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| `Insomniacs anonymous: Welcome, ${name} 😴💤`, | ||
| `Hope you're doing okay, ${name}. Remember to rest soon 🫶`, | ||
| `Late shift? Stay sharp, ${name}🦉`, | ||
| `Quiet hours are the best for deep management. Go get ’em, ${name}. ⌨️`, |
There was a problem hiding this comment.
Possible wording slip: "deep management".
"Quiet hours are the best for deep management" reads oddly — "deep work" or "deep focus" is the usual idiom here. If this was intentional flavor, ignore; otherwise consider tweaking.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@utils/randomText.ts` at line 158, The string literal in utils/randomText.ts
currently uses the phrase "deep management" which is likely a wording slip;
update that template (the entry that reads `Quiet hours are the best for deep
management. Go get ’em, ${name}. ⌨️`) to a more idiomatic phrase such as "deep
work" or "deep focus" so it becomes e.g. "Quiet hours are the best for deep
work. Go get ’em, ${name}. ⌨️".
|
i put more hard work then @2milliongunguy |
Summary
Expanded the greeting library to lean harder into the Orbit theme and fixed the time-of-day logic. Also refreshed the PWA description to better reflect the project's current branding.
Changes
Time Windows
hour >= 22 || hour < 4)hour >= 17)hour >= 12)Summary by CodeRabbit