Skip to content

[ENGG-5057] fix: httpRequestTabs#4005

Merged
nafees87n merged 28 commits intomasterfrom
fix/httpRequestTabs
Dec 15, 2025
Merged

[ENGG-5057] fix: httpRequestTabs#4005
nafees87n merged 28 commits intomasterfrom
fix/httpRequestTabs

Conversation

@nafees87n
Copy link
Contributor

@nafees87n nafees87n commented Dec 11, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved error handling and logging for request content type processing and added null-safety when reading response timing.
  • Refactor

    • Removed the multi-tab request editor UI and its associated styling, consolidating request editing surfaces.

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

@linear
Copy link

linear bot commented Dec 11, 2025

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

Walkthrough

This PR removes the HttpRequestTabs component and its exported types from app/src/features/apiClient/screens/apiClient/components/views/components/request/components/RequestTabs/, and deletes the associated SCSS file for the request tabs. Separately, it modifies a different HttpRequestTabs implementation at app/src/features/apiClient/screens/apiClient/components/views/http/components/HttpRequestTabs/ by adding a getContentTypeWithAlert callback, Sentry captureException usage, defensive defaults for body, and adjusted hook dependencies. A minor null-safety change was also made in HttpClientView to use optional chaining when reading response time.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Mixed changes: full-file/component deletion + targeted runtime-safety edits in a separate component.
  • Areas needing attention:
    • Confirm no remaining references/imports to the deleted RequestTabs or its enum/props.
    • Verify Sentry captureException usage and that getContentTypeWithAlert dependency coverage is correct.
    • Ensure body defaulting and optional chaining do not alter intended behavior in edge cases.

Possibly related PRs

Suggested reviewers

  • RuntimeTerror10
  • rohanmathur91
  • TejaChitturi

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided; the author left it empty despite the template requiring sections like Summary of Changes, Demo Video, Checklist, and Test Instructions. Add a detailed description following the template, including what was changed and why, any demo if applicable, confirmation of checklist items, and test instructions.
Title check ❓ Inconclusive The title is vague and does not clearly convey what the fix addresses; it only references a ticket number and uses a generic 'fix' label without specifying the actual problem or solution. Clarify the title to describe the specific issue being fixed, such as 'Fix HttpRequestTabs component removal' or 'Remove deprecated HttpRequestTabs implementation'.
✅ Passed checks (1 passed)
Check name Status Explanation
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 fix/httpRequestTabs

📜 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 da9f4a6 and 7e0cd0c.

📒 Files selected for processing (1)
  • app/src/features/apiClient/screens/apiClient/components/views/http/HttpClientView.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: requestly/requestly PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T09:03:46.345Z
Learning: Follow existing code style and patterns in the Requestly project
Learnt from: mustafa-sayyed
Repo: requestly/requestly PR: 3723
File: app/src/features/apiClient/screens/apiClient/components/views/http/components/HttpRequestTabs/HttpRequestTabs.tsx:146-151
Timestamp: 2025-10-22T22:57:45.959Z
Learning: In the API Client Scripts tab (app/src/features/apiClient/screens/apiClient/components/views/http/components/HttpRequestTabs/HttpRequestTabs.tsx), the dot indicator should only appear when scripts are present (count > 0). When no scripts exist, the dot should not be rendered. This is the intended behavior per issue #3731.
Learnt from: nafees87n
Repo: requestly/requestly PR: 3655
File: app/src/features/apiClient/screens/apiClient/components/views/components/Collection/components/CollectionRunnerView/components/RunResultView/RunResultContainer/RunResultContainer.tsx:426-426
Timestamp: 2025-10-10T11:08:23.369Z
Learning: In the file `app/src/features/apiClient/screens/apiClient/components/views/components/Collection/components/CollectionRunnerView/components/RunResultView/RunResultContainer/RunResultContainer.tsx`, the `destroyInactiveTabPane={true}` setting is intentional. The loss of state (expandedKeys, scroll position) when switching tabs is acceptable for now and will be addressed in future work.
🔇 Additional comments (1)
app/src/features/apiClient/screens/apiClient/components/views/http/HttpClientView.tsx (1)

468-475: The optional chaining on time is unnecessary given the type definition.

HttpResponse.time is typed as number (required field), not number | undefined, so executedEntry.response?.time will always return a number when executedEntry.response is truthy. The optional chaining operator provides no benefit here and can be simplified to executedEntry.response.time.

         trackResponseLoaded({
           type: getContentTypeFromResponseHeaders(executedEntry.response.headers),
-          time: Math.round(executedEntry.response?.time / 1000),
+          time: Math.round(executedEntry.response.time / 1000),
         });

Likely an incorrect or invalid review comment.


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.

@nafees87n
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Base automatically changed from fix/graphql-client-view to fix/httpClientView December 12, 2025 14:50
Base automatically changed from fix/httpClientView to master December 12, 2025 15:05
@nafees87n nafees87n merged commit f63586a into master Dec 15, 2025
2 of 3 checks passed
@nafees87n nafees87n deleted the fix/httpRequestTabs branch December 15, 2025 08:33
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