Skip to content
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

[WEB-1671] fix: expired snooze issues fixed #5270

Merged
merged 2 commits into from
Jul 31, 2024
Merged

Conversation

gakshita
Copy link
Collaborator

@gakshita gakshita commented Jul 30, 2024

Summary
Snoozed issues with a past due date continue to display "-x days to go" after the intended snooze date has passed. These issues should no longer be considered snoozed and should be displayed under inbox issues window and time stamp -x days should be removed

[WEB-1671]

Summary by CodeRabbit

  • New Features

    • Enhanced filtering logic for inbox issues, improving issue visibility based on current status and snooze conditions.
    • Updated rendering logic for inbox issues to ensure only relevant information is displayed based on status and snooze state.
  • Bug Fixes

    • Fixed empty fragment rendering for inbox issues, ensuring that inactive or snoozed issues do not clutter the interface.

@gakshita gakshita added 🐛bug Something isn't working 🌐frontend labels Jul 30, 2024
Copy link
Contributor

coderabbitai bot commented Jul 30, 2024

Walkthrough

The recent changes enhance the responsiveness and filtering logic of the inbox issue management system. The InboxIssueStatus component now effectively manages rendering based on snoozed dates and issue statuses, while the ProjectInboxStore class refines its filtering logic to accommodate more complex conditions. These updates aim to provide a smoother user experience and ensure that only relevant inbox issues are displayed based on their current state.

Changes

Files Change Summary
web/core/components/inbox/inbox-issue-status.tsx
web/core/store/inbox/project-inbox.store.ts
Enhanced control flow in InboxIssueStatus to render based on snoozed dates and status. Improved filtering logic in ProjectInboxStore to include nuanced conditions for displaying inbox issues.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant InboxIssueStatus
    participant ProjectInboxStore

    User->>ProjectInboxStore: Request filtered inbox issues
    ProjectInboxStore->>ProjectInboxStore: Evaluate conditions
    alt Conditions met
        ProjectInboxStore-->>User: Return relevant issues
    else Conditions not met
        ProjectInboxStore-->>User: Return empty results
    end
    User->>InboxIssueStatus: Render inbox issue status
    alt Snoozed date passed or detail not found
        InboxIssueStatus-->>User: Render empty fragment
    else Active issue
        InboxIssueStatus-->>User: Display issue details
    end
Loading

Poem

In the inbox, issues hop and play,
With statuses bright, they dance all day.
Snoozed or pending, each has its role,
Filtering smartly, making us whole.
A tweak here, a change there,
Now our flow is light as air! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@gakshita gakshita requested a review from SatishGandham July 30, 2024 11:03
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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1f8f6d1 and 7a31f15.

Files selected for processing (2)
  • web/core/components/inbox/inbox-issue-status.tsx (1 hunks)
  • web/core/store/inbox/project-inbox.store.ts (2 hunks)
Additional comments not posted (5)
web/core/components/inbox/inbox-issue-status.tsx (2)

22-22: Ensure the correctness of the new condition.

The new condition isSnoozedDatePassed is crucial for determining if the snoozed date has passed. Ensure that the condition is accurate and handles edge cases, such as invalid dates.


22-22: LGTM! The new condition enhances the component's responsiveness.

The new condition isSnoozedDatePassed is appropriately used within the component's control flow to ensure that only relevant information is displayed when the issue is active.

web/core/store/inbox/project-inbox.store.ts (3)

159-159: Ensure the correctness of the new variable.

The new variable currentTime is crucial for determining the current timestamp. Ensure that the variable is accurate and handles edge cases, such as time zone differences.


161-174: LGTM! The new conditions enhance the filtering logic.

The new conditions are appropriately used within the method's control flow to ensure that only issues that are actively snoozed or have exceeded their snooze duration are included in the filtered results.


311-313: Ensure the correctness of the new status inclusion.

The new status inclusion logic ensures that snoozed issues are considered in the filtering process. Ensure that the logic is accurate and handles edge cases, such as missing statuses.

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 7a31f15 and 5554621.

Files selected for processing (1)
  • web/core/store/inbox/project-inbox.store.ts (2 hunks)
Additional comments not posted (3)
web/core/store/inbox/project-inbox.store.ts (3)

159-159: Introduction of currentTime is appropriate.

The introduction of the currentTime variable is a good practice to capture the current timestamp for use in filtering logic.


313-315: Inclusion of SNOOZED status is appropriate.

Including the SNOOZED status in the status variable ensures that snoozed issues are considered in the query parameters for fetching inbox issues.


161-175: Updated filtering logic looks good but verify correctness.

The updated filtering logic for filteredInboxIssueIds appears correct, ensuring that actively snoozed issues and those with expired snooze durations are handled appropriately.

Please verify the logic with unit tests to ensure correctness.

@SatishGandham SatishGandham merged commit 569b592 into preview Jul 31, 2024
13 of 14 checks passed
@SatishGandham SatishGandham deleted the fix/snooze-issue branch July 31, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working 🌐frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants