Skip to content

Conversation

@imolorhe
Copy link
Collaborator

@imolorhe imolorhe commented Dec 23, 2025

Fixes

#2971

Checks

  • Ran yarn test-build
  • Updated relevant documentations
  • Updated matching config options in altair-static

Changes proposed in this pull request:

Summary by Sourcery

Allow configuration options for initial subscriptions payload and initial app settings to be explicitly null in the Altair config schema.

Enhancements:

  • Relax validation schema to accept null for initialSubscriptionsPayload connection params.
  • Relax validation schema to accept null for initialSettings configuration.

Summary by CodeRabbit

  • Bug Fixes
    • Configuration schema now accepts null for the initial subscriptions payload and for initial settings, allowing more flexible startup configurations and preventing validation failures when those values are intentionally null.

✏️ Tip: You can customize this high-level summary in your review settings.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 23, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Allows both initialSettings and initialSubscriptionsPayload configuration options to explicitly accept null values in addition to being optional, aligning the schema with use cases where these fields may be intentionally set to null.

Class diagram for updated nullable config option schemas

classDiagram
    class AltairWindowOptionsSchema {
        <<schema>>
        record initialSubscriptionsPayload optional nullable
    }

    class AltairConfigOptionsSchema {
        <<schema>>
        SettingsSchema initialSettings optional nullable
    }

    AltairConfigOptionsSchema --|> AltairWindowOptionsSchema
Loading

File-Level Changes

Change Details Files
Allow null values for initial subscriptions payload configuration option.
  • Extend the zod schema for the subscriptions payload to accept null in addition to existing record shape.
  • Preserve the field as optional while adding nullability so the key can be omitted or set to null.
packages/altair-core/src/config/options.schema.ts
Allow null values for initial settings configuration option.
  • Extend the settings schema to accept null alongside the partial settings object.
  • Keep the initial settings option optional while enabling explicit null assignments.
packages/altair-core/src/config/options.schema.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gemini-code-assist
Copy link

Summary of Changes

Hello @imolorhe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the flexibility of the application's configuration by modifying the schema for initialSettings and initialSubscriptionsPayload. By making these properties explicitly nullable, the system can now properly handle scenarios where these initial values are intentionally set to null, providing clearer state management and preventing potential issues related to undefined or missing configurations.

Highlights

  • Schema Updates: The initialSubscriptionsPayload configuration option has been updated in the schema to explicitly allow null as a valid value, in addition to being optional.
  • Schema Updates: The initialSettings configuration option has also been updated in the schema to explicitly allow null as a valid value, providing more flexibility for its initial state.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Schema validators in the Altair core configuration module were updated to accept null for two optional fields: initialSubscriptionsPayload and initialSettings, by adding .nullable() to their existing validator chains.

Changes

Cohort / File(s) Change Summary
Schema nullable modifications
packages/altair-core/src/config/options.schema.ts
initialSubscriptionsPayload in altairWindowOptionsSchema: changed from .optional() to .optional().nullable(). initialSettings in altairConfigOptionsSchema: changed from .partial() to .partial().nullable(). Both fields remain optional but now accept null.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: making initialSettings and initialSubscriptionsPayload nullable in the schema configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch imolorhe/make-settings-sub-payload-nullable

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 675711d and 2d9e304.

📒 Files selected for processing (1)
  • packages/altair-core/src/config/options.schema.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.github/instructions/app-testing.instructions.md)

Follow project code style using ESLint and Prettier

**/*.ts: Use explicit type annotations for function parameters and return types
Prefer interfaces over type aliases for object shapes
Use union types and literal types for better type safety
Leverage generic types for reusable components
Group imports: external libraries first, then internal modules
Use absolute imports from package roots when possible
Prefer named exports over default exports
Use custom error classes that extend Error
Implement proper error boundaries and handling
Log errors with sufficient context for debugging
Use observables (RxJS) for reactive programming patterns where appropriate
Manage subscriptions to avoid memory leaks
Use appropriate RxJS operators for data transformation
Handle errors in observable streams
Use async/await for sequential operations
Handle promise rejections properly
Use Promise.all() for concurrent operations
Implement timeout handling for long-running operations
Dispose of resources properly (subscriptions, event listeners)
Use weak references where appropriate
Avoid creating unnecessary objects in hot paths
Profile memory usage for performance-critical code
Use tree-shaking-friendly imports
Lazy load heavy modules when possible
Monitor bundle size impacts of new dependencies
Use dynamic imports for code splitting
Validate and sanitize all user inputs
Implement proper XSS and injection prevention
Validate API responses before processing
Sanitize sensitive data in logs
Follow secure coding practices
Group related functionality in modules
Keep files focused and not too large
Use consistent naming conventions
Organize imports and exports clearly
Write JSDoc comments for public APIs
Keep documentation up to date with code changes (inline docs)
Use meaningful variable and function names
Handle environment-specific APIs properly
Use TypeScript features appropriate for the configured version

Files:

  • packages/altair-core/src/config/options.schema.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/main.instructions.md)

Use TypeScript for implementation across the codebase

Files:

  • packages/altair-core/src/config/options.schema.ts
packages/altair-core/**/*.ts

