-
-
Notifications
You must be signed in to change notification settings - Fork 382
fix: correct typo in property name resopnseTimeMs → responseTimeMsfix: correct typo in property name resopnseTimeMs → responseTimeMs #2954
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
base: master
Are you sure you want to change the base?
Conversation
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.
Reviewer's GuideRenames the misspelled GraphQL response timing field Class diagram for updated GraphQLResponseData timing field usageclassDiagram
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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughThis PR corrects a repeated typo by renaming the GraphQL response field Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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. Comment |
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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.
packages/altair-app/src/app/modules/altair/services/gql/gql.service.spec.ts
Outdated
Show resolved
Hide resolved
Changed responseTimeMs from 1.5 to 1 to match the difference between requestEndTimestamp (2) and requestStartTimestamp (1) in test mock data.
|
@SimonCropp @salbertson @paulomcnally @sasharevzin ,please review you this when you are free ,Thanks for your time 😊. |
Fix: Correct typo in property name
resopnseTimeMs→responseTimeMsSummary of Changes
This PR fixes a widespread typo in the codebase where the property name
resopnseTimeMs(misspelled) was used instead of the correctresponseTimeMsthroughout the request handling system.Type of Change
The Problem
The property
resopnseTimeMsin theGraphQLResponseDatainterface and its implementations contained a typo - "resopnse" instead of "response". This typo was propagated across:GraphQLResponseDatainterface intypes.tshttp.ts,action-cable.ts,utils.ts) and 1 service file (gql.service.ts)While this typo didn't cause functional issues (the property worked as intended), it affects:
The Solution
The fix systematically renames all occurrences of
resopnseTimeMsto the correctly spelledresponseTimeMs:Files Modified
Core Package (
altair-core):src/request/types.ts- Type definitionsrc/request/utils.ts- Response observer implementationsrc/request/handlers/http.ts- HTTP request handlersrc/request/handlers/action-cable.ts- Action Cable handlersrc/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 servicesrc/app/modules/altair/services/gql/gql.service.spec.ts- GQL service tests (5 occurrences)Changes Summary
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:
Verification Commands
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:
This is a code quality improvement with no functional changes.
Fixes
Checks
yarn test-buildChanges 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:
Enhancements:
Tests:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.