Fix surface filtering in user settings and welcome surface

The /api/v1/surfaces endpoint doesn't return source field, so
filter by route pattern (/s/ prefix) instead of source !== 'core'.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 13:56:50 +00:00
parent 6e7177f27b
commit 7c5998b6ce
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ function WelcomeSurface() {
useEffect(() => {
sw.api.get('/api/v1/surfaces').then(list => {
setSurfaces((list || []).filter(s => s.source !== 'core'));
setSurfaces((list || []).filter(s => s.route?.startsWith('/s/')));
}).catch(() => {});
}, []);