mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #5756] Feat: Fix/environments sync 5754 #5340
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5340
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5756
Author: @Fran2007
Created: 1/7/2026
Status: 🔄 Open
Base:
main← Head:fix/environments-sync-5754📝 Commits (2)
591a2cdfeat: implement setSelectedEnvironmentIndex with synchronization to CurrentValueServiceb66672efeat: 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.