Skip to content

add: like 100 random quotes#134

Merged
breadddevv merged 1 commit into
PlanetaryOrbit:mainfrom
carteraccs:main
Apr 26, 2026
Merged

add: like 100 random quotes#134
breadddevv merged 1 commit into
PlanetaryOrbit:mainfrom
carteraccs:main

Conversation

@carteraccs
Copy link
Copy Markdown
Contributor

@carteraccs carteraccs commented Apr 26, 2026

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

  • Mission Log Expansion: Added 100+ unique lines across all time slots. I've integrated more "Command," "Satellite," and "Orbital" motifs to make the system messages feel more immersive and less repetitive.
  • Midnight Logic Fix: Reordered the time checks to bridge the midnight gap correctly. Users (Commanders) active between 12 AM and 4 AM will now get "Late Night" messages instead of accidental "Good Morning" greetings.
  • PWA Metadata Refresh: Updated the manifest description to align with Orbit’s latest positioning and improved the install prompt messaging.
  • Code Cleanup: Added explicit return types to the utility function and simplified the logic flow for better maintainability.

Time Windows

  • Late Night (Night Shift): 10 PM – 4 AM (hour >= 22 || hour < 4)
  • Evening (Winding Down): 5 PM – 10 PM (hour >= 17)
  • Afternoon (Mid-Orbit): 12 PM – 5 PM (hour >= 12)
  • Morning (Launch): 4 AM – 12 PM (Fallback)

Summary by CodeRabbit

  • Refactor
    • Improved time-based messaging system with more precise timing thresholds across different periods of the day.
    • Expanded message variety and content for enhanced user experience.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

📝 Walkthrough

Walkthrough

The utils/randomText.ts utility file is updated with explicit string return type annotations for its exported functions, revised message arrays for all four time-of-day segments, and adjusted time-based branching logic to define new cutoff thresholds across morning, afternoon, evening, and late-night periods.

Changes

Cohort / File(s) Summary
Type Annotations
utils/randomText.ts
Added explicit string return types to randomText() and randomTextFromArray() functions.
Time-Segment Messages & Logic
utils/randomText.ts
Replaced all four time-segmented message arrays with expanded/new message sets and adjusted time-of-day thresholds: late-night (22:00–03:59), evening (17:00+), afternoon (12:00+), morning (fallback).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Hopping through the hours with glee,
String types now clear for all to see,
Morning, noon, and evening bright,
Late-night whispers wrap 'round midnight!
Messages refreshed, a whimsy delight. 🌙✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title mentions adding random quotes, but the PR objectives reveal the primary changes are expanded greeting messages with time-of-day logic fixes, midnight handling corrections, and code cleanup—not just adding quotes. Consider a more specific title like 'Fix midnight time-of-day logic and expand greeting messages' to accurately reflect the main objectives of the changeset.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 logic reads 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: Rename nightOnlyTexts to eveningOnlyTexts to match its semantic role.

nightOnlyTexts now serves the evening window (17:00–21:59) while lateNightTexts covers 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 PM

Also 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

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: be04d96f-e3c4-4573-945a-56d0fbeda54b

📥 Commits

Reviewing files that changed from the base of the PR and between ad3919e and 24de312.

📒 Files selected for processing (1)
  • utils/randomText.ts

Comment thread utils/randomText.ts
`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}. ⌨️`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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}. ⌨️".

@carteraccs
Copy link
Copy Markdown
Contributor Author

i put more hard work then @2milliongunguy

@breadddevv breadddevv merged commit e1cd747 into PlanetaryOrbit:main Apr 26, 2026
1 check 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.

2 participants