[PR #129] [MERGED] Update local model stores in all mutations #65

Closed
opened 2025-12-29 07:19:08 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/129
Author: @gschier
Created: 10/23/2024
Status: Merged
Merged: 10/23/2024
Merged by: @gschier

Base: masterHead: local-model-store-updates


📝 Commits (3)

📊 Changes

29 files changed (+270 additions, -79 deletions)

View changed files

📝 package-lock.json (+8 -8)
📝 src-web/components/EnvironmentEditDialog.tsx (+1 -0)
📝 src-web/components/RecentResponsesDropdown.tsx (+1 -1)
📝 src-web/hooks/useCreateCookieJar.ts (+13 -1)
📝 src-web/hooks/useCreateEnvironment.ts (+12 -2)
📝 src-web/hooks/useCreateFolder.ts (+18 -5)
📝 src-web/hooks/useCreateGrpcRequest.ts (+8 -6)
📝 src-web/hooks/useCreateHttpRequest.ts (+8 -6)
📝 src-web/hooks/useCreateWorkspace.ts (+15 -7)
📝 src-web/hooks/useDeleteAnyGrpcRequest.tsx (+10 -0)
📝 src-web/hooks/useDeleteAnyHttpRequest.tsx (+11 -1)
📝 src-web/hooks/useDeleteCookieJar.tsx (+9 -0)
📝 src-web/hooks/useDeleteEnvironment.tsx (+9 -0)
📝 src-web/hooks/useDeleteFolder.tsx (+9 -0)
📝 src-web/hooks/useDeleteGrpcConnection.ts (+9 -0)
📝 src-web/hooks/useDeleteGrpcConnections.ts (+6 -0)
📝 src-web/hooks/useDeleteHttpResponse.ts (+7 -0)
📝 src-web/hooks/useDeleteHttpResponses.ts (+6 -0)
📝 src-web/hooks/useDeleteSendHistory.tsx (+11 -2)
📝 src-web/hooks/useDeleteWorkspace.tsx (+7 -0)

...and 9 more files

📄 Description

For some reason, model updates sporadically fail to apply 100% of the time. After some painful debugging, it seems like the Tauri event was not making it to the window in these cases, even though everything else succeeded.

Instead of debugging this for a week, this PR simply adds the logic to update the appropriate model store within each create/update/delete mutation.

Summary by CodeRabbit

Release Notes

  • New Features

    • Updated labels in the Recent Responses dropdown for clarity.
    • Enhanced state management for cookie jars, environments, folders, gRPC requests, HTTP requests, and workspaces, allowing for immediate UI updates upon creation and deletion.
    • Introduced optimistic updates to improve user experience during data mutations.
    • Updated the return types of various hooks to provide more accurate responses, enhancing type safety.
  • Bug Fixes

    • Improved error handling for null values across various hooks to prevent unexpected behavior.
  • Documentation

    • Updated package dependencies to ensure compatibility and performance improvements.

🔄 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/mountain-loop/yaak/pull/129 **Author:** [@gschier](https://github.com/gschier) **Created:** 10/23/2024 **Status:** ✅ Merged **Merged:** 10/23/2024 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `master` ← **Head:** `local-model-store-updates` --- ### 📝 Commits (3) - [`49f3fb0`](https://github.com/mountain-loop/yaak/commit/49f3fb0f2f5594317b92f19a063a8666a748f89f) Update local model stores in all updates - [`debbff8`](https://github.com/mountain-loop/yaak/commit/debbff881ed77ccedb187bb08f7700616ce95b33) Fix some delete logic - [`50b544c`](https://github.com/mountain-loop/yaak/commit/50b544ce96f3288023b396d9491c9e7116a84f84) Fix lint errors ### 📊 Changes **29 files changed** (+270 additions, -79 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+8 -8) 📝 `src-web/components/EnvironmentEditDialog.tsx` (+1 -0) 📝 `src-web/components/RecentResponsesDropdown.tsx` (+1 -1) 📝 `src-web/hooks/useCreateCookieJar.ts` (+13 -1) 📝 `src-web/hooks/useCreateEnvironment.ts` (+12 -2) 📝 `src-web/hooks/useCreateFolder.ts` (+18 -5) 📝 `src-web/hooks/useCreateGrpcRequest.ts` (+8 -6) 📝 `src-web/hooks/useCreateHttpRequest.ts` (+8 -6) 📝 `src-web/hooks/useCreateWorkspace.ts` (+15 -7) 📝 `src-web/hooks/useDeleteAnyGrpcRequest.tsx` (+10 -0) 📝 `src-web/hooks/useDeleteAnyHttpRequest.tsx` (+11 -1) 📝 `src-web/hooks/useDeleteCookieJar.tsx` (+9 -0) 📝 `src-web/hooks/useDeleteEnvironment.tsx` (+9 -0) 📝 `src-web/hooks/useDeleteFolder.tsx` (+9 -0) 📝 `src-web/hooks/useDeleteGrpcConnection.ts` (+9 -0) 📝 `src-web/hooks/useDeleteGrpcConnections.ts` (+6 -0) 📝 `src-web/hooks/useDeleteHttpResponse.ts` (+7 -0) 📝 `src-web/hooks/useDeleteHttpResponses.ts` (+6 -0) 📝 `src-web/hooks/useDeleteSendHistory.tsx` (+11 -2) 📝 `src-web/hooks/useDeleteWorkspace.tsx` (+7 -0) _...and 9 more files_ </details> ### 📄 Description For some reason, model updates sporadically fail to apply 100% of the time. After some painful debugging, it seems like the Tauri event was not making it to the window in these cases, even though everything else succeeded. Instead of debugging this for a week, this PR simply adds the logic to update the appropriate model store within each create/update/delete mutation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Updated labels in the Recent Responses dropdown for clarity. - Enhanced state management for cookie jars, environments, folders, gRPC requests, HTTP requests, and workspaces, allowing for immediate UI updates upon creation and deletion. - Introduced optimistic updates to improve user experience during data mutations. - Updated the return types of various hooks to provide more accurate responses, enhancing type safety. - **Bug Fixes** - Improved error handling for null values across various hooks to prevent unexpected behavior. - **Documentation** - Updated package dependencies to ensure compatibility and performance improvements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 07:19:08 +01:00
adam closed this issue 2025-12-29 07:19:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/yaak#65