Skip to content

[ENGG-4727] fix: green dot tab indicator for param and body tabs#3757

Merged
nafees87n merged 9 commits intorequestly:masterfrom
mustafa-sayyed:fix-green-dot-behaviour
Dec 4, 2025
Merged

[ENGG-4727] fix: green dot tab indicator for param and body tabs#3757
nafees87n merged 9 commits intorequestly:masterfrom
mustafa-sayyed:fix-green-dot-behaviour

Conversation

@mustafa-sayyed
Copy link
Contributor

@mustafa-sayyed mustafa-sayyed commented Oct 26, 2025

Closes issue: #3731

📜 Summary of changes:

  • Fix green dot logic for the Params tab and Body tab
  • Initially, when an API Request has been created, the Row in Params, Headers comes with an Enabled checkbox button
  • I fixed it. If the key values are first, the default will be Unchecked. Not everyone wants to add params and headers in their request
  • My this PR fix: api client testing UI enhancement and refresh fix #3723 already fixes the green dot behaviour of Script tab

🎥 Demo Video:

Screen.Recording.2025-10-26.013011.mp4

✅ Checklist:

  • Make sure linting and unit tests pass.
  • No install/build warnings introduced.
  • Verified UI in browser.
  • For UI changes, added/updated analytics events (if applicable).
  • For changes in extension's code, manually tested in Chrome and Firefox.
  • Added/updated unit tests for this change.
  • Raised pull request to update corresponding documentation (if already exists).
  • Added demo video showing the changes in action (if applicable).

🧪 Test instructions:

  • Open API Client
  • Observe the Green Dot Tab Indicator behavior by adding the respective values of params and body tab

Summary by CodeRabbit

  • New Features

    • Script editor accepts external script updates and can optionally focus post-response editing.
    • Tab label indicator component is now publicly available for reuse.
  • Improvements

    • Script tabs show an indicator when scripts differ from defaults.
    • Initial empty rows in parameter tables are disabled by default to avoid accidental input.
    • Query/path/body tab counts use actual lengths for more accurate badges.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 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

Changes across apiClient UI components focused on tab labeling, script editor behavior, and key-value row initialization. KeyValueTable now returns a single empty pair with isEnabled = false when input data is empty. HttpRequestTabs adjusted tab-count/dot logic and useMemo dependencies to consider pathVariables.length and body length. ScriptEditor gained onScriptsChange and focusPostResponse props, emits script changes via onScriptsChange, updates effect dependencies, and shows RequestTabLabelIndicator on script-type buttons. A new .request-tab-dot-success style was added and RequestTabLabelIndicator was made a public export.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review points:
    • KeyValueTable.tsx: verify disabled initial-row behavior and interactions with form handlers.
    • HttpRequestTabs.tsx: validate tab count/dot rendering with combinations of query params, path variables, and body; confirm useMemo dependency correctness.
    • ScriptEditor.tsx: confirm onScriptsChange invocation, focusPostResponse handling, and reactivity to scripts changes.
    • RequestTabLabel.tsx: ensure making RequestTabLabelIndicator public doesn’t conflict with other imports.

Possibly related PRs

Suggested reviewers

  • rohanmathur91

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description includes the required sections with clear explanations, issue reference, summary of changes, demo video, and test instructions, though some checklist items remain unchecked (analytics, unit tests, extension testing).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: adding green dot tab indicators for param and body tabs, which aligns with the core objectives of fixing green dot logic for the Params and Body tabs.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a 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.

Copy link
Contributor

@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

🧹 Nitpick comments (1)
app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx (1)

37-45: Consider refactoring to avoid object mutation.

The logic correctly sets isEnabled: false for the initial empty row, which aligns with the PR objective. However, creating an object via createEmptyPair() (which sets isEnabled: true) and then mutating it to false is less clean than creating the object directly with the desired state.

Option 1: Create the object inline

  const memoizedData: KeyValuePair[] = useMemo(() => {
    if (data.length) {
      return data;
    } else {
-     const emptyData = createEmptyPair();
-     emptyData.isEnabled = false;
-     return [emptyData];
+     return [{
+       id: Date.now(),
+       key: "",
+       value: "",
+       isEnabled: false,
+     }];
    }
  }, [data, createEmptyPair]);