📄 CodeRabbit inference engine (.github/instructions/main.instructions.md)

Modify shared logic/types/utilities in packages/altair-core carefully, as changes impact multiple packages; ensure thorough testing

Files:

  • packages/altair-core/src/config/options.schema.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/config/**/*.ts : Validate configuration on startup
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/**/*.dto.ts : Use class-validator decorators for input validation in DTOs
📚 Learning: 2025-10-03T16:39:27.517Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/main.instructions.md:0-0
Timestamp: 2025-10-03T16:39:27.517Z
Learning: Applies to packages/altair-core/**/*.ts : Modify shared logic/types/utilities in packages/altair-core carefully, as changes impact multiple packages; ensure thorough testing

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/config/**/*.ts : Validate configuration on startup

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:39:27.517Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/main.instructions.md:0-0
Timestamp: 2025-10-03T16:39:27.517Z
Learning: Applies to packages/altair-db/**/*.ts : Keep database-related utilities in TypeScript aligned with Prisma usage in packages/altair-db

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/config/**/*.ts : Use type-safe configuration classes

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/**/*.{service,repository}.ts : Use appropriate Prisma query options (select, include, where)

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:41:45.498Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/testing.instructions.md:0-0
Timestamp: 2025-10-03T16:41:45.498Z
Learning: Applies to packages/altair-app/**/*.{test,spec}.ts : In components, test methods, business logic, event emissions, state changes, lifecycle, and integration with injected services

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/**/*.{dto,pipe}.ts : Validate all input data

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/**/*.controller.ts : Keep API documentation up to date with endpoints

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-09-24T19:40:17.905Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/app-testing.instructions.md:0-0
Timestamp: 2025-09-24T19:40:17.905Z
Learning: Applies to packages/altair-app/src/app/modules/altair/components/**/*.spec.ts : Test state management and property changes of components

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-05-29T13:44:11.906Z
Learnt from: imolorhe
Repo: altair-graphql/altair PR: 2835
File: packages/altair-api-utils/src/query.ts:7-10
Timestamp: 2025-05-29T13:44:11.906Z
Learning: For Prisma JSON type compatibility in packages/altair-api-utils/src/query.ts, the authorizationData property requires the `any` type rather than `unknown` due to specific typing constraints with Prisma's JSON type handling.

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: tauri / tauri (ubuntu-22.04)
  • GitHub Check: electron / electron (ubuntu-latest)
  • GitHub Check: tauri / tauri (windows-latest)
  • GitHub Check: tauri / tauri (macos-latest, --target x86_64-apple-darwin)
  • GitHub Check: electron / electron (windows-latest)
  • GitHub Check: electron / electron (macos-latest)
  • GitHub Check: tauri / tauri (macos-latest, --target aarch64-apple-darwin)
  • GitHub Check: docker / docker
  • GitHub Check: tests / e2e-test (macos-latest)
  • GitHub Check: tests / test (macos-latest)
  • GitHub Check: tests / api-e2e-test
  • GitHub Check: tests / e2e-test (ubuntu-latest)
  • GitHub Check: tests / test (ubuntu-latest)
  • GitHub Check: Sourcery review
  • GitHub Check: build_and_preview
🔇 Additional comments (2)
packages/altair-core/src/config/options.schema.ts (2)

196-200: Schema change is correct; null handling already properly implemented.

The .nullable() addition correctly allows explicit null values for initialSettings. The chaining pattern .partial().optional().nullable() is appropriate and consistent.

The settings initialization code in packages/altair-app/src/app/modules/altair/store/settings/settings.reducer.ts already handles both null and undefined properly via the nullish coalescing operator: altairConfig.options.initialSettings ?? {}. This converts both values to an empty object during parsing, which is the correct semantic for "no initial settings override."


104-107: Schema changes are correct and properly integrated.

