Skip to content

feat(certificates): Add per-cert renewal and auto-renew controls#57

Merged
nfebe merged 1 commit intomainfrom
feat/cert-renewal
Apr 11, 2026
Merged

feat(certificates): Add per-cert renewal and auto-renew controls#57
nfebe merged 1 commit intomainfrom
feat/cert-renewal

Conversation

@nfebe
Copy link
Copy Markdown
Contributor

@nfebe nfebe commented Apr 11, 2026

Clicking a certificate now opens a details view showing its deployment link, with actions to renew it immediately or toggle auto-renewal. Each card exposes a quick renew shortcut, and deployments gain a Renew SSL action that renews all their certificates at once.

Clicking a certificate now opens a details view showing its
deployment link, with actions to renew it immediately or toggle
auto-renewal. Each card exposes a quick renew shortcut, and
deployments gain a Renew SSL action that renews all their
certificates at once.
@sourceant
Copy link
Copy Markdown

sourceant Bot commented Apr 11, 2026

Code Review Summary

This PR introduces granular control over SSL certificates, including per-certificate renewal, auto-renewal toggling, and bulk renewal for deployments. It also adds a detailed view for certificates.

🚀 Key Improvements

  • Added encodeURIComponent to API calls in src/services/api.ts to improve security and robustness.
  • Implemented a detailed certificate modal in src/views/CertificatesView.vue.
  • Added 'Renew SSL' functionality at the deployment level in src/views/DeploymentDetailView.vue.

💡 Minor Suggestions

  • Pass boolean values to event handlers instead of raw DOM events in Vue templates.
  • Consider componentizing the large modal blocks.

Copy link
Copy Markdown

@sourceant sourceant Bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

Comment thread src/services/api.ts
domain,
}),
renew: () => apiClient.post<{ message: string; result: any }>("/certificates/renew"),
delete: (domain: string) => apiClient.delete(`/certificates/${domain}`),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ensure URI encoding is applied consistently to all path parameters involving user-provided strings like domain names.

Suggested change
delete: (domain: string) => apiClient.delete(`/certificates/${domain}`),
delete: (domain: string) => apiClient.delete(`/certificates/${encodeURIComponent(domain)}`),

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 11, 2026

Deploying flatrun-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: e548a9d
Status: ✅  Deploy successful!
Preview URL: https://f3521398.flatrun-ui.pages.dev
Branch Preview URL: https://feat-cert-renewal.flatrun-ui.pages.dev

View logs

@nfebe nfebe force-pushed the feat/cert-renewal branch from 859b021 to e548a9d Compare April 11, 2026 22:23
Copy link
Copy Markdown

@sourceant sourceant Bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

type="checkbox"
:checked="detailsCert.auto_renew"
:disabled="autoRenewSaving"
@change="handleAutoRenewToggle($event)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The @change handler passes the raw event, which requires manual casting in the script. Using v-model or passing $event.target.checked directly would be cleaner, but given the loading state, updating the checkbox value via a dedicated handler is fine. However, ensure the event target is correctly identified.

Suggested change
@change="handleAutoRenewToggle($event)"
@change="handleAutoRenewToggle($event.target.checked)"

detailsCert.value = null;
};

const handleAutoRenewToggle = async (event: Event) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Update the signature to accept a boolean directly to avoid DOM-specific logic inside the business logic function.

Suggested change
const handleAutoRenewToggle = async (event: Event) => {
const handleAutoRenewToggle = async (enabled: boolean) => {

@nfebe nfebe merged commit 4692c37 into main Apr 11, 2026
5 checks passed
@nfebe nfebe deleted the feat/cert-renewal branch April 11, 2026 22:24
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