[PR #505] [MERGED] Duplicate models from the DB instead of frontend snapshots #3354

Closed
opened 2026-07-15 02:03:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/505
Author: @gschier
Created: 7/13/2026
Status: Merged
Merged: 7/14/2026
Merged by: @gschier

Base: mainHead: duplicate-from-db


📝 Commits (1)

  • 869c412 Duplicate models from the DB instead of frontend snapshots

📊 Changes

9 files changed (+133 additions, -53 deletions)

View changed files

📝 crates-tauri/yaak-app-client/src/models_ext.rs (+19 -8)
📝 crates/yaak-models/guest-js/store.ts (+11 -34)
crates/yaak-models/src/queries/duplicate_name.rs (+56 -0)
📝 crates/yaak-models/src/queries/environments.rs (+7 -0)
📝 crates/yaak-models/src/queries/folders.rs (+14 -8)
📝 crates/yaak-models/src/queries/grpc_requests.rs (+8 -1)
📝 crates/yaak-models/src/queries/http_requests.rs (+8 -1)
📝 crates/yaak-models/src/queries/mod.rs (+2 -0)
📝 crates/yaak-models/src/queries/websocket_requests.rs (+8 -1)

📄 Description

Fixes https://yaak.app/feedback/posts/duplicate-a-request-does-not-copy-current-body-content

The sidebar tree memoizes on name/url/method, so its in-memory models go stale on body-only edits. Duplicating cloned that stale snapshot verbatim.

Now models_duplicate takes a model type + id and re-reads from the DB inside the transaction, after flushing pending writes. The "Copy N" conflict naming moved to Rust alongside it, comparing raw sibling names from the DB (empty names stay empty so the display keeps falling back to the URL).


🔄 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/505 **Author:** [@gschier](https://github.com/gschier) **Created:** 7/13/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `duplicate-from-db` --- ### 📝 Commits (1) - [`869c412`](https://github.com/mountain-loop/yaak/commit/869c412e845b869a3b3d6432bd64c9c1bb719456) Duplicate models from the DB instead of frontend snapshots ### 📊 Changes **9 files changed** (+133 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `crates-tauri/yaak-app-client/src/models_ext.rs` (+19 -8) 📝 `crates/yaak-models/guest-js/store.ts` (+11 -34) ➕ `crates/yaak-models/src/queries/duplicate_name.rs` (+56 -0) 📝 `crates/yaak-models/src/queries/environments.rs` (+7 -0) 📝 `crates/yaak-models/src/queries/folders.rs` (+14 -8) 📝 `crates/yaak-models/src/queries/grpc_requests.rs` (+8 -1) 📝 `crates/yaak-models/src/queries/http_requests.rs` (+8 -1) 📝 `crates/yaak-models/src/queries/mod.rs` (+2 -0) 📝 `crates/yaak-models/src/queries/websocket_requests.rs` (+8 -1) </details> ### 📄 Description Fixes https://yaak.app/feedback/posts/duplicate-a-request-does-not-copy-current-body-content The sidebar tree memoizes on name/url/method, so its in-memory models go stale on body-only edits. Duplicating cloned that stale snapshot verbatim. Now `models_duplicate` takes a model type + id and re-reads from the DB inside the transaction, after flushing pending writes. The "Copy N" conflict naming moved to Rust alongside it, comparing raw sibling names from the DB (empty names stay empty so the display keeps falling back to the URL). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-15 02:03:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#3354