Option 2: Parameterize createEmptyPair

  const createEmptyPair = useCallback(
-   () => ({
+   (isEnabled = true) => ({
      id: Date.now(),
      key: "",
      value: "",
-     isEnabled: true,
+     isEnabled,
    }),
    []
  );

  const memoizedData: KeyValuePair[] = useMemo(() => {
    if (data.length) {
      return data;
    } else {
-     const emptyData = createEmptyPair();
-     emptyData.isEnabled = false;
-     return [emptyData];
+     return [createEmptyPair(false)];
    }
  }, [data, createEmptyPair]);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f0ac1b and b0177f7.

📒 Files selected for processing (2)
  • app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx (1 hunks)
  • app/src/features/apiClient/screens/apiClient/components/views/http/components/HttpRequestTabs/HttpRequestTabs.tsx (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
app/src/features/apiClient/screens/apiClient/components/views/http/components/HttpRequestTabs/HttpRequestTabs.tsx (1)
app/src/features/apiClient/hooks/useQueryParamStore.tsx (1)
  • useQueryParamStore (7-15)
app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx (2)
shared/src/types/entities/apiClient/api.ts (1)
  • KeyValuePair (212-218)
app/src/features/apiClient/types.ts (1)
  • KeyValuePair (36-42)
🔇 Additional comments (4)
app/src/features/apiClient/screens/apiClient/components/views/http/components/HttpRequestTabs/HttpRequestTabs.tsx (4)

51-53: LGTM: Enabled query params detection.

The logic correctly identifies whether any query parameters are enabled using .some(), which efficiently short-circuits on the first enabled parameter.


96-100: LGTM: Body tab indicator logic.

The count logic correctly evaluates whether the request body contains data by checking body?.length, showing the green dot indicator only when content exists. The conditional showDot based on isRequestBodySupported appropriately hides the indicator for methods that don't support request bodies.


175-176: LGTM: Dependencies correctly updated.

The dependency array properly includes hasEnabledQueryParams and pathVariables.length to ensure the memoized items update when the enabled state or path variables change.


59-65: Verification complete: Query params store updates correctly reflect enabled state changes.

The checkbox toggle properly propagates through the component chain:

  1. KeyValueTableRow (line 73): Checkbox onChange → calls save()
  2. KeyValueTable (line 74): save()handleUpdatePair()onChange(updatedPairs)
  3. QueryParamsTable (line 32): handleUpdateQueryParams()setQueryParams(updatedPairs) (store update)
  4. HttpRequestTabs (line 51-53): Store selector detects changes → green dot indicator updates

The green dot logic at lines 59-65 correctly displays when hasEnabledQueryParams is true (reading from the store), confirming the state management is working as intended.

@rohanmathur91
Copy link
Member

@mustafa-sayyed Please resolve the conflicts.

@mustafa-sayyed
Copy link
Contributor Author

mustafa-sayyed commented Oct 30, 2025

@rohanmathur91
I have resolved the Conflicts

Edit:
This is also a key change to look in this PR

Initially, when an API Request has been created, the Row in Params, Headers comes with an Enabled checkbox button
I fixed it. If the key values are first, the default will be Unchecked. Not everyone wants to add params and headers in their request

@mustafa-sayyed
Copy link
Contributor Author

mustafa-sayyed commented Nov 11, 2025

Hey @rohanmathur91, @dinex-dev
Please review my PR

@nafees87n
Copy link
Contributor

@mustafa-sayyed In #3731 the aim was to show green dot beside pre request script and post response script labels but I do not see those changes in this PR.
Fixing things in query params and body is ok but the primary objective of #3731 has not been implemented.

@mustafa-sayyed
Copy link
Contributor Author

mustafa-sayyed commented Nov 29, 2025

Thanks @nafees87n for pointing out that
I misunderstood the issue

I will implement green dot beside the Pre request Script and Post request Script

@mustafa-sayyed
Copy link
Contributor Author

mustafa-sayyed commented Dec 1, 2025

@nafees87n
I have imlpelemented the dot indicator
Please review it and let me know if any changes required

Script.-.Made.with.Clipchamp.mp4

Copy link
Contributor

@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

♻️ Duplicate comments (1)
app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (1)

52-57: Consider simplifying the count logic for clarity.

Same suggestion as the Pre-request indicator above - the logic can be simplified:

count={scripts?.postResponse && scripts.postResponse !== DEFAULT_SCRIPT_VALUES.postResponse ? 1 : 0}
🧹 Nitpick comments (2)
app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx (1)

37-45: Avoid mutating the object returned by createEmptyPair.

Directly mutating emptyData at line 42 after creation reduces code clarity. Use the spread operator to override isEnabled without mutation.

Apply this diff:

 const memoizedData: KeyValuePair[] = useMemo(() => {
   if (data.length) {
     return data;
   } else {
-    const emptyData = createEmptyPair();
-    emptyData.isEnabled = false;
-    return [emptyData];
+    return [{ ...createEmptyPair(), isEnabled: false }];
   }
 }, [data, createEmptyPair]);
app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (1)

45-48: Consider simplifying the count logic for clarity.

The current logic is functionally correct but could be more explicit:

count={scripts?.preRequest && scripts.preRequest !== DEFAULT_SCRIPT_VALUES.preRequest ? 1 : 0}

The .length check is redundant when you're already comparing against the default value (which is a non-empty string). This simplification makes the intent clearer: show the indicator when a non-default script exists.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6097dd and db3a66c.

📒 Files selected for processing (4)
  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (3 hunks)
  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/scriptEditor.scss (1 hunks)
  • app/src/features/apiClient/screens/apiClient/components/views/components/request/components/ApiClientRequestTabs/components/RequestTabLabel/RequestTabLabel.tsx (1 hunks)
  • app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
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.
📚 Learning: 2025-10-22T22:57:45.959Z
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.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/scriptEditor.scss
  • app/src/features/apiClient/screens/apiClient/components/views/components/request/components/ApiClientRequestTabs/components/RequestTabLabel/RequestTabLabel.tsx
  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx
📚 Learning: 2025-10-27T14:31:06.274Z
Learnt from: Aarushsr12
Repo: requestly/requestly PR: 3719
File: app/src/features/apiClient/screens/apiClient/components/views/components/Collection/components/CollectionRunnerView/components/RunConfigView/RunConfigSettings/runConfigSettings.scss:85-113
Timestamp: 2025-10-27T14:31:06.274Z
Learning: In the requestly/requestly codebase, do not suggest adding fallback values to CSS/SCSS variable usage (e.g., var(--requestly-color-error-darker)). The team relies on their design token system to ensure all tokens are defined, and fallbacks are not needed.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/scriptEditor.scss
📚 Learning: 2025-10-10T11:08:23.369Z
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.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/request/components/ApiClientRequestTabs/components/RequestTabLabel/RequestTabLabel.tsx
  • app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx
📚 Learning: 2025-10-27T16:15:11.603Z
Learnt from: Aarushsr12
Repo: requestly/requestly PR: 3719
File: app/src/features/apiClient/screens/apiClient/components/views/components/Collection/components/CollectionRunnerView/components/RunConfigView/ParseFileModal/ParsedTableView.tsx:33-33
Timestamp: 2025-10-27T16:15:11.603Z
Learning: In ParsedTableView.tsx for the collection runner data file preview table, column titles should preserve the original case from the data file (using `k.charAt(0) + k.slice(1)` or just `k`) rather than capitalizing the first letter. This is because column names are used as variables in request bodies and need exact case matching for variable resolution to work correctly.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx
📚 Learning: 2025-11-25T09:03:46.345Z
Learnt from: CR
Repo: requestly/requestly PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T09:03:46.345Z
Learning: Use TypeScript where applicable in the Requestly project

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx
📚 Learning: 2025-09-05T06:46:25.395Z
Learnt from: nafees87n
Repo: requestly/requestly PR: 3504
File: app/src/features/apiClient/helpers/httpRequestExecutor/httpRequestExecutor.ts:149-151
Timestamp: 2025-09-05T06:46:25.395Z
Learning: In the RQAPI types, ScriptType enum values are strings that match property names: ScriptType.PRE_REQUEST = "preRequest" and ScriptType.POST_RESPONSE = "postResponse". This means DEFAULT_SCRIPT_VALUES.preRequest and DEFAULT_SCRIPT_VALUES[RQAPI.ScriptType.PRE_REQUEST] refer to the same value.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx
🧬 Code graph analysis (2)
app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx (2)
app/src/features/apiClient/types.ts (1)
  • KeyValuePair (37-43)
shared/src/types/entities/apiClient/api.ts (1)
  • KeyValuePair (208-214)
app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (2)
app/src/features/apiClient/screens/apiClient/components/views/components/request/components/ApiClientRequestTabs/components/RequestTabLabel/RequestTabLabel.tsx (1)
  • RequestTabLabelIndicator (20-33)
app/src/features/apiClient/constants.ts (1)
  • DEFAULT_SCRIPT_VALUES (68-73)
🔇 Additional comments (7)
app/src/features/apiClient/screens/apiClient/components/views/components/request/components/KeyValueTable/KeyValueTable.tsx (1)

27-35: LGTM for the primary use case.

The function correctly creates enabled pairs for user-initiated row additions (via handleAddPair). The default isEnabled: true is appropriate when users explicitly click "Add More."

app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/scriptEditor.scss (1)

53-60: LGTM! Clean indicator styling.

The CSS class definition is clear and appropriate for the green dot indicator. The styling aligns well with the PR objectives.

app/src/features/apiClient/screens/apiClient/components/views/components/request/components/ApiClientRequestTabs/components/RequestTabLabel/RequestTabLabel.tsx (1)

20-29: LGTM! Good component reusability.

Exporting RequestTabLabelIndicator enables reuse in the ScriptEditor component. The formatting changes are stylistic and maintain the existing logic.

app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (4)

10-10: LGTM! Correct import path.

The import aligns with the newly exported RequestTabLabelIndicator component.


12-18: LGTM! Good controlled component pattern.

The expanded props enable better external control of the component. The onScriptsChange callback follows React best practices for controlled components.


68-68: LGTM! Correct dependency management.

Adding scripts to the dependency array ensures the indicator counts update when script content changes.


75-75: LGTM! Proper immutable update pattern.

The callback correctly creates a new scripts object without mutating the original, following React best practices.

Copy link
Contributor

@nafees87n nafees87n left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks @mustafa-sayyed

Copilot AI review requested due to automatic review settings December 4, 2025 09:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the green dot indicator logic for the Params and Body tabs in the API Client, ensuring indicators only appear when actual data is present. The PR also addresses the default enabled state of empty rows in parameter tables.

Key changes:

  • Modified Body tab to check actual body content length instead of just presence
  • Changed initial empty rows in KeyValueTable to be disabled by default
  • Exported RequestTabLabelIndicator component for reuse in script tabs
  • Added visual indicators to Pre-request and Post-response script tabs

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
HttpRequestTabs.tsx Updated Body tab count logic to check body length and reorganized dependency array
KeyValueTable.tsx Modified initial empty row creation to set isEnabled to false by default
RequestTabLabel.tsx Exported RequestTabLabelIndicator component and reformatted code
scriptEditor.scss Added CSS styling for success dot indicator
ScriptEditor.tsx Integrated RequestTabLabelIndicator to show green dots for modified scripts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@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

🧹 Nitpick comments (1)
app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (1)

10-56: Script tab dot indicators: behavior looks correct; consider DRY-ing the count logic

Importing RequestTabLabelIndicator and gating count on scripts?.preRequest/postResponse !== DEFAULT_SCRIPT_VALUES.* ensures the green dot only appears when there is a “real” script and not just the default template, which matches the intended behavior from issue #3731. Based on learnings, this aligns with the “dot only when scripts present” requirement.

To reduce duplication and keep access consistent with RQAPI.ScriptType, you could extract a small helper:

 export const ScriptEditor: React.FC<ScriptEditorProps> = ({ scripts, onScriptsChange, focusPostResponse }) => {
+  const hasCustomScript = (type: RQAPI.ScriptType) => {
+    const value = scripts?.[type];
+    return !!value && value !== DEFAULT_SCRIPT_VALUES[type];
+  };
+
   const activeScriptType = scripts?.[RQAPI.ScriptType.PRE_REQUEST]
@@
           <Radio.Button className="api-client-script-type-selector__btn" value={RQAPI.ScriptType.PRE_REQUEST}>
             Pre-request
             <RequestTabLabelIndicator
-              count={scripts?.preRequest && scripts?.preRequest !== DEFAULT_SCRIPT_VALUES.preRequest ? 1 : 0}
-              showDot={true}
+              count={hasCustomScript(RQAPI.ScriptType.PRE_REQUEST) ? 1 : 0}
+              showDot
             />
           </Radio.Button>
           <Radio.Button className="api-client-script-type-selector__btn" value={RQAPI.ScriptType.POST_RESPONSE}>
             Post-response
             <RequestTabLabelIndicator
-              count={scripts?.postResponse && scripts.postResponse !== DEFAULT_SCRIPT_VALUES.postResponse ? 1 : 0}
-              showDot={true}
+              count={hasCustomScript(RQAPI.ScriptType.POST_RESPONSE) ? 1 : 0}
+              showDot
             />
           </Radio.Button>

This keeps the “non-default script => dot” rule in one place and avoids repeating magic property names.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52bac6c and 868f26a.

📒 Files selected for processing (1)
  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (3 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
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: RuntimeTerror10
Repo: requestly/requestly PR: 3565
File: app/src/features/apiClient/screens/apiClient/components/views/http/components/PathVariableTable/PathVariableTable.tsx:77-79
Timestamp: 2025-09-24T10:55:40.434Z
Learning: In the Requestly API client, the PathVariableTable component is designed to conditionally render - it should only appear when there are path variables in the URL (variables.length > 0), returning null otherwise. This provides a cleaner UX by hiding the entire table section when no path variables are present, rather than showing an empty table state.
📚 Learning: 2025-10-22T22:57:45.959Z
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.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx
📚 Learning: 2025-11-25T09:03:46.345Z
Learnt from: CR
Repo: requestly/requestly PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T09:03:46.345Z
Learning: Use TypeScript where applicable in the Requestly project

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx
📚 Learning: 2025-09-05T06:46:25.395Z
Learnt from: nafees87n
Repo: requestly/requestly PR: 3504
File: app/src/features/apiClient/helpers/httpRequestExecutor/httpRequestExecutor.ts:149-151
Timestamp: 2025-09-05T06:46:25.395Z
Learning: In the RQAPI types, ScriptType enum values are strings that match property names: ScriptType.PRE_REQUEST = "preRequest" and ScriptType.POST_RESPONSE = "postResponse". This means DEFAULT_SCRIPT_VALUES.preRequest and DEFAULT_SCRIPT_VALUES[RQAPI.ScriptType.PRE_REQUEST] refer to the same value.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx
🧬 Code graph analysis (1)
app/src/features/apiClient/screens/apiClient/components/views/components/Scripts/components/ScriptEditor/ScriptEditor.tsx (2)
app/src/features/apiClient/screens/apiClient/components/views/components/request/components/ApiClientRequestTabs/components/RequestTabLabel/RequestTabLabel.tsx (1)
  • RequestTabLabelIndicator (20-33)
app/src/features/apiClient/constants.ts (1)
  • DEFAULT_SCRIPT_VALUES (68-73)

@nafees87n nafees87n changed the title fix: green dot tab indicator for param and body tabs [ENGG-4727] fix: green dot tab indicator for param and body tabs Dec 4, 2025
@nafees87n nafees87n merged commit e2d0012 into requestly:master Dec 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show Green Dot Indicator for Script Tabs with Code

5 participants