[PR #5756] Feat: Fix/environments sync 5754 #5340

Open
opened 2026-03-17 02:47:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5756
Author: @Fran2007
Created: 1/7/2026
Status: 🔄 Open

Base: mainHead: fix/environments-sync-5754


📝 Commits (2)

  • 591a2cd feat: implement setSelectedEnvironmentIndex with synchronization to CurrentValueService
  • b66672e feat: implement setSelectedEnvironmentIndex with synchronization to CurrentValueService

📊 Changes

3 files changed (+54 additions, -9 deletions)

View changed files

📝 .npmrc (+1 -1)
📝 .prettierignore (+2 -8)
📝 packages/hoppscotch-common/src/newstore/environments.ts (+51 -0)

📄 Description

This PR fixes the issue described in #5754 by ensuring that the selected environment index is properly synchronized with CurrentValueService.

Previously, the selected environment index could become out of sync, leading to inconsistent environment selection and state persistence. This change introduces a synchronized update mechanism via setSelectedEnvironmentIndex, ensuring the selected environment remains consistent across the application.

Changes included

Synchronized setSelectedEnvironmentIndex with CurrentValueService

Fixed inconsistent environment selection state

Improved reliability when switching or persisting environments

Related issue

Fixes #5754


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5756 **Author:** [@Fran2007](https://github.com/Fran2007) **Created:** 1/7/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/environments-sync-5754` --- ### 📝 Commits (2) - [`591a2cd`](https://github.com/hoppscotch/hoppscotch/commit/591a2cd2a2aa04204222e6b21d89f8e5cb5ca514) feat: implement setSelectedEnvironmentIndex with synchronization to CurrentValueService - [`b66672e`](https://github.com/hoppscotch/hoppscotch/commit/b66672e71b5f2574a51fef5c3da2323044efdbfb) feat: implement setSelectedEnvironmentIndex with synchronization to CurrentValueService ### 📊 Changes **3 files changed** (+54 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.npmrc` (+1 -1) 📝 `.prettierignore` (+2 -8) 📝 `packages/hoppscotch-common/src/newstore/environments.ts` (+51 -0) </details> ### 📄 Description This PR fixes the issue described in #5754 by ensuring that the selected environment index is properly synchronized with CurrentValueService. Previously, the selected environment index could become out of sync, leading to inconsistent environment selection and state persistence. This change introduces a synchronized update mechanism via setSelectedEnvironmentIndex, ensuring the selected environment remains consistent across the application. Changes included Synchronized setSelectedEnvironmentIndex with CurrentValueService Fixed inconsistent environment selection state Improved reliability when switching or persisting environments Related issue Fixes #5754 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5340
No description provided.