From ed195c860f5df441bccfac33536b4b1e4252654e Mon Sep 17 00:00:00 2001 From: Steven Palmesano <3100993+spalmesano0@users.noreply.github.com> Date: Tue, 16 Jun 2026 10:29:26 -0500 Subject: [PATCH] Navigate back to the report details page after saving a report (#46754) **Related issue:** Resolves #38928 # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. ## Testing - [x] QA'd all new/changed functionality manually ## Summary by CodeRabbit * **Bug Fixes** * After saving report edits, the UI now redirects users back to the report details page. * URL context (host_id and fleet_id) is preserved during this navigation. --- changes/38928-navigate-to-report-after-saving | 1 + frontend/pages/queries/edit/EditQueryPage.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changes/38928-navigate-to-report-after-saving diff --git a/changes/38928-navigate-to-report-after-saving b/changes/38928-navigate-to-report-after-saving new file mode 100644 index 0000000000..be6594a0f3 --- /dev/null +++ b/changes/38928-navigate-to-report-after-saving @@ -0,0 +1 @@ +- Navigate back to the report details page after saving changes to a report. diff --git a/frontend/pages/queries/edit/EditQueryPage.tsx b/frontend/pages/queries/edit/EditQueryPage.tsx index 3f221c7fa1..88a19bf5f0 100644 --- a/frontend/pages/queries/edit/EditQueryPage.tsx +++ b/frontend/pages/queries/edit/EditQueryPage.tsx @@ -315,7 +315,12 @@ const EditQueryPage = ({ try { await queryAPI.update(queryId, updatedQuery); renderFlash("success", "Report updated."); - refetchStoredQuery(); // Required to compare recently saved query to a subsequent save to the query + router.push( + getPathWithQueryParams(PATHS.REPORT_DETAILS(queryId), { + host_id: location.query.host_id, + fleet_id: location.query.fleet_id, + }) + ); } catch (updateError) { console.error(updateError); const reason = getErrorReason(updateError);