fix(marketplace): Add label for no public releases#6256
fix(marketplace): Add label for no public releases#6256
Conversation
|
| Filename | Overview |
|---|---|
| dashboard/src/components/group/AddAppDialog.vue | Adds "No Public Releases" badge check before the "compatible" check — correctly prioritizes the new state over the misleading "Not compatible" badge. |
| press/api/bench.py | Introduces no_public_releases flag correctly, but the repo condition was changed from public_app_sources to app["sources"], which breaks the repository display for incompatible (version-mismatched) apps. |
| dashboard/src/components/ConfigureComputeAllocationDialog.vue | New dialog for toggling compute performance tier, but nextSitePlanName checks isHighPerformanceEnabled as an object instead of .value, causing the wrong plan name to always be computed. |
| dashboard/src/components/SiteActionCell.vue | Wires up the new "Configure compute allocation" action to its async dialog component — straightforward addition following existing patterns. |
| press/press/doctype/site/site.py | Adds "Configure compute allocation" action gated on is_dedicated_server; consolidates the duplicate is_dedicated_server import. Uses doc_method: "dummy" as a placeholder. |
Sequence Diagram
sequenceDiagram
participant UI as AddAppDialog.vue
participant API as bench.py (all_apps)
participant DB as Database
UI->>API: GET all_apps(name)
API->>DB: Query Marketplace Apps (Published, not installed)
API->>DB: Query App Sources (public=1, enabled=1) with versions
DB-->>API: marketplace_app_sources[]
loop for each marketplace app
API->>API: Filter public_app_sources by app
alt no public sources at all
API->>API: app[no_public_releases] = True
end
API->>API: Filter by release_group.version -> app[sources]
API->>API: Set app[repo] (from public_app_sources[0] if app[sources] non-empty)
end
API-->>UI: marketplace_apps[]
UI->>UI: transform(): set compatible = sources.length > 0
alt row.no_public_releases
UI->>UI: Show No Public Releases badge (red)
else row.compatible
UI->>UI: Show Add button
else
UI->>UI: Show Not compatible badge (red)
end
Prompt To Fix All With AI
This is a comment left during a code review.
Path: dashboard/src/components/ConfigureComputeAllocationDialog.vue
Line: 21-31
Comment:
**`isHighPerformanceEnabled` always truthy in script context**
`isHighPerformanceEnabled` is a `ComputedRef<boolean>`, not a raw boolean. Inside `<script setup>`, computed refs are not auto-unwrapped, so `if (isHighPerformanceEnabled)` evaluates the object reference (always truthy) rather than its value. This means `nextSitePlanName` always takes the "currently high performance → disable" branch, so clicking "Enable High Performance" will actually try to disable it instead of enabling it.
Use `isHighPerformanceEnabled.value` to read the actual computed boolean.
```suggestion
const nextSitePlanName = computed(() => {
if (isHighPerformanceEnabled.value) {
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: press/api/bench.py
Line: 533-538
Comment:
**`app["repo"]` is `None` for incompatible apps, breaking repo display**
The original code set `app["repo"]` from any available source for the app (regardless of version) specifically for "fetching repo details for incompatible apps". The new code gates it on `app["sources"]` (version-matched sources), so when an app has public releases but none matching the current bench version — the "Not compatible" case — `app["sources"]` is empty and `app["repo"]` becomes `None`. The `Repository` column in the UI then shows nothing for incompatible apps.
The condition should use `public_app_sources` (all public sources for this app), not the version-filtered `app["sources"]`:
```suggestion
app["repo"] = (
f"{public_app_sources[0].repository_owner}/{public_app_sources[0].repository}"
if public_app_sources
else None
)
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(marketplace): Add label for no publi..." | Re-trigger Greptile
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (61.53%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #6256 +/- ##
===========================================
+ Coverage 49.53% 56.25% +6.72%
===========================================
Files 935 935
Lines 77596 77604 +8
Branches 353 526 +173
===========================================
+ Hits 38434 43653 +5219
+ Misses 39138 33923 -5215
- Partials 24 28 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Previously when there were no public releases, apps used to have "Not compatible" badge which was misleading (ref: https://support.frappe.io/helpdesk/tickets/63966). This commit adds an explicit badge "No Public Releases" when that happens.
dfa6771 to
9c49d8f
Compare
Previously when there were no public releases for published marketplace apps, apps used to have "Not compatible" badge which was misleading (ref: https://support.frappe.io/helpdesk/tickets/63966). This commit adds an explicit badge "No Public Releases" when that happens.
Either never allow published marketplace apps with zero public releases, or merge this PR and fix the presentation.
Before:
After: