[PR #4511] [MERGED] fix(agent): propagate default values to persistent store #4840

Closed
opened 2026-03-17 02:20:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4511
Author: @CuriousCorrelation
Created: 11/4/2024
Status: Merged
Merged: 11/6/2024
Merged by: @AndrewBastin

Base: patchHead: agent/fix/persist-store


📝 Commits (3)

  • bafc483 fix(agent): persist store state on successful load
  • 158a585 feat(agent): descriptive error handling and source of truth
  • 2a0a582 chore(agent): bump agent version to v0.1.3

📊 Changes

12 files changed (+151 additions, -108 deletions)

View changed files

📝 packages/hoppscotch-agent/devenv.nix (+58 -38)
📝 packages/hoppscotch-agent/package.json (+1 -1)
📝 packages/hoppscotch-agent/src-tauri/Cargo.lock (+1 -1)
📝 packages/hoppscotch-agent/src-tauri/Cargo.toml (+1 -1)
📝 packages/hoppscotch-agent/src-tauri/src/controller.rs (+21 -21)
📝 packages/hoppscotch-agent/src-tauri/src/error.rs (+18 -16)
packages/hoppscotch-agent/src-tauri/src/global.rs (+2 -0)
📝 packages/hoppscotch-agent/src-tauri/src/lib.rs (+1 -0)
📝 packages/hoppscotch-agent/src-tauri/src/state.rs (+40 -23)
📝 packages/hoppscotch-agent/src-tauri/src/tray.rs (+6 -5)
📝 packages/hoppscotch-agent/src-tauri/tauri.conf.json (+1 -1)
📝 packages/hoppscotch-agent/src-tauri/tauri.portable.conf.json (+1 -1)

📄 Description

This PR fixes an issue where sane default values set in the ephemeral store were not being propagated to the persistent store if the store was uninitialized or encountered a loading error. Now, if the persistent store is absent or fails to load, default values will be established in the ephemeral store and subsequently saved to the persistent store, syncing two both storage layers.

Closes HFE-645


🔄 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/4511 **Author:** [@CuriousCorrelation](https://github.com/CuriousCorrelation) **Created:** 11/4/2024 **Status:** ✅ Merged **Merged:** 11/6/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `patch` ← **Head:** `agent/fix/persist-store` --- ### 📝 Commits (3) - [`bafc483`](https://github.com/hoppscotch/hoppscotch/commit/bafc483b363d2fc75a99a8b64491b52e7d916486) fix(agent): persist store state on successful load - [`158a585`](https://github.com/hoppscotch/hoppscotch/commit/158a585c0c80f8249781418eeaf2300faad0d3ac) feat(agent): descriptive error handling and source of truth - [`2a0a582`](https://github.com/hoppscotch/hoppscotch/commit/2a0a582d4c9cd6e070802c0478d28d86c1a5f194) chore(agent): bump agent version to `v0.1.3` ### 📊 Changes **12 files changed** (+151 additions, -108 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-agent/devenv.nix` (+58 -38) 📝 `packages/hoppscotch-agent/package.json` (+1 -1) 📝 `packages/hoppscotch-agent/src-tauri/Cargo.lock` (+1 -1) 📝 `packages/hoppscotch-agent/src-tauri/Cargo.toml` (+1 -1) 📝 `packages/hoppscotch-agent/src-tauri/src/controller.rs` (+21 -21) 📝 `packages/hoppscotch-agent/src-tauri/src/error.rs` (+18 -16) ➕ `packages/hoppscotch-agent/src-tauri/src/global.rs` (+2 -0) 📝 `packages/hoppscotch-agent/src-tauri/src/lib.rs` (+1 -0) 📝 `packages/hoppscotch-agent/src-tauri/src/state.rs` (+40 -23) 📝 `packages/hoppscotch-agent/src-tauri/src/tray.rs` (+6 -5) 📝 `packages/hoppscotch-agent/src-tauri/tauri.conf.json` (+1 -1) 📝 `packages/hoppscotch-agent/src-tauri/tauri.portable.conf.json` (+1 -1) </details> ### 📄 Description This PR fixes an issue where sane default values set in the ephemeral store were not being propagated to the persistent store if the store was uninitialized or encountered a loading error. Now, if the persistent store is absent or fails to load, default values will be established in the ephemeral store and subsequently saved to the persistent store, syncing two both storage layers. Closes HFE-645 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:20:19 +03:00
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#4840
No description provided.