Skip to content

Conversation

@VISHNU7KASIREDDY
Copy link

@VISHNU7KASIREDDY VISHNU7KASIREDDY commented Dec 3, 2025

Fix: Correct typo in property name resopnseTimeMsresponseTimeMs

Summary of Changes

This PR fixes a widespread typo in the codebase where the property name resopnseTimeMs (misspelled) was used instead of the correct responseTimeMs throughout the request handling system.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Code quality improvement

The Problem

The property resopnseTimeMs in the GraphQLResponseData interface and its implementations contained a typo - "resopnse" instead of "response". This typo was propagated across:

  • Type definition: GraphQLResponseData interface in types.ts
  • Implementation files: 4 request handler files (http.ts, action-cable.ts, utils.ts) and 1 service file (gql.service.ts)
  • Test files: 3 test specification files with 25 test expectations
  • Total occurrences: 30 instances across 9 files

While this typo didn't cause functional issues (the property worked as intended), it affects:

  • Code readability and professionalism
  • Maintainability
  • Potential confusion for contributors

The Solution

The fix systematically renames all occurrences of resopnseTimeMs to the correctly spelled responseTimeMs:

Files Modified

Core Package (altair-core):

  • src/request/types.ts - Type definition
  • src/request/utils.ts - Response observer implementation
  • src/request/handlers/http.ts - HTTP request handler
  • src/request/handlers/action-cable.ts - Action Cable handler
  • src/request/adapters.spec.ts - Adapter tests (4 occurrences)
  • src/request/handlers/http.spec.ts - HTTP handler tests (16 occurrences)

App Package (altair-app):

  • src/app/modules/altair/services/gql/gql.service.ts - GQL service
  • src/app/modules/altair/services/gql/gql.service.spec.ts - GQL service tests (5 occurrences)

Changes Summary

  • 8 files changed
  • 30 insertions(+)
  • 30 deletions(-)

Testing

All existing tests have been updated to use the corrected property name. The fix is purely a rename operation with no logic changes, so:

  • ✅ All existing test cases continue to validate the same functionality
  • ✅ Type checking passes with the updated interface
  • ✅ No breaking changes to the API (internal property only)

Verification Commands

# Verify no instances of the typo remain
grep -r "resopnseTimeMs" packages/altair-core packages/altair-app --include="*.ts"
# Should return 0 results

# Verify correct spelling is used
grep -r "responseTimeMs" packages/altair-core packages/altair-app --include="*.ts"
# Should return 30 results

# Run tests
cd packages/altair-core && pnpm test
cd packages/altair-app && pnpm test

Additional Notes

This is a simple typo fix that improves code quality without any functional changes. The property is internal to the response handling system and not exposed in the public API, so there are no breaking changes for users of the library.Fixed widespread typo where 'resopnseTimeMs' was misspelled throughout the codebase. The correct spelling 'responseTimeMs' is now used consistently across all type definitions, implementations, and tests.

Changes:

  • Updated GraphQLResponseData interface in types.ts
  • Fixed property assignments in request handlers (http, action-cable, utils)
  • Updated gql.service.ts property access
  • Corrected all test expectations (30 total occurrences across 9 files)

This is a code quality improvement with no functional changes.

Fixes

Checks

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

Changes proposed in this pull request:

Summary by Sourcery

Correct the misspelled response time property across request handling and related services to use a consistently named responseTimeMs field.

Bug Fixes:

  • Fix inconsistent response timing field name by renaming resopnseTimeMs to responseTimeMs in request handlers and related services.

Enhancements:

  • Improve code readability and maintainability by standardizing the GraphQL response timing property name in core types and utilities.

Tests:

  • Update HTTP handler, adapter, and GqlService tests to assert the corrected responseTimeMs property name.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected a property name in GraphQL response data returned by request handlers and adapters, ensuring consistent and accurate response metadata across all request types.

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

Fixed widespread typo where 'resopnseTimeMs' was misspelled throughout
the codebase. The correct spelling 'responseTimeMs' is now used consistently
across all type definitions, implementations, and tests.

Changes:
- Updated GraphQLResponseData interface in types.ts
- Fixed property assignments in request handlers (http, action-cable, utils)
- Updated gql.service.ts property access
- Corrected all test expectations (30 total occurrences across 9 files)

This is a code quality improvement with no functional changes.
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 3, 2025

Reviewer's Guide

Renames the misspelled GraphQL response timing field resopnseTimeMs to responseTimeMs across the core request types, handlers, shared utilities, and app service/tests, keeping behavior identical while improving consistency and readability.

Class diagram for updated GraphQLResponseData timing field usage

classDiagram

class GraphQLResponseData {
  +boolean ok
  +number status
  +string statusText
  +string url
  +number requestStartTimestamp
  +number requestEndTimestamp
  +number responseTimeMs
}

class GraphQLRequestHandler {
  <<interface>>
  +execute(request) Observable~GraphQLResponseData~
}

class HttpRequestHandler {
  +execute(request) Observable~GraphQLResponseData~
}

class ActionCableRequestHandler {
  +execute(request) Observable~GraphQLResponseData~
}

class SimpleResponseObserver {
  +next(response) void
  +error(error) void
  +complete() void
}

class GqlService {
  +sendRequest(request) Observable~RequestStats~
}