The additions of .nullable() to both initialSubscriptionsPayload and initialSettings are syntactically correct and follow Zod patterns appropriately. Verification of downstream consumers confirms that existing code already handles null values correctly:

  • query.reducer.ts (line 46-48): Falsy check correctly treats null and undefined identically, falling back to '{}'
  • settings.reducer.ts (line 10-11): Nullish coalescing operator correctly treats null and undefined identically, falling back to {}
  • altair.component.ts (line 343-345): Falsy check correctly treats null and undefined identically, falling back to undefined

The changes maintain backward compatibility and are well-integrated across the packages that consume these options.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The chaining order of .optional() and .nullable() is inconsistent between initialSubscriptionsPayload (.optional().nullable()) and initialSettings (.partial().nullable().optional()); consider standardizing the order to ensure the resulting types are consistent and match your intended null | undefined behavior.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The chaining order of `.optional()` and `.nullable()` is inconsistent between `initialSubscriptionsPayload` (`.optional().nullable()`) and `initialSettings` (`.partial().nullable().optional()`); consider standardizing the order to ensure the resulting types are consistent and match your intended `null | undefined` behavior.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly makes initialSettings and initialSubscriptionsPayload nullable in the configuration schema, which aligns with the goal of providing more flexible configuration options. The changes are straightforward and the use cases in the reducers handle the new nullable values correctly. I have one minor suggestion to improve code consistency in the schema definition.

Comment on lines 196 to 200
initialSettings: settingsSchema
.partial()
.nullable()
.meta({ description: 'Initial app settings to use' })
.optional(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with how other schemas are defined in this file, and with the other change in this PR for initialSubscriptionsPayload, it would be better to chain .nullable() after .optional(). This improves readability and maintainability by keeping a consistent order of schema modifiers.

Suggested change
initialSettings: settingsSchema
.partial()
.nullable()
.meta({ description: 'Initial app settings to use' })
.optional(),
initialSettings: settingsSchema
.partial()
.meta({ description: 'Initial app settings to use' })
.optional()
.nullable(),

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/altair-core/src/config/options.schema.ts (1)

1-246: Complete PR checklist before merging.

The checklist includes three items that need completion:

  1. Run yarn test-build to verify the build succeeds with schema changes
  2. Update relevant documentation to reflect the schema changes
  3. Ensure altair-core is properly built so altair-static receives updated schema validation

Note: altair-static imports altairConfigOptionsSchema from the built altair-core package and uses it for runtime validation (line 125 in index.ts). No separate type definitions need manual updating in altair-static—they inherit automatically via the imported types and schema from altair-core's build output.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ed1c94 and 675711d.

📒 Files selected for processing (1)
  • packages/altair-core/src/config/options.schema.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.github/instructions/app-testing.instructions.md)

Follow project code style using ESLint and Prettier

**/*.ts: Use explicit type annotations for function parameters and return types
Prefer interfaces over type aliases for object shapes
Use union types and literal types for better type safety
Leverage generic types for reusable components
Group imports: external libraries first, then internal modules
Use absolute imports from package roots when possible
Prefer named exports over default exports
Use custom error classes that extend Error
Implement proper error boundaries and handling
Log errors with sufficient context for debugging
Use observables (RxJS) for reactive programming patterns where appropriate
Manage subscriptions to avoid memory leaks
Use appropriate RxJS operators for data transformation
Handle errors in observable streams
Use async/await for sequential operations
Handle promise rejections properly
Use Promise.all() for concurrent operations
Implement timeout handling for long-running operations
Dispose of resources properly (subscriptions, event listeners)
Use weak references where appropriate
Avoid creating unnecessary objects in hot paths
Profile memory usage for performance-critical code
Use tree-shaking-friendly imports
Lazy load heavy modules when possible
Monitor bundle size impacts of new dependencies
Use dynamic imports for code splitting
Validate and sanitize all user inputs
Implement proper XSS and injection prevention
Validate API responses before processing
Sanitize sensitive data in logs
Follow secure coding practices
Group related functionality in modules
Keep files focused and not too large
Use consistent naming conventions
Organize imports and exports clearly
Write JSDoc comments for public APIs
Keep documentation up to date with code changes (inline docs)
Use meaningful variable and function names
Handle environment-specific APIs properly
Use TypeScript features appropriate for the configured version

Files:

  • packages/altair-core/src/config/options.schema.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/main.instructions.md)

Use TypeScript for implementation across the codebase

Files:

  • packages/altair-core/src/config/options.schema.ts
packages/altair-core/**/*.ts

