Skip to content

fix: Action preview url was clearing on save. This fixes that.#3844

Open
MechMel wants to merge 1 commit into
pingdotgg:mainfrom
Asteroid-Apps:fix/project-script-preview-url-persistence
Open

fix: Action preview url was clearing on save. This fixes that.#3844
MechMel wants to merge 1 commit into
pingdotgg:mainfrom
Asteroid-Apps:fix/project-script-preview-url-persistence

Conversation

@MechMel

@MechMel MechMel commented Jul 9, 2026

Copy link
Copy Markdown

What Changed

Persist previewUrl and autoOpenPreview when saving or editing project actions.

Previously, ProjectScriptsControl normalized those fields into NewProjectScriptInput, but ChatView rebuilt the persisted ProjectScript object 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:

  • ProjectScriptsControl continues to normalize form input
  • ChatView continues to construct the persisted ProjectScript inline
  • the add/edit object literals now include previewUrl and autoOpenPreview
  • clearing the Preview URL also clears both persisted fields on edit

Why

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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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 ProjectScript data.

ProjectScriptsControl already put those values on NewProjectScriptInput, but ChatView's saveProjectScript / updateProjectScript rebuilt scripts without them—so the Preview URL field cleared after save and auto-open did not stick. Add now copies previewUrl and autoOpenPreview when 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 previewUrl and autoOpenPreview in action preview URL settings

In ChatView.tsx, previewUrl and autoOpenPreview are now correctly included when creating or updating a ProjectScript object. When input.previewUrl is non-null, both fields are set; when null, they are explicitly cleared to undefined on update or omitted on create.

Macroscope summarized 371bd38.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: abb2efc6-8b4c-4f9c-9eab-969050b2c98f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@macroscopeapp

macroscopeapp Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Straightforward bug fix that adds missing field persistence when creating/updating project scripts. The 6-line change simply spreads previewUrl and autoOpenPreview into script objects that were previously omitting them.

You can customize Macroscope's approvability policy. Learn more.

@MechMel MechMel changed the title fix: persist action preview url settings fix: Action preview url was clearing on save. This fixes that. Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant