Skip to content

fix: always show save button on template pages#2402

Merged
kmendell merged 1 commit into
getarcaneapp:mainfrom
GiulioSavini:fix/template-save-button-validation-ready
Apr 18, 2026
Merged

fix: always show save button on template pages#2402
kmendell merged 1 commit into
getarcaneapp:mainfrom
GiulioSavini:fix/template-save-button-validation-ready

Conversation

@GiulioSavini
Copy link
Copy Markdown
Contributor

@GiulioSavini GiulioSavini commented Apr 18, 2026

Summary

  • The save button on /customize/templates/default and /customize/templates/[id] was hidden behind {#if composeValidationReady && envValidationReady}
  • After the switch from Monaco to CodeMirror, the linter only runs on content changes — so validationReady stays false on initial page load and the button never appears
  • Removed the {#if} guard; button is always visible and disabled via disabled={!canSave} which already enforces hasChanges, validationReady, and !hasErrors

Fixes #2387

Test plan

  • Open /customize/templates/default — save button is visible but disabled until changes are made
  • Open a custom template /customize/templates/[id] — same behaviour
  • Make a change with a YAML error — button stays disabled
  • Fix the error — button enables

Disclaimer Greptiles Reviews use AI, make sure to check over its work.

To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike

To have Greptile Re-Review the changes, mention greptileai.

Greptile Summary

This PR fixes the save button being permanently invisible on template pages after the Monaco → CodeMirror migration, where the linter no longer runs on initial page load so validationReady stays false. The {#if} visibility guard is removed and the button is always rendered, relying on disabled={!canSave} which already encodes the same conditions (hasChanges, validationReady, no errors). The handleSave functions also retain their own defensive guards, so the save action remains safe.

Confidence Score: 5/5

Safe to merge — the fix is correct, minimal, and the save action remains properly guarded.

canSave already encodes all conditions that were in the removed {#if} guard, handleSave retains its own defensive checks, and the button stays inside the remote-template guard in [id]/+page.svelte. No logic regressions found.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: always show save button on template..." | Re-trigger Greptile

@kmendell
Copy link
Copy Markdown
Member

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@kmendell kmendell merged commit 0225892 into getarcaneapp:main Apr 18, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Bug: Default template page has no save button

2 participants