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

[DEMO] rundown reporter #1166

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

[DEMO] rundown reporter #1166

wants to merge 3 commits into from

Conversation

alex-Arc
Copy link
Collaborator

Idea for the shape of a reporter

#1139

Copy link
Contributor

coderabbitai bot commented Jul 31, 2024

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update introduces a new reporting feature across the application, enhancing data management and user interface components. Key changes include the addition of a REPORT constant, new functions for fetching reports, and modifications to existing components to accommodate report data. The changes improve the application's ability to track and display event timings and statuses, enriching the user experience with detailed reporting capabilities.

Changes

Files Change Summary
apps/client/src/common/api/constants.ts Added a new constant REPORT for managing report-related data.
apps/client/src/common/api/rundown.ts Introduced fetchReport function to retrieve on-time report data; updated import statements.
apps/client/src/common/hooks-query/useRundown.ts Added useReport hook for fetching report data using useQuery.
apps/client/src/common/utils/dateConfig.ts Enhanced millisToDelayString function to format time delays more accurately.
apps/client/src/features/rundown/Rundown.tsx Updated Rundown component to accept a new report prop for displaying event data.
apps/client/src/features/rundown/RundownEntry.tsx Added optional overUnder prop to RundownEntryProps for event data.
apps/client/src/features/rundown/RundownWrapper.tsx Modified to use useReport and pass report data to the Rundown component.
apps/client/src/features/rundown/event-block/EventBlock.module.scss Updated CSS grid layout to include a new area for over/under displays.
apps/client/src/features/rundown/event-block/EventBlock.tsx Added overUnder prop to EventBlockProps for more flexible event handling.
apps/client/src/features/rundown/event-block/EventBlockInner.tsx Introduced overUnder prop to display additional event timing information with tooltip.
apps/server/src/api-data/rundown/rundown.controller.ts Added getReport function for generating report responses.
apps/server/src/api-data/rundown/rundown.router.ts Introduced a new route handler for /report endpoint.
apps/server/src/services/report-service/ReportService.ts Implemented report management functions, including generate and event logging for start/stop actions.
apps/server/src/services/report-service/__test__/reportService.test.ts Added tests for ReportService functions to ensure correct report generation.
apps/server/src/stores/runtimeState.ts Integrated reporting functions into runtime state management to log event starts and stops.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    participant ReportService
    participant RuntimeState

    Client->>API: Request report data
    API->>ReportService: Call getReport()
    ReportService->>API: Return report data
    API->>Client: Send report data

    Client->>RuntimeState: Start event
    RuntimeState->>ReportService: Call eventStart()
    RuntimeState->>RuntimeState: Event starts

    Client->>RuntimeState: Stop event
    RuntimeState->>ReportService: Call eventStop()
    RuntimeState->>RuntimeState: Event ends
Loading
sequenceDiagram
    participant Client
    participant RundownWrapper
    participant useReport
    participant Rundown

    Client->>RundownWrapper: Request Rundown
    RundownWrapper->>useReport: Fetch report data
    useReport->>RundownWrapper: Return report data
    RundownWrapper->>Rundown: Render with report data
Loading

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.

@alex-Arc
Copy link
Collaborator Author

@coderabbitai summary

Copy link
Contributor

coderabbitai bot commented Jul 31, 2024

Actions performed

Summary regeneration triggered.

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.

1 participant