mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5132] [MERGED] fix(desktop): align connected instance with launch #5069
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#5069
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/5132
Author: @CuriousCorrelation
Created: 6/6/2025
Status: ✅ Merged
Merged: 6/10/2025
Merged by: @jamesgeorge007
Base:
patch← Head:fix-desktop-overwrite-instance-connection📝 Commits (5)
f27d2aefix(desktop): align connected instance with launch9e1e568feat(desktop): abstract away instance to platformfd8140afix(desktop): consolidate instance verb5a2ebdbfix(desktop): vendored instance display namee885d39fix(desktop): instance switcher target string📊 Changes
8 files changed (+126 additions, -34 deletions)
View changed files
📝
packages/hoppscotch-common/src/components.d.ts(+0 -2)📝
packages/hoppscotch-common/src/components/app/Header.vue(+17 -5)📝
packages/hoppscotch-common/src/components/instance/Switcher.vue(+22 -3)📝
packages/hoppscotch-common/src/platform/index.ts(+2 -0)➕
packages/hoppscotch-common/src/platform/instance.ts(+10 -0)📝
packages/hoppscotch-common/src/services/instance-switcher.service.ts(+35 -20)📝
packages/hoppscotch-desktop/src/views/Home.vue(+30 -4)📝
packages/hoppscotch-selfhost-web/src/main.ts(+10 -0)📄 Description
The current implementation uses two separate stores for the desktop app: one for the
InstanceSwitcherServiceand another for the main desktop app.This creates a de-sync between the vendored app launched by the core service, vs the app expected by the
InstanceSwitcherService.This adds a overwrite for
InstanceSwitcherServicestore to sync"connected"status correctly.Closes HFE-894
During the development of the new kernel desktop arch (see HFE-672), separate stores were introduced as a transitional necessity to handle initialization order dependencies.
Basically a couple of things including why native interceptor needed to be ready before
PersistenceServiceand managing storage contexts during web app bundle transitions, plus eliminating some of the circular service dependencies that was handled eventually with theInitializationService.This is now being phased out in favor of better platform and system agnostic path resolution (see HFE-829 and sub ticket HFE-864) with the goal of eventually introducing a kernel store for hoppscotch-desktop, see HFE-877 for part 6 of the process.
Notes to reviewers
Make sure
~/Library/Application Support/io.hoppscotch.desktop/hopp.store.json's"connectionState"key always has the "vendored" instances upon launch, subsequent changes are expected.For example:
After connecting to a self-hosted instance
Upon subsequent launch
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.