vatis icon indicating copy to clipboard operation
vatis copied to clipboard

[Feature Request] Following Other Atis

Open ml0130 opened this issue 3 years ago • 3 comments

With the addition of issue #53. I would like to suggest an option in either Composite List or in the main ATIS window to be able to follow X amount of ATIS that arent being hosted by the user directly. Even though there is this ability in the scopes. But I see this being usfull because I know at least in the US there are several airports that APP/DEP controllers would need to issue these atis to the pilot even if its not a field they control.

ml0130 avatar May 24 '22 18:05 ml0130

Walkthrough

The changes introduce a new feature for retrieving digital ATIS (Automatic Terminal Information Service) letters in the vATIS desktop application. A new set of data transfer objects (DTOs) and methods have been added to support fetching ATIS letters through a hub connection. The implementation includes modifications to view models, networking components, and the user interface to enable retrieving ATIS letters via a new command and keyboard shortcut.

Changes

File Change Summary
vATIS.Desktop/Networking/AtisHub/AtisHubConnection.cs Added GetDigitalAtisLetter method to retrieve ATIS letter
vATIS.Desktop/Networking/AtisHub/Dto/DigitalAtisRequestDto.cs New DTO for digital ATIS request with Id and AtisType properties
vATIS.Desktop/Networking/AtisHub/Dto/DigitalAtisResponseDto.cs New DTO for digital ATIS response with Airport, AtisType, AtisLetter, and Body properties
vATIS.Desktop/Networking/AtisHub/IAtisHubConnection.cs Added GetDigitalAtisLetter method to interface
vATIS.Desktop/Networking/AtisHub/MockAtisHubConnection.cs Added GetDigitalAtisLetter method with HTTP request logic
vATIS.Desktop/ServiceProvider.cs Updated CreateAtisHubConnection to include IDownloader service
vATIS.Desktop/SourceGenerationContext.cs Added JSON serialization support for new DTOs
vATIS.Desktop/Ui/ViewModels/AtisStationViewModel.cs Added AtisType property and SetAtisLetterCommand
vATIS.Desktop/Ui/ViewModels/MainWindowViewModel.cs Added GetDigitalAtisLetterCommand and HandleGetDigitalAtisLetter method
vATIS.Desktop/Ui/Windows/MainWindow.axaml Added Ctrl+D key binding for GetDigitalAtisLetterCommand

Sequence Diagram

sequenceDiagram
    participant User
    participant MainWindow
    participant MainWindowViewModel
    participant AtisHubConnection
    participant MockAtisHubConnection

    User->>MainWindow: Press Ctrl+D
    MainWindow->>MainWindowViewModel: Trigger GetDigitalAtisLetterCommand
    MainWindowViewModel->>AtisHubConnection: GetDigitalAtisLetter(requestDto)
    AtisHubConnection->>MockAtisHubConnection: GetDigitalAtisLetter(requestDto)
    MockAtisHubConnection-->>AtisHubConnection: Return ATIS Letter
    AtisHubConnection-->>MainWindowViewModel: Return ATIS Letter
    MainWindowViewModel->>AtisStationViewModel: Set ATIS Letter

Possibly related PRs

  • #49: The changes in this PR involve modifications to how the ATIS letter is handled in response to client queries, which is directly related to the new GetDigitalAtisLetter method added in the main PR. Both involve the ATIS letter functionality.
  • #51: This PR introduces a new method for generating a hub token and updates the AtisHubConnection class to utilize this token, which is relevant as the main PR's new method GetDigitalAtisLetter is part of the AtisHubConnection class and may rely on the connection being properly authenticated.

Poem

🐰 A digital ATIS letter quest,
Ctrl+D pressed with rabbit zest!
Bytes and signals dance with glee,
Fetching letters, wild and free,
vATIS magic, hop hooray! 🚁


📜 Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b60e604c0c47255e519b2f2d76d9393ec75d92f8 and df23700c222aff1f5c2a5aa4dd16b86e45e4cf13.

📒 Files selected for processing (3)
  • vATIS.Desktop/Networking/AtisHub/AtisHubConnection.cs (2 hunks)
  • vATIS.Desktop/ServiceProvider.cs (1 hunks)
  • vATIS.Desktop/Ui/ViewModels/AtisStationViewModel.cs (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • vATIS.Desktop/ServiceProvider.cs
  • vATIS.Desktop/Networking/AtisHub/AtisHubConnection.cs
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (windows-latest)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: Analyze (csharp)
  • GitHub Check: build (ubuntu-latest)
🔇 Additional comments (3)
vATIS.Desktop/Ui/ViewModels/AtisStationViewModel.cs (3)

216-217: LGTM!

The AtisType property is well-implemented as a read-only property using expression-bodied member syntax.


230-230: LGTM!

The SetAtisLetterCommand property follows ReactiveUI command conventions and is properly initialized in the constructor.


378-384: LGTM! Past review feedback has been addressed.

The HandleSetAtisLetter method correctly validates the input letter against the station's code range as suggested in the previous review.


🪧 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>, please review it.
    • 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 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 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 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. (Beta)
  • @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.

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.

coderabbitai[bot] avatar Jan 10 '25 00:01 coderabbitai[bot]