class RequestStats {
  +string url
  +number requestStartTime
  +number requestEndTime
  +number responseTime
}

GraphQLRequestHandler <|.. HttpRequestHandler
GraphQLRequestHandler <|.. ActionCableRequestHandler

HttpRequestHandler --> GraphQLResponseData : produces
ActionCableRequestHandler --> GraphQLResponseData : produces
SimpleResponseObserver --> GraphQLResponseData : wraps
GqlService --> GraphQLResponseData : consumes
GqlService --> RequestStats : maps
Loading

File-Level Changes

Change Details Files
Rename GraphQL response timing field from resopnseTimeMs to responseTimeMs across core request types, implementations, and observers.
  • Update GraphQLResponseData interface to expose responseTimeMs instead of resopnseTimeMs.
  • Adjust HTTP and Action Cable request handlers to compute and populate responseTimeMs on response objects.
  • Update the shared simpleResponseObserver utility to emit responseTimeMs on observed responses.
packages/altair-core/src/request/types.ts
packages/altair-core/src/request/handlers/http.ts
packages/altair-core/src/request/handlers/action-cable.ts
packages/altair-core/src/request/utils.ts
Align app layer service code and all tests with the renamed responseTimeMs property.
  • Update GqlService to read response.responseTimeMs when mapping response metadata into its own telemetry structure.
  • Adjust adapter, HTTP handler, and GQL service tests to assert on responseTimeMs instead of resopnseTimeMs, preserving existing behavioral expectations.
packages/altair-app/src/app/modules/altair/services/gql/gql.service.ts
packages/altair-app/src/app/modules/altair/services/gql/gql.service.spec.ts
packages/altair-core/src/request/adapters.spec.ts
packages/altair-core/src/request/handlers/http.spec.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

@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 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

This PR corrects a repeated typo by renaming the GraphQL response field resopnseTimeMs to responseTimeMs across types, handlers, utilities, and tests in both altair-core and altair-app packages.

Changes

Cohort / File(s) Summary
Core type definition
packages/altair-core/src/request/types.ts
Renamed GraphQLResponseData.resopnseTimeMsresponseTimeMs (type signature changed).
Request handlers
packages/altair-core/src/request/handlers/http.ts, packages/altair-core/src/request/handlers/action-cable.ts
Updated emitted response payloads to use responseTimeMs instead of resopnseTimeMs.
Utilities and adapters
packages/altair-core/src/request/utils.ts, packages/altair-core/src/request/adapters.spec.ts
Corrected emitted payload and test fixtures to responseTimeMs.
HTTP handler tests
packages/altair-core/src/request/handlers/http.spec.ts
Updated test expectations to assert responseTimeMs.
GQL service layer
packages/altair-app/src/app/modules/altair/services/gql/gql.service.ts, packages/altair-app/src/app/modules/altair/services/gql/gql.service.spec.ts
Fixed mapping and test fixtures to use responseTimeMs (typo correction).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check consistency of the renamed property across all files and test fixtures.
  • Verify exported type change in packages/altair-core/src/request/types.ts is intentionally coordinated with all consumers.
  • Run unit tests that reference GraphQL response payloads (handlers, utils, service specs).

Poem

🐰 I hopped through code at break of dawn,
Found a typo lingering on and on.
I nudged one letter, neat and spry,
Now responseTimeMs waves hello—hi! 🥕

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 clearly and specifically summarizes the main change: fixing a widespread typo in a property name across the codebase from 'resopnseTimeMs' to 'responseTimeMs'.
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

📜 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 6ecebe4 and 7027437.

📒 Files selected for processing (1)
  • packages/altair-app/src/app/modules/altair/services/gql/gql.service.spec.ts (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/altair-app/src/app/modules/altair/services/gql/gql.service.spec.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). (1)
  • GitHub Check: Sourcery review

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.

@gemini-code-assist
Copy link

Summary of Changes

Hello @VISHNU7KASIREDDY, 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 addresses a pervasive typo in the codebase, specifically renaming the resopnseTimeMs property to responseTimeMs. This change impacts type definitions, request handlers, service files, and numerous test cases, ensuring consistency and improving overall code quality and maintainability without altering any existing functionality or introducing breaking changes.

Highlights

  • Typo Correction: The widespread misspelling of the property name resopnseTimeMs has been corrected to responseTimeMs across the entire codebase.
  • Code Quality Improvement: This change enhances code readability, professionalism, and maintainability by standardizing the property name.
  • No Functional Impact: The fix is purely a rename operation, introducing no functional changes, breaking API changes, or regressions.
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.

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 there - I've reviewed your changes and they look great!


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 fixes a typo in the responseTimeMs property across the codebase. The change is applied consistently in type definitions, implementations, and tests. While reviewing, I noticed a minor inconsistency in the mock data within one of the test files, where the responseTimeMs is not correctly calculated from the start and end timestamps. I've left a comment with a suggestion to fix it. Overall, this is a good code quality improvement.

Changed responseTimeMs from 1.5 to 1 to match the difference between
requestEndTimestamp (2) and requestStartTimestamp (1) in test mock data.
@VISHNU7KASIREDDY
Copy link
Author

@SimonCropp @salbertson @paulomcnally @sasharevzin ,please review you this when you are free ,Thanks for your time 😊.

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