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

Dim volume dials when no voice connection is available #378

Merged
merged 3 commits into from
Jan 12, 2025

Conversation

neilenns
Copy link
Owner

@neilenns neilenns commented Jan 12, 2025

Fixes #374

Summary by CodeRabbit

  • New Features

    • Added Code Spell Checker extension recommendation
    • Expanded spell-checking dictionary with project-specific terms
  • Bug Fixes

    • Corrected typos in comments and variable names
    • Updated connection status handling in volume and station controllers
  • Refactor

    • Improved integration of track audio manager in volume controllers
    • Reorganized import statements
  • Documentation

    • Enhanced comments for clarity in various controllers

@neilenns neilenns added the enhancement Improvements to existing features label Jan 12, 2025
@neilenns neilenns self-assigned this Jan 12, 2025
Copy link

coderabbitai bot commented Jan 12, 2025

Walkthrough

This pull request introduces several modifications across different configuration and source files. The changes primarily focus on enhancing VSCode extension recommendations, expanding spell-checking configurations, and updating controller logic in the audio management system. The modifications involve adding a new spell-checker extension, updating custom dictionary words, and refactoring connection state handling in MainVolumeController and StationVolumeController classes by integrating trackAudioManager.

Changes

File Change Summary
.vscode/extensions.json Added "streetsidesoftware.code-spell-checker" to recommendations
.vscode/settings.json Expanded cSpell.words array with new project-specific terms
src/controllers/mainVolume.ts Integrated trackAudioManager, updated connection state checks, refined image and title refresh logic
src/controllers/stationStatus.ts Reorganized imports, corrected comment typos
src/controllers/stationVolume.ts Added trackAudioManager import, corrected typo in _unavailableTemplatePath, updated connection status handling

Possibly related PRs

Suggested labels

development

Poem

🐰 A Rabbit's Code Spell

Extensions bloom, words take flight,
Spell-checker joins our coding might,
Controllers dance with audio's grace,
Tracking connections, setting the pace,
Code evolves with each gentle leap! 🚀

Finishing Touches

  • 📝 Generate Docstrings (Beta)

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

Copy link

Build for this pull request:
StreamDeck-TrackAudio.zip

Copy link

@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

🧹 Nitpick comments (1)
.vscode/settings.json (1)

24-35: LGTM with a minor suggestion for consistency.

The additions to the spell-checker dictionary are relevant and will improve the development experience by reducing false-positive spelling errors for domain-specific terms.

Consider standardizing the casing of the words for better consistency. For example:

  • "Autopurge" vs "trackaudio" (capitalize both or neither)
  • "Callsign" vs "callsigns" (singular is capitalized, plural isn't)
   "cSpell.words": [
-    "Autopurge",
-    "Callsign",
+    "autopurge",
+    "callsign",
     "callsigns",
     "coms",
     "elgato",
     "stationstatus",
     "stationvolume",
     "streamdeck",
     "trackaudio",
-    "Typeguard"
+    "typeguard"
   ]
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 44e9c0f and c909c75.

⛔ Files ignored due to path filters (1)
  • com.neil-enns.trackaudio.sdPlugin/images/actions/stationVolume/template.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • .vscode/extensions.json (1 hunks)
  • .vscode/settings.json (1 hunks)
  • src/controllers/mainVolume.ts (3 hunks)
  • src/controllers/stationStatus.ts (4 hunks)
  • src/controllers/stationVolume.ts (6 hunks)
✅ Files skipped from review due to trivial changes (2)
  • src/controllers/stationStatus.ts
  • .vscode/extensions.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build, lint and pack
🔇 Additional comments (8)
src/controllers/mainVolume.ts (4)

4-4: LGTM!

Clean import of trackAudioManager to support voice connection state handling.


61-61: LGTM!

Documentation improvement enhances clarity.


155-161: LGTM!

Good implementation of voice connection state handling:

  • Uses trackAudioManager.isVoiceConnected for visual state
  • Consistently uses trackAudioManager.isConnected for template selection

166-179: LGTM!

Excellent implementation of the dimming functionality:

  • Consistently dims all UI elements (title, indicator, value) when voice connection is unavailable
  • Uses a clear color variable for maintainability
src/controllers/stationVolume.ts (4)

4-4: LGTM!

Clean import of trackAudioManager to support voice connection state handling.


25-25: LGTM!

Fixed typo in variable name (_unavilableTemplatePath → _unavailableTemplatePath).


227-236: LGTM!

Excellent implementation of voice connection state handling:

  • Clean early return pattern when voice connection is unavailable
  • Clear separation of concerns between connection and availability states
  • Consistent with MainVolumeController implementation

Line range hint 259-284: LGTM!

Strong implementation of the dimming functionality:

  • Comprehensive connection state checking
  • Consistent dimming behavior with MainVolumeController
  • Clear separation between disconnected and normal states

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set dial indicators to grey when not connected
1 participant