fix: Action preview url was clearing on save. This fixes that.#3844
fix: Action preview url was clearing on save. This fixes that.#3844MechMel wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Straightforward bug fix that adds missing field persistence when creating/updating project scripts. The 6-line change simply spreads You can customize Macroscope's approvability policy. Learn more. |
What Changed
Persist
previewUrlandautoOpenPreviewwhen saving or editing project actions.Previously,
ProjectScriptsControlnormalized those fields intoNewProjectScriptInput, butChatViewrebuilt the persistedProjectScriptobject without copying them. This made the Preview URL field clear itself after save, and prevented the auto-open preview flag from sticking.The fix keeps the existing local pattern:
ProjectScriptsControlcontinues to normalize form inputChatViewcontinues to construct the persistedProjectScriptinlinepreviewUrlandautoOpenPreviewWhy
Previously when creating or editing actions the preview url and auto open preview settings were not saving when I clicked "Save". That should work now.
Checklist
No visual UI change; screenshots and video are not applicable.
Note
Low Risk
Narrow persistence fix in project script save handlers; no auth or broad behavior changes beyond action configuration.
Overview
Fixes project action save/edit so preview URL and auto-open preview settings actually reach persisted
ProjectScriptdata.ProjectScriptsControlalready put those values onNewProjectScriptInput, butChatView'ssaveProjectScript/updateProjectScriptrebuilt scripts without them—so the Preview URL field cleared after save and auto-open did not stick. Add now copiespreviewUrlandautoOpenPreviewwhen a URL is set; edit does the same or explicitly clears both fields when the URL is removed.Reviewed by Cursor Bugbot for commit 371bd38. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix persistence of
previewUrlandautoOpenPreviewin action preview URL settingsIn ChatView.tsx,
previewUrlandautoOpenPrevieware now correctly included when creating or updating aProjectScriptobject. Wheninput.previewUrlis non-null, both fields are set; when null, they are explicitly cleared toundefinedon update or omitted on create.Macroscope summarized 371bd38.