Repository navigation
Show the app fit on the app page only, with Install disabled - #626
Conversation
After trying #599 on a running box, the maintainer wants no fit warning in the store, the notice in the right column under Information, and a too-big app's Install kept but disabled. Store cards lose the badge, and the list routes stop carrying fit, so a list request no longer reads the box. The notice moves under the Memory and CPU rows. Install stays disabled for too-big on the App page and the pack page, which says nothing about why.
|
| listed := map[string]bool{} | ||
| for _, e := range decodeJSON[appsBody](t, h.getOK("/api/v1/catalog")).Apps { | ||
| if e.Fit == nil { | ||
| t.Fatalf("%s carries no fit", e.ID) | ||
| listed[e.ID] = true | ||
| if e.Fit != nil { | ||
| t.Errorf("list: %s carries a fit; the store lists show none", e.ID) | ||
| } |
There was a problem hiding this comment.
TestCatalogCarriesFit checks that /catalog omits fit, but not that browsing skips SystemResources. A list request could still read the box and discard the result, and this test would pass.
Count those calls and assert zero for the list routes before checking detail and install-plan responses. Also check that entries inside home, category, search, and pack responses omit fit.
From testing on the dev box. The fit notice is a yellow Tailwind alert with a title and a description, as its own block above the price panel. The too-big text reads "This app can't run on this box as it is. It requires X of memory, and this box only has Y.", and the brain's install refusal says the same. The App page also warns when the disk may not fit the app, with the 90% rule the install pages use. WarningAlert holds the alert markup both use.
The store lists stopped showing a fit, so Catalog.WithFit walked every list shape for one caller. The detail handler now computes the fit from Detail.Recommended, and Fit moves from Entry to Detail, where it is set. useStartInstall returns tooBig, which the App page and the pack row each worked out on their own.
The specs, the architecture row and the progress entry still described the notice under Information and Catalog.WithFit. They now say what was built after testing: the yellow alert above the price panel, its text, the disk warning on the App page, and Fit as a Detail field.
|
Greptile P2s: the alert position above the price panel is the maintainer's choice after testing (the old PR description said otherwise; updated). |
Follows #625 (#599), after trying it on the dev box.
What changes
WarningAlert.vue). Too big: "This app can't run on this box as it is." / "It requires X of memory, and this box only has Y." The brain's install refusal uses the same words. Placement and wording are the maintainer's choice after testing.needs-remapis unchanged.Catalog.WithFitis removed.Fitmoved fromEntrytoDetail, the detail handler computes it fromDetail.Recommended(), and list routes no longer read the box.useStartInstallreturnstooBig.Specs,
architecture.mdanddocs/progress/fit-notice-placement.mdupdated.Tested