[PR #287] [CLOSED] Filter chaining by active environment #210

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

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/287
Author: @gschier
Created: 10/29/2025
Status: Closed

Base: mainHead: filter-by-environment


📝 Commits (3)

  • 0c3449f Add environment_id to http/grpc/ws responses, and update response template functions to be able to filter by active environment
  • 07fe829 Update src-tauri/yaak-plugins/src/events.rs
  • 89e42b8 Update src-tauri/yaak-models/src/queries/http_responses.rs

📊 Changes

15 files changed (+128 additions, -49 deletions)

View changed files

📝 packages/plugin-runtime-types/src/bindings/gen_events.ts (+5 -1)
📝 packages/plugin-runtime-types/src/bindings/gen_models.ts (+1 -1)
📝 plugins/template-function-response/src/index.ts (+29 -3)
📝 src-tauri/src/lib.rs (+2 -0)
📝 src-tauri/src/notifications.rs (+2 -1)
📝 src-tauri/src/plugin_events.rs (+10 -1)
📝 src-tauri/yaak-models/bindings/gen_models.ts (+3 -3)
src-tauri/yaak-models/migrations/20251029074536_response-environment.sql (+8 -0)
📝 src-tauri/yaak-models/src/db_context.rs (+18 -25)
📝 src-tauri/yaak-models/src/models.rs (+10 -0)
📝 src-tauri/yaak-models/src/queries/http_responses.rs (+30 -12)
📝 src-tauri/yaak-plugins/bindings/gen_events.ts (+5 -1)
📝 src-tauri/yaak-plugins/bindings/gen_models.ts (+1 -1)
📝 src-tauri/yaak-plugins/src/events.rs (+3 -0)
📝 src-tauri/yaak-ws/src/commands.rs (+1 -0)

📄 Description

https://feedback.yaak.app/p/request-chaining-and-swapping-environments

This PR adds the ability to filter HTTP responses in the response.* template functions to ones sent in the active environment.

  • Add environment_id field to HttpResponse, GrpcConnection, and WebsocketConnection
  • Add environment behavior selector to response.* template function config

I thought about filtering all responses in the UI by active environment as well, but don't want to break anyone's existing workflows. I still think I want to do this, but Yaak will need proper onboarding for existing users, as well as a way to disable it.

CleanShot 2025-10-29 at 15 25 57@2x

🔄 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/287 **Author:** [@gschier](https://github.com/gschier) **Created:** 10/29/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `filter-by-environment` --- ### 📝 Commits (3) - [`0c3449f`](https://github.com/mountain-loop/yaak/commit/0c3449fcb18d0a4fe54542cc94c95aa6985e2ed7) Add environment_id to http/grpc/ws responses, and update response template functions to be able to filter by active environment - [`07fe829`](https://github.com/mountain-loop/yaak/commit/07fe829c0385ee9de9dbfc503d98f65ac5f3a12b) Update src-tauri/yaak-plugins/src/events.rs - [`89e42b8`](https://github.com/mountain-loop/yaak/commit/89e42b8afe87693cf0db602768783484943d7063) Update src-tauri/yaak-models/src/queries/http_responses.rs ### 📊 Changes **15 files changed** (+128 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `packages/plugin-runtime-types/src/bindings/gen_events.ts` (+5 -1) 📝 `packages/plugin-runtime-types/src/bindings/gen_models.ts` (+1 -1) 📝 `plugins/template-function-response/src/index.ts` (+29 -3) 📝 `src-tauri/src/lib.rs` (+2 -0) 📝 `src-tauri/src/notifications.rs` (+2 -1) 📝 `src-tauri/src/plugin_events.rs` (+10 -1) 📝 `src-tauri/yaak-models/bindings/gen_models.ts` (+3 -3) ➕ `src-tauri/yaak-models/migrations/20251029074536_response-environment.sql` (+8 -0) 📝 `src-tauri/yaak-models/src/db_context.rs` (+18 -25) 📝 `src-tauri/yaak-models/src/models.rs` (+10 -0) 📝 `src-tauri/yaak-models/src/queries/http_responses.rs` (+30 -12) 📝 `src-tauri/yaak-plugins/bindings/gen_events.ts` (+5 -1) 📝 `src-tauri/yaak-plugins/bindings/gen_models.ts` (+1 -1) 📝 `src-tauri/yaak-plugins/src/events.rs` (+3 -0) 📝 `src-tauri/yaak-ws/src/commands.rs` (+1 -0) </details> ### 📄 Description https://feedback.yaak.app/p/request-chaining-and-swapping-environments This PR adds the ability to filter HTTP responses in the `response.*` template functions to ones sent in the active environment. - Add `environment_id` field to `HttpResponse`, `GrpcConnection`, and `WebsocketConnection` - Add environment behavior selector to `response.*` template function config I thought about filtering all responses in the UI by active environment as well, but don't want to break anyone's existing workflows. I still think I want to do this, but Yaak will need proper onboarding for existing users, as well as a way to disable it. <img width="2322" height="1356" alt="CleanShot 2025-10-29 at 15 25 57@2x" src="https://github.com/user-attachments/assets/6728e2c4-4585-42de-9409-586c9d190063" /> --- <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:52 +01:00
adam closed this issue 2025-12-29 07:19:52 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/yaak#210