Conversation
…carlos/templates-ui
… carlos/templates-ui
…carlos/templates-ui
Greptile SummaryThis PR introduces a full Templates section to the reflex.dev website, including a templates listing page ( Key findings:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Browser
participant TemplatesState
participant BuildBackend as Build Backend API
User->>Browser: Navigate to /templates
Browser->>TemplatesState: load_templates (on_load)
alt _all_templates is empty
TemplatesState->>BuildBackend: GET /api/v1/flexgen/templates/details
BuildBackend-->>TemplatesState: list[dict]
TemplatesState->>TemplatesState: _parse_templates_map()
TemplatesState->>TemplatesState: _compute_tags() → self.tags
TemplatesState->>TemplatesState: self.checked_tags = all tags
else _all_templates already set
TemplatesState->>TemplatesState: self.checked_tags = {t["label"] for t in self.tags}
Note over TemplatesState: ⚠️ Bug: self.tags may be empty<br/>if arriving from detail page
end
TemplatesState-->>Browser: filtered_templates (computed var)
User->>Browser: Hover over card
Browser->>TemplatesState: prefetch_template(template_id)
TemplatesState->>BuildBackend: GET /api/v1/flexgen/templates/{id}
BuildBackend-->>TemplatesState: dict
User->>Browser: Click card → /templates/[id]
Browser->>TemplatesState: load_template_details (on_load)
alt active_template.id == template_id
TemplatesState->>TemplatesState: reuse cached template
else
TemplatesState->>BuildBackend: GET /api/v1/flexgen/templates/{id}
BuildBackend-->>TemplatesState: dict
end
alt _all_templates is empty
TemplatesState->>BuildBackend: GET /api/v1/flexgen/templates/details
BuildBackend-->>TemplatesState: list[dict]
Note over TemplatesState: ⚠️ Bug: tags NOT computed here
end
TemplatesState->>TemplatesState: compute related_templates (top 3 by tag overlap)
TemplatesState-->>Browser: active_template, related_templates
|
…carlos/templates-ui
No description provided.