meta { name: Preview Theme type: http seq: 2 } get { url: {{web_url}}/settings/preview?lightThemeUri=at://{{forum_did}}/space.atbb.forum.theme/3lbllight } params:query { lightThemeUri: at://{{forum_did}}/space.atbb.forum.theme/3lbllight } assert { res.status: eq 200 } docs { HTMX endpoint — returns an HTML fragment with color swatches for the given theme. Called automatically by the settings page when the user changes a theme select. Returns a
fragment that HTMX swaps into the page. Accepts exactly one of: - lightThemeUri: AT URI of a light theme - darkThemeUri: AT URI of a dark theme The endpoint fetches the theme from the AppView by rkey, extracts these tokens: color-bg, color-surface, color-primary, color-text, color-border Returns the fragment:
Theme Name
...
Returns empty fragment on any of: - No query param provided - URI fails rkey extraction (malformed) - AppView returns non-ok status (unknown theme) - Network error reaching AppView Error codes: - 200: Always — never errors, returns empty fragment on failure Empty fragment:
}