Skip to content

feat(events): Adjust event dates and add new events#922

Merged
yujonglee merged 1 commit intomainfrom
update-seed
Jun 7, 2025
Merged

feat(events): Adjust event dates and add new events#922
yujonglee merged 1 commit intomainfrom
update-seed

Conversation

@ComputelessComputer
Copy link
Collaborator

The changes in this commit focus on adjusting the dates of existing events and adding new events to the database. The key changes are:

  • Moved the "Project Kickoff (Past)" event from 35 days ago to 7 days ago.
  • Moved the "Q3 Strategy Meeting (Past)" event from 65 days ago to 10 days ago.
  • Added a new event "Quick Brainstorm" that occurred 10 days ago.
  • Added a new event "Follow-up Thoughts" that occurred 1 day ago.

These changes help ensure the event data in the database is more up-to-date and relevant for the current time period.

The changes in this commit focus on adjusting the dates of existing events and adding new events to the database. The key changes are:

- Moved the "Project Kickoff (Past)" event from 35 days ago to 7 days ago.
- Moved the "Q3 Strategy Meeting (Past)" event from 65 days ago to 10 days ago.
- Added a new event "Quick Brainstorm" that occurred 10 days ago.
- Added a new event "Follow-up Thoughts" that occurred 1 day ago.

These changes help ensure the event data in the database is more up-to-date and relevant for the current time period.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 7, 2025

📝 Walkthrough

Walkthrough

The seed data in the seed function was updated to adjust the dates of two existing past events and to add two new events without attached sessions. Relevant comments were revised to match the new event timings. No changes were made to public interfaces or function signatures.

Changes

File Change Summary
crates/db-user/src/init.rs Updated seed data: adjusted dates for two past events, added two new events without sessions, updated comments.

Sequence Diagram(s)

sequenceDiagram
    participant Seeder
    participant Database

    Seeder->>Database: Insert/Update "Project Kickoff (Past)" (7 days ago)
    Seeder->>Database: Insert/Update "Q3 Strategy Meeting (Past)" (10 days ago)
    Seeder->>Database: Insert "Quick Brainstorm" (10 days ago, no sessions)
    Seeder->>Database: Insert "Follow-up Thoughts" (1 day ago, no sessions)
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings

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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

Documentation and Community

  • 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.

Copy link
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: 2

🧹 Nitpick comments (1)
crates/db-user/src/init.rs (1)

263-274: Consider different scheduling for the new event.

Both "Quick Brainstorm" and "Q3 Strategy Meeting (Past)" are scheduled for the same date (10 days ago). While this might be intentional, it could be confusing for testing purposes.

Consider scheduling "Quick Brainstorm" on a different date to provide more varied test data:

- start_date: now - chrono::Duration::days(10),
- end_date: now - chrono::Duration::days(10) + chrono::Duration::hours(1),
+ start_date: now - chrono::Duration::days(8),
+ end_date: now - chrono::Duration::days(8) + chrono::Duration::hours(1),
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 78fff9e and 511cb5f.

📒 Files selected for processing (1)
  • crates/db-user/src/init.rs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{js,ts,tsx,rs}`: 1. No error handling. 2. No unused imports, variables, or functions. 3. For comments, keep it minimal. It should be about "Why", not "What".

**/*.{js,ts,tsx,rs}: 1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

  • crates/db-user/src/init.rs
🧬 Code Graph Analysis (1)
crates/db-user/src/init.rs (2)
plugins/db/js/bindings.gen.ts (1)
  • Event (150-150)
plugins/task/src/ctx.rs (1)
  • id (35-37)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: ci
🔇 Additional comments (2)
crates/db-user/src/init.rs (2)

239-239: Update comment for clarity.

The comment accurately reflects the new timing change from "Last Month" to "Ten Days Ago".


275-286: New event implementation looks good.

The "Follow-up Thoughts" event is well-structured with appropriate metadata and timing.

Comment on lines +247 to +248
start_date: now - chrono::Duration::days(10),
end_date: now - chrono::Duration::days(10) + chrono::Duration::hours(2),
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix logical inconsistency between event and session dates.

The "Q3 Strategy Meeting (Past)" event is now scheduled 10 days ago, but the linked session "Q3 Strategy Notes" (line 397) has a creation date of 65 days ago. This creates an impossible scenario where notes were taken before the event occurred.

Update the session creation date to match the new event timing:

- created_at: now - chrono::Duration::days(65),
- visited_at: now - chrono::Duration::days(65),
+ created_at: now - chrono::Duration::days(10),
+ visited_at: now - chrono::Duration::days(10),

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In crates/db-user/src/init.rs around lines 247 to 248, the event "Q3 Strategy
Meeting (Past)" is set to 10 days ago, but the linked session "Q3 Strategy
Notes" has a creation date 65 days ago, which is inconsistent. Update the
session creation date to be close to or after the event date, aligning it with
the event's timing to maintain logical consistency.

Comment on lines +235 to +236
start_date: now - chrono::Duration::days(7),
end_date: now - chrono::Duration::days(7) + chrono::Duration::hours(1),
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix logical inconsistency between event and session dates.

The "Project Kickoff (Past)" event is now scheduled 7 days ago, but the linked session "Project Phoenix Kickoff Notes" (line 378) has a creation date of 35 days ago. This creates an impossible scenario where notes were taken before the event occurred.

Update the session creation date to match the new event timing:

- created_at: now - chrono::Duration::days(35),
- visited_at: now - chrono::Duration::days(35),
+ created_at: now - chrono::Duration::days(7),
+ visited_at: now - chrono::Duration::days(7),
📝 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.

Suggested change
start_date: now - chrono::Duration::days(7),
end_date: now - chrono::Duration::days(7) + chrono::Duration::hours(1),
// … around line 378 in crates/db-user/src/init.rs …
// Change session timestamps to match the event now scheduled 7 days ago
- created_at: now - chrono::Duration::days(35),
- visited_at: now - chrono::Duration::days(35),
+ created_at: now - chrono::Duration::days(7),
+ visited_at: now - chrono::Duration::days(7),
// … remaining session fields …
🤖 Prompt for AI Agents
In crates/db-user/src/init.rs around lines 235 to 236, the event "Project
Kickoff (Past)" is set to 7 days ago, but the linked session "Project Phoenix
Kickoff Notes" has a creation date of 35 days ago, causing a logical
inconsistency. To fix this, update the session creation date at line 378 to be
consistent with the event date, setting it to around 7 days ago or shortly after
the event date to ensure chronological correctness.

@yujonglee yujonglee merged commit 5e8f287 into main Jun 7, 2025
4 checks passed
@yujonglee yujonglee deleted the update-seed branch June 7, 2025 10:54
@coderabbitai coderabbitai bot mentioned this pull request Jul 3, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jul 19, 2025
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