Skip to content

fix(marketplace): Add label for no public releases#6256

Open
regdocs wants to merge 1 commit intodevelopfrom
fix-marketplace
Open

fix(marketplace): Add label for no public releases#6256
regdocs wants to merge 1 commit intodevelopfrom
fix-marketplace

Conversation

@regdocs
Copy link
Copy Markdown
Member

@regdocs regdocs commented Apr 26, 2026

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:

Screenshot 2026-04-26 at 12 27 34 PM

After:

Screenshot 2026-04-26 at 12 29 03 PM

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 26, 2026

Greptile Summary

This PR fixes a misleading "Not compatible" badge in the marketplace app list by adding an explicit "No Public Releases" badge when an app has no public sources at all. It also bundles a new "Configure compute allocation" dialog for dedicated-server sites (unrelated to the stated fix).

Two P1 issues were found:

  • nextSitePlanName in ConfigureComputeAllocationDialog.vue checks the ComputedRef object itself instead of .value, so the dialog always computes the wrong next plan (can never enable high performance).
  • The app[\"repo\"] condition in bench.py was changed from public_app_sources to the version-filtered app[\"sources\"], which silently sets repo to None for incompatible (but publicly released) apps, breaking the Repository column for those rows.

Confidence Score: 4/5

Not safe to merge as-is — two P1 bugs in the bundled compute allocation feature need to be fixed first.

The primary marketplace fix (no_public_releases badge) is correct, but the bundled ConfigureComputeAllocationDialog has a Vue reactivity bug that makes "Enable High Performance" non-functional, and the bench.py repo condition regression breaks the Repository column for incompatible apps.

dashboard/src/components/ConfigureComputeAllocationDialog.vue and press/api/bench.py

Important Files Changed

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
Loading
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

Comment thread dashboard/src/components/ConfigureComputeAllocationDialog.vue Outdated
Comment thread press/api/bench.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

❌ Patch coverage is 61.53846% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.25%. Comparing base (b9bfdc5) to head (9c49d8f).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
press/api/bench.py 16.66% 5 Missing ⚠️

❌ 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     
Flag Coverage Δ
dashboard 90.75% <100.00%> (+30.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant