Fix default surface resolution for type:full packages

resolveDefaultSurface was using ListEnabledByType("surface") which
missed extension packages with type "full". Switch to List() and
filter by source != core/builtin + type surface/full.

Also make welcome surface smarter: detect when extensions exist
but no default is set vs truly empty install, show appropriate
messaging and CTA (Set Default Surface vs Go to Packages).

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

View File

@@ -129,14 +129,17 @@ func (e *Engine) resolveDefaultSurface(ctx context.Context, userID string) strin
}
}
// 3. First enabled extension surface
surfaces, err := e.stores.Packages.ListEnabledByType(ctx, "surface")
// 3. First enabled extension surface (type "surface" or "full")
allPkgs, err := e.stores.Packages.List(ctx)
if err == nil {
for _, s := range surfaces {
if s.Source == "core" {
for _, s := range allPkgs {
if s.Source == "core" || s.Source == "builtin" {
continue
}
if s.Enabled {
if !s.Enabled {
continue
}
if s.Type == "surface" || s.Type == "full" {
return "/s/" + s.ID
}
}