Skip to content

feat(ui): Add a static-asset caching toggle to the domain form#85

Merged
nfebe merged 1 commit into
mainfrom
feat/static-asset-caching
Jul 17, 2026
Merged

feat(ui): Add a static-asset caching toggle to the domain form#85
nfebe merged 1 commit into
mainfrom
feat/static-asset-caching

Conversation

@nfebe

@nfebe nfebe commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

A domain can now opt into a long browser cache for its static assets. The toggle is off by default and only affects static files, so dynamic responses keep the app's own cache headers.

Pairs with the agent-side caching support: flatrun/agent#179.

A domain can now opt into a long browser cache for its static assets. The toggle
is off by default; it only affects static files, so dynamic responses keep the
app's own cache headers.
@sourceant

sourceant Bot commented Jul 17, 2026

Copy link
Copy Markdown

Code Review Summary

This PR introduces a new static_cache feature for domains, allowing users to opt into long-lived browser caching for static assets. The implementation covers the type definitions, UI components, and basic testing.

🚀 Key Improvements

  • Added static_cache toggle to DomainFormModal.vue.
  • Updated DomainConfig interface in src/types/index.ts.
  • Added automated test coverage for the new field in src/components/DomainFormModal.test.ts.

💡 Minor Suggestions

  • Improve the test selector to use the wrapper instead of global document.
  • Ensure the false state is explicitly sent to the API to allow disabling the feature.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

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.

static_cache: true,
});

document.querySelector<HTMLButtonElement>(".btn-primary")?.click();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Using document.querySelector is slightly brittle and bypasses the Vue Test Utils wrapper. It's more idiomatic to use wrapper.find to target the button.

Suggested change
document.querySelector<HTMLButtonElement>(".btn-primary")?.click();
await wrapper.find(".btn-primary").trigger("click");

@nfebe
nfebe merged commit 3648098 into main Jul 17, 2026
5 checks passed
@nfebe
nfebe deleted the feat/static-asset-caching branch July 17, 2026 18:42
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