Skip to content

ENG-9585: Remove os templates#6592

Merged
masenf merged 7 commits into
mainfrom
carlos/remove-os-templates
Jun 3, 2026
Merged

ENG-9585: Remove os templates#6592
masenf merged 7 commits into
mainfrom
carlos/remove-os-templates

Conversation

@carlosabadia
Copy link
Copy Markdown
Contributor

No description provided.

@carlosabadia carlosabadia requested review from a team and Alek99 as code owners June 1, 2026 13:22
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 1, 2026

ENG-9585

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 1, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing carlos/remove-os-templates (acf0959) with main (17e3392)

Open in CodSpeed

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 1, 2026

Greptile Summary

This PR removes the open-source templates feature end-to-end: the docs gallery page, sidebar entry, individual template markdown files, gallery route generation, TemplatesState/sidebar/pagination components, the choose-templates prompt option in reflex init, and the corresponding constants and redirect helper.

  • The Python-side cleanup (templates.py, redir.py, constants/base.py) is complete — no dangling references remain for CHOOSE_TEMPLATES, REFLEX_TEMPLATES_URL, or reflex_templates().
  • gallery_app_page.py in reflex_site_shared/templates/ was only ever imported by the now-deleted apps.py and is left as unreachable dead code; it should be removed alongside the rest of the cleanup.

Confidence Score: 4/5

Safe to merge — the removal is consistent across docs, shared components, and the CLI prompt with all import chains properly updated.

The only loose end is gallery_app_page.py, which is now unreachable code but causes no runtime error. All functional paths are cleanly removed.

packages/reflex-site-shared/src/reflex_site_shared/templates/gallery_app_page.py — orphaned after apps.py deletion.

Important Files Changed

Filename Overview
reflex/utils/templates.py Removes the choose-templates prompt option and its associated redirect branch from initialize_app; logic that remains (AI redirect, blank/default template) is untouched.
reflex/utils/redir.py Removes reflex_templates() helper; no remaining callers in the codebase.
packages/reflex-base/src/reflex_base/constants/base.py Removes CHOOSE_TEMPLATES and REFLEX_TEMPLATES_URL constants from the Templates namespace; no remaining references in the codebase.
packages/reflex-site-shared/src/reflex_site_shared/gallery/apps.py Entire file deleted — contained gallery route generation, more_posts, and page renderer for open-source templates; all consumers updated in this PR.
packages/reflex-site-shared/src/reflex_site_shared/gallery/sidebar.py Entire file deleted — contained TemplatesState, filter sidebar, and pagination components; no remaining consumers.
packages/reflex-site-shared/src/reflex_site_shared/components/code_card.py Removes gallery_app_card component and the now-unused re import; code_card (the remaining export) is unchanged.
docs/app/reflex_docs/pages/init.py Removes import of gallery_apps_routes and its spread into routes; avoids a broken import since apps.py is deleted.
packages/reflex-site-shared/src/reflex_site_shared/templates/gallery_app_page.py No longer imported by anything after apps.py is deleted — this file is now dead code that was not removed in this PR.
docs/app/reflex.lock/bun.lock Dependency lockfile regeneration: removes react-dropzone, bumps vite to 8.0.14, and updates various @babel/* and @rolldown/* packages to latest minor/patch versions.

Reviews (1): Last reviewed commit: "ENG-9585: Remove os templates" | Re-trigger Greptile

FarhanAliRaza
FarhanAliRaza previously approved these changes Jun 2, 2026
Copy link
Copy Markdown
Contributor

@FarhanAliRaza FarhanAliRaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/reflex-site-shared/.../templates/gallery_app_page.py
packages/reflex-site-shared/.../components/code_card.py
They become orphaned if that is intentional.

masenf
masenf previously requested changes Jun 2, 2026
Copy link
Copy Markdown
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's more code that needs to be removed here, about to push a commit

We don't need to enumerate templates for a release anymore, so this code can be
removed.
Copy link
Copy Markdown
Contributor

@FarhanAliRaza FarhanAliRaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RELEASES_URL = "https://api.github.com/repos/reflex-dev/templates/releases"

There is no user of this constant.

in validate_and_create_app_using_remote_template

  After simplification, template_url is always a non-None f-string on the only
  non-raising path, so:
  if template_url is None:
      return

@masenf masenf merged commit bb8b6f5 into main Jun 3, 2026
107 checks passed
@masenf masenf deleted the carlos/remove-os-templates branch June 3, 2026 23:13
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.

3 participants