Implement catalog startup diagnostics (T-616)

This commit is contained in:
ila
2026-07-19 22:22:46 +08:00
parent 06234e11bf
commit 2c561894fd
28 changed files with 715 additions and 23 deletions
+5
View File
@@ -34,6 +34,7 @@ type AppShell struct {
iconRequests map[string]application.IconEventIdentity
iconApplied map[string]application.IconEventIdentity
iconFailures map[string]iconFailureState
catalogState catalogPresentationState
lastRendered int
detailRendered bool
}
@@ -58,6 +59,9 @@ func NewAppShell(
}
shell.search.SingleLine = true
shell.SetItems(items)
if len(items) == 0 {
shell.catalogState = catalogStateLoading
}
return shell
}
@@ -76,6 +80,7 @@ func (shell *AppShell) ApplyIcon(appID string, icon image.Image) {
// SetItems applies a prepared, IO-free catalog/status snapshot.
func (shell *AppShell) SetItems(items []application.CatalogListItem) {
shell.model.SetItems(items)
shell.catalogState = catalogStateReady
nextRows := make(map[string]*rowControls, len(items))
nextIcons := make(map[string]paint.ImageOp, len(items))