Skip to content

Conversation

@pujitm
Copy link
Member

@pujitm pujitm commented Feb 27, 2025

Summary by CodeRabbit

  • New Features
    • Enhanced connection settings with an updated UI, including a new custom element <unraid-connect-settings>.
    • Introduced several new form components (e.g., NumberField, StringArrayField, Select, Switch, PreconditionsLabel, ControlLayout, and VerticalLayout) for a more dynamic experience.
    • Added a notification system with the Toaster component for user feedback.
    • New GraphQL operations for managing connection settings and API updates.
  • Chores
    • Upgraded multiple backend and frontend dependencies and refined configuration files.
  • Tests
    • Expanded test coverage for CSV conversion, form settings merging, and the new csvStringToArray function.
  • Documentation
    • Added introductory documentation for form components and a readme for the forms directory.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2025

Walkthrough

This pull request makes numerous changes across backend and frontend layers. It updates environment files, dependency versions, and GraphQL schemas while introducing new types, services, and mutations for managing connection settings. The API now leverages a dedicated ConnectSettings service and resolver methods, and tests have been added or removed accordingly. On the frontend, several new Vue components, including form controls and custom renderers, have been introduced, with corresponding updates to configuration files and build scripts.

Changes

File(s) Change Summary
api/.env.production, web/.env.production Added newline/formatting adjustments.
api/package.json, unraid-ui/package.json, web/package.json Updated dependency versions and added new packages (@jsonforms/core, @internationalized/number, etc.), including a TypeScript update.
api/src/graphql/schema/types/connect/connect.graphql Introduced new types (ConnectSettingsValues, ApiSettingsInput, ConnectSettings), added a new field settings to Connect, and defined mutation updateApiSettings.
web/codegen.ts, web/composables/gql/gql.ts, web/composables/gql/graphql.ts Modified scalar type for JSON and added new GraphQL query/mutation types and overloads for connection settings.
api/src/unraid-api/graph/connect/connect-settings.service.ts
api/src/unraid-api/graph/connect/connect.resolver.ts
api/src/unraid-api/graph/graph.module.ts
api/src/unraid-api/graph/resolvers/resolvers.module.ts
Added new ConnectSettingsService, updated ConnectResolver with settings and updateApiSettings methods, and registered the service in module providers.
plugin/source/dynamix.unraid.net/.../Connect.page Replaced an existing form with a new custom HTML element <unraid-connect-settings>.
unraid-ui/src/components/brand/BrandButton.vue
unraid-ui/src/components/form/number/*
unraid-ui/src/index.ts
Modified component props for type safety and added new Vue components for number fields.
web/components/ConnectSettings/* Updated components to use new UI elements (BrandButton, Input) and integrated Apollo GraphQL operations for dynamic settings management.
unraid-ui/src/forms/* (multiple files) Introduced new form components (ControlLayout, NumberField variants, PreconditionsLabel, Select, StringArrayField, Switch, VerticalLayout), JSONForms related type declarations, renderers, and configuration files.
web/nuxt.config.ts, web/scripts/deploy-dev.sh, web/tailwind.config.ts Updated module configuration, adjusted deployment paths, and made minor formatting changes.
Other files (e.g., api/src/unraid-api/main.ts, api/src/unraid-api/auth/user.decorator.ts, theme preset, timestamp fixtures, and tests) Minor import path adjustments, type enhancements, timestamp updates, and new tests for utility functions and JSONForms slice merging.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant R as ConnectResolver
    participant S as ConnectSettingsService
    C->>R: Query settings
    R->>S: buildSettingsSchema()
    S-->>R: Settings schema with values
    R-->>C: Return settings response
Loading
sequenceDiagram
    participant C as Client
    participant R as ConnectResolver
    participant S as ConnectSettingsService
    C->>R: Mutation updateApiSettings(input)
    R->>S: syncSettings(input)
    S-->>R: Updated settings
    R-->>C: Return ConnectSettingsValues
Loading

Suggested reviewers

  • mdatelle
  • elibosley
  • zackspear

Poem

In lines of code a story's told,
New paths and types in forms unfold,
A service spins its settings true,
Frontend and APIs work anew,
With each commit our code takes flight 🚀
A digital dance in the soft glow of night!
Happy coding, keep the changes bright!


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

@pujitm pujitm force-pushed the feat/connect-settings branch from d61e619 to 48d2c6d Compare March 6, 2025 18:33
@pujitm pujitm force-pushed the feat/connect-settings branch from c64ad7d to e0f2add Compare March 6, 2025 18:44
pujitm pushed a commit that referenced this pull request Mar 18, 2025
🤖 I have created a release *beep* *boop*
---


## [4.2.0](v4.1.3...v4.2.0)
(2025-03-18)


### Features

* add resolver for logging
([#1222](#1222))
([2d90408](2d90408))
* connect settings web component
([#1211](#1211))
([653de00](653de00))
* improve local dev with install path
([#1221](#1221))
([32c5b0a](32c5b0a))
* split plugin builds
([4d10966](4d10966))
* swap to absolute paths for css
([#1224](#1224))
([6f9fa10](6f9fa10))
* update theme application logic and color picker
([#1181](#1181))
([c352f49](c352f49))
* use patch version if needed on update check
([#1227](#1227))
([6ed46b3](6ed46b3))


### Bug Fixes

* add INELIGIBLE state to ConfigErrorState enum
([#1220](#1220))
([1f00212](1f00212))
* **api:** dynamix notifications dir during development
([#1216](#1216))
([0a382ca](0a382ca))
* **api:** type imports from generated graphql types
([#1215](#1215))
([fd02297](fd02297))
* **deps:** update dependency @nestjs/schedule to v5
([#1197](#1197))
([b1ff6e5](b1ff6e5))
* **deps:** update dependency @vueuse/core to v12
([#1199](#1199))
([d8b8339](d8b8339))
* fix changelog thing again
([2426345](2426345))
* fix invalid path to node with sh execution
([#1213](#1213))
([d12448d](d12448d))
* load tag correctly
([acd692b](acd692b))
* log errors
([629feda](629feda))
* one-command dev & web env files
([#1214](#1214))
([8218fab](8218fab))
* re-release fixed
([bb526b5](bb526b5))
* recreate watcher on path change
([#1203](#1203))
([5a9154e](5a9154e))
* update brand loading variants for consistent sizing
([#1223](#1223))
([d7a4b98](d7a4b98))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants