Show custom app titles and logos from pyproject - #387
Open
abdullla00 wants to merge 1 commit into
Open
Conversation
Read `[tool.bench].app_title` and local logo.svg for non-registry apps so Pilot marketplace cards match hooks/pyproject branding instead of sentence-casing the package name. Co-authored-by: Cursor <cursoragent@cursor.com>
tanmoysrt
reviewed
Aug 15, 2026
Comment on lines
96
to
+129
| return title, description | ||
|
|
||
| def find_logo_path(self, app_path: Path, name: str) -> Path | None: | ||
| """Resolve a local app logo for Pilot marketplace / apps list.""" | ||
| pyproject = app_path / "pyproject.toml" | ||
| declared = "" | ||
| if pyproject.exists(): | ||
| try: | ||
| data = tomllib.loads(pyproject.read_text()) | ||
| declared = str((((data.get("tool") or {}).get("bench") or {}).get("app_logo") or "")).strip() | ||
| except (tomllib.TOMLDecodeError, OSError): | ||
| declared = "" | ||
|
|
||
| candidates: list[Path] = [] | ||
| if declared: | ||
| # Paths in pyproject are usually relative to the repo root. | ||
| candidates.append(app_path / declared) | ||
| # Also accept module-relative paths written as rozh_fieldops/public/... | ||
| if declared.startswith(f"{name}/"): | ||
| candidates.append(app_path / declared) | ||
| candidates.extend( | ||
| [ | ||
| app_path / "logo.svg", | ||
| app_path / "logo.png", | ||
| app_path / name / "public" / "logo.svg", | ||
| app_path / name / "public" / "logo.png", | ||
| app_path / name / "public" / "images" / f"{name.replace('_', '-')}-logo.svg", | ||
| app_path / name / "public" / "images" / f"{name}-logo.svg", | ||
| ] | ||
| ) | ||
| for path in candidates: | ||
| if path.is_file(): | ||
| return path | ||
| return None |
Member
There was a problem hiding this comment.
Better to not introduce any custom block in pyproject.yaml. Also, avoid any random search for logo.
In frappe apps, their are multiple ways to set app logo is by setting app_logo_url or add_to_app_screen in hooks.py . We should interpret those.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[tool.bench].app_title(instead of packagename) for custom/non-registry appslogo.svg/ declaredapp_logoand serve via/api/v1/apps/<name>/logologo_urlthroughWhy
Custom GitHub apps currently render as sentence-cased package names (e.g.
rozh_fieldops→ "Rozh fieldops") with a letter avatar, even whenapp_titleand a logo exist in the repo.Test plan
pyproject.tomlhas[tool.bench] app_title = "Rozh Field Operations"andapp_logo = "logo.svg"Made with Cursor