📄 CodeRabbit inference engine (.github/instructions/main.instructions.md)

Modify shared logic/types/utilities in packages/altair-core carefully, as changes impact multiple packages; ensure thorough testing

Files:

  • packages/altair-core/src/config/options.schema.ts
🧠 Learnings (7)
📚 Learning: 2025-10-03T16:39:27.517Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/main.instructions.md:0-0
Timestamp: 2025-10-03T16:39:27.517Z
Learning: Applies to packages/altair-core/**/*.ts : Modify shared logic/types/utilities in packages/altair-core carefully, as changes impact multiple packages; ensure thorough testing

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/config/**/*.ts : Use type-safe configuration classes

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/config/**/*.ts : Validate configuration on startup

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:39:27.517Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/main.instructions.md:0-0
Timestamp: 2025-10-03T16:39:27.517Z
Learning: Applies to packages/altair-db/**/*.ts : Keep database-related utilities in TypeScript aligned with Prisma usage in packages/altair-db

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:40:52.954Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/nestjs-api.instructions.md:0-0
Timestamp: 2025-10-03T16:40:52.954Z
Learning: Applies to packages/altair-api/src/**/*.{service,repository}.ts : Use appropriate Prisma query options (select, include, where)

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-10-03T16:41:45.498Z
Learnt from: CR
Repo: altair-graphql/altair PR: 0
File: .github/instructions/testing.instructions.md:0-0
Timestamp: 2025-10-03T16:41:45.498Z
Learning: Applies to packages/altair-app/**/*.{test,spec}.ts : In components, test methods, business logic, event emissions, state changes, lifecycle, and integration with injected services

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
📚 Learning: 2025-05-29T13:44:11.906Z
Learnt from: imolorhe
Repo: altair-graphql/altair PR: 2835
File: packages/altair-api-utils/src/query.ts:7-10
Timestamp: 2025-05-29T13:44:11.906Z
Learning: For Prisma JSON type compatibility in packages/altair-api-utils/src/query.ts, the authorizationData property requires the `any` type rather than `unknown` due to specific typing constraints with Prisma's JSON type handling.

Applied to files:

  • packages/altair-core/src/config/options.schema.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: docker / docker
  • GitHub Check: tauri / tauri (macos-latest, --target x86_64-apple-darwin)
  • GitHub Check: tauri / tauri (macos-latest, --target aarch64-apple-darwin)
  • GitHub Check: electron / electron (macos-latest)
  • GitHub Check: electron / electron (windows-latest)
  • GitHub Check: tauri / tauri (windows-latest)
  • GitHub Check: tauri / tauri (ubuntu-22.04)
  • GitHub Check: electron / electron (ubuntu-latest)
  • GitHub Check: tests / e2e-test (macos-latest)
  • GitHub Check: tests / e2e-test (ubuntu-latest)
  • GitHub Check: tests / test (macos-latest)
  • GitHub Check: tests / test (ubuntu-latest)
  • GitHub Check: tests / api-e2e-test
  • GitHub Check: Sourcery review
  • GitHub Check: build_and_preview
🔇 Additional comments (2)
packages/altair-core/src/config/options.schema.ts (2)

104-107: Schema changes are syntactically correct and safely handled by consumers.

The addition of .nullable() correctly allows null values for both initialSubscriptionsPayload and initialSettings. All existing consumers use patterns (truthiness checks and nullish coalescing) that properly handle null values, making this a backward-compatible change.

Since this affects packages/altair-core, ensure thorough testing across all impacted packages.


196-200: Schema change is correct and consumers handle null properly.

The addition of .nullable() correctly allows null values for initialSettings. The .nullable() method accepts string | null, while .optional() accepts string | undefined, and .nullish() accepts string | null | undefined. The current chain .partial().nullable().optional() validates correctly and accepts null, undefined, or a partial settings object.

The consumer code in settings.reducer.ts already handles null values properly using the nullish coalescing operator (initialSettings ?? {}), falling back to an empty object if the value is null or undefined. Since this is in packages/altair-core, ensure all consumers continue to handle nullish values appropriately, though the existing pattern demonstrates proper null handling.

@github-actions
Copy link

github-actions bot commented Dec 23, 2025

Visit the preview URL for this PR (updated for commit 2d9e304):

https://altair-gql--pr2972-imolorhe-make-settin-cdd7cufo.web.app

(expires Tue, 30 Dec 2025 10:02:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 02d6323d75a99e532a38922862e269d63351a6cf

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.

2 participants