File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed
frontend/src/routes/(app)/projects/[projectId] Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change 386386 }
387387 }
388388
389- applyProjectDetailsToEditor (savedProject , ' saved' );
390- // Pass the enriched project (with locally-preserved include file
391- // content) to the query cache so that any reactive re-read after
392- // save doesn't revert the editor to the lazy-loaded (content-less)
393- // server response.
394- await syncProjectQueries (withLoadedProjectFileContent (savedProject ));
389+ // Preserve the editor's current values as the new baseline rather
390+ // than re-applying the server response via applyProjectDetailsToEditor,
391+ // which triggers a reactive chain that reverts the editor content.
392+ originalName = $inputs .name .value ;
393+ originalComposeContent = $inputs .composeContent .value ;
394+ originalEnvContent = $inputs .envContent .value ;
395+ originalIncludeFiles = { ... includeFilesState };
396+
397+ // Update the project object for runtime info (status, services, etc.)
398+ // without touching the editor inputs.
399+ const enriched = withLoadedProjectFileContent (savedProject );
400+ project = enriched ;
401+ syncIncludeFileUiState (enriched );
402+
403+ await syncProjectQueries (enriched );
404+
405+ // Match the signature to data.project (the stale page-load value)
406+ // so the $effect guard doesn't re-apply old content to the editor.
407+ const currentPageProject = withLoadedProjectFileContent (data .project );
408+ lastSeenProjectSignature = buildProjectSyncSignature (currentPageProject );
409+
395410 toast .success (m .common_update_success ({ resource: m .project () }));
396411 }
397412 });
You can’t perform that action at this time.
0 commit comments