diff --git a/apps/web/src/components/flows/FlowHeader.tsx b/apps/web/src/components/flows/FlowHeader.tsx index 24e87a7d2..f7e510fcd 100644 --- a/apps/web/src/components/flows/FlowHeader.tsx +++ b/apps/web/src/components/flows/FlowHeader.tsx @@ -259,7 +259,7 @@ function PublishToCommunityModal({ flow, onClose }: { flow: Flow; onClose: () => headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ tags }), }); - if (res.status === 400) { setErr('No community key configured. Add it in Settings → Community to publish.'); return; } + if (res.status === 400) { setErr('Publishing to the community hub is not configured on this instance.'); return; } if (res.status === 409) { setErr('Publish a version of this flow first, then publish it to the community.'); return; } if (res.status === 403) { setErr('Only workspace owners, admins, and editors can publish.'); return; } if (!res.ok) { setErr('Publish failed. Try again.'); return; } diff --git a/apps/web/src/components/settings/CommunitySettings.tsx b/apps/web/src/components/settings/CommunitySettings.tsx deleted file mode 100644 index 8f9904f33..000000000 --- a/apps/web/src/components/settings/CommunitySettings.tsx +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Community settings (Community Flows — Phase 3, P3-6). - * Shows this instance's community-hub status. The publish credential - * (COMMUNITY_HUB_KEY) is an instance env var, so this surface is read-only: - * it reports the hub URL, whether the feature is enabled, and whether a key is - * configured (i.e. whether publishing is available). Self-hosters set the key - * via env; there is no browser-writable secret here by design. - */ -import { type JSX, useEffect, useState } from 'react'; - -const ink = 'var(--ink, #e7e7e9)'; -const soft = 'var(--ink-soft, #a1a1aa)'; -const muted = 'var(--ink-muted, #71717a)'; -const line = 'var(--line, rgba(255,255,255,0.1))'; -const surface = 'var(--surface, rgba(255,255,255,0.02))'; - -interface Config { - enabled: boolean; - hub_url: string; - can_publish: boolean; -} - -function Row({ label, children }: { label: string; children: React.ReactNode }): JSX.Element { - return ( -
- {label} - {children} -
- ); -} - -export function CommunitySettings(): JSX.Element { - const [cfg, setCfg] = useState(null); - const [err, setErr] = useState(null); - - useEffect(() => { - void (async () => { - try { - const res = await fetch('/api/community/config', { credentials: 'include' }); - if (!res.ok) throw new Error(String(res.status)); - setCfg((await res.json()) as Config); - } catch { - setErr('Could not load community settings.'); - } - })(); - }, []); - - if (err) return
{err}
; - if (!cfg) return
Loading…
; - - return ( -
-
- {cfg.enabled ? 'Enabled' : 'Disabled'} - {cfg.hub_url} - - {cfg.can_publish ? ( - Available ✓ - ) : ( - Key not configured - )} - -
- -

- Browsing and importing community flows works out of the box. To publish your own flows, - this instance needs a community-license key set as the COMMUNITY_HUB_KEY environment - variable. Get a free key from the community sign-up. To point at a different hub or disable the feature - entirely, set COMMUNITY_HUB_URL / COMMUNITY_HUB_ENABLED. -

-
- ); -} diff --git a/apps/web/src/layouts/SettingsLayout.astro b/apps/web/src/layouts/SettingsLayout.astro index 195a26736..bb42d323d 100644 --- a/apps/web/src/layouts/SettingsLayout.astro +++ b/apps/web/src/layouts/SettingsLayout.astro @@ -44,7 +44,6 @@ const NAV_SECTIONS = [ items: [ { href: '/app/settings/workspace', label: 'Workspace' }, { href: '/app/settings/api-keys', label: 'API Keys' }, - { href: '/app/settings/community', label: 'Community' }, { href: '/app/settings/dev', label: 'Dev / AgentLens' }, ], }, diff --git a/apps/web/src/pages/app/settings/community.astro b/apps/web/src/pages/app/settings/community.astro deleted file mode 100644 index 09d6d29a2..000000000 --- a/apps/web/src/pages/app/settings/community.astro +++ /dev/null @@ -1,17 +0,0 @@ ---- -import SettingsLayout from '../../../layouts/SettingsLayout.astro'; -import { CommunitySettings } from '../../../components/settings/CommunitySettings'; - -const auth = Astro.locals.auth; -if (!auth) { - return Astro.redirect('/auth/login'); -} ---- - - -

Settings

-

Community

-

Browse and import community flows, and publish your own for others to use.

- - -