Skip to content

Lead installed templates to their app in the catalog - #260

Merged
tnkuehne merged 2 commits into
mainfrom
feat/template-installed-state
Nov 21, 2026
Merged

tnkuehne merged 2 commits into
mainfrom
feat/template-installed-state

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The template catalog offers Install even when the organization already installed the template. Nothing recorded which template an app came from, and the app name is no reliable link: it defaults to the template ID but can be changed.

Change

Record the origin. A template install, from the page or with widefleet catalog templates install, stores the template ID and its commit on the app (app.template_id, app.template_commit, migration 0035). They are written once the install's deployment was accepted, and only while it is the app's only deployment. A rejected deployment, for example by Cloudflare in hosted installations, or an app someone else deployed meanwhile is not marked. Later deployments keep the record.

Show it.

  • The template page shows Open, linking to the app, instead of Install and the network note.
  • The template list marks installed templates.
  • installedAppId on template list entries and template details carries the newest such app the caller manages. catalog templates show and list include it. Template frontmatter cannot set it.

Apps installed before this change have no record and keep showing Install. Installing again under another name stays available through the CLI (--name). There is no update from a newer template version.

Screenshots

Synthetic fixture: a GitHub app with the template favicon, recorded as installed from the github template in the After run. Rendered from main and this branch with an app builder configured.

Template page

Before After
1280 light
1280 dark
390 light
390 dark

Template list

Before After
1280 light
1280 dark
390 light
390 dark

Tests

  • Template installs: the app records the template and commit; the template list and page return the app; a member who cannot manage it does not get it; an app deployed by someone else during the build is not marked; a rejected deployment leaves the template offered.
  • Template frontmatter that sets installedAppId is rejected.
  • pnpm check, control plane tests and the RUN_CLI_TESTS=1 suite pass locally.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; rejected hosted deployments no longer leave an installed-template record.

Summary

Records which template and commit an app came from, then leads catalog users to an app they manage.

  • Template installs record the app’s source template and commit.
  • The catalog marks installed templates and links to the app.

Reviews (5) · Last reviewed commit: "Record a template install once its deplo..." · Reviewed by Greptile

A one-click or CLI template install records the template and its commit on
the app, with the deployment that installs it. The template list marks the
template as installed, and its page offers Open instead of Install.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 63907da Nov 21 2026, 11:16 AM

@tnkuehne
tnkuehne merged commit 907878c into main Nov 21, 2026
17 checks passed
@tnkuehne
tnkuehne deleted the feat/template-installed-state branch November 21, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant