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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user