Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

fix(marketplace): release builds ship the mock catalog and mock installs write to the real extensions folder

未關閉
#1,568 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
43/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
dart, flutter
領域
desktop, devtools

研究方向

Start with lib/core/market/marketplace_repository.dart and inspect the mock repository, ExtensionPaths.extensionsDirectory(), and where the Extension Manager is wired at startup; the issue also points to the generated theme around line 278. Check the related install-path issues #1560 and #1562 and the Beta epic #1499 for scope. Done means release builds cannot present mock installs as real or write them into the extensions folder, and the generated theme name is fixed.

由索引模型根據 Issue 內容生成。

描述

bug marketplace P2 ux

Problem

MarketplaceRepository.instance defaults to MockMarketplaceRepository() (lib/core/market/marketplace_repository.dart:27), and HttpMarketplaceRepository is constructed nowhere in lib/ (only in tests). So the release app's Extension Manager shows and installs a hard-coded demo catalog:

  • 6 fake listings (ClickHouse / Redis / MongoDB / "postgres-exporter" drivers, two themes), some tagged official, with cdn.queryahub.com URLs and fake checksums (e3b0c442...b855 is the SHA-256 of an empty string). Nothing in the UI says the catalog is a demo; the only badge is "Preview" for drivers.
  • Search and "download" are Future.delayed loops that fake progress.
  • Install writes to the user's real extensions folder (ExtensionPaths.extensionsDirectory()): a manifest-only directory, and for themes a generated theme.json. These persist across updates and show as installed extensions.
  • Bug in the generated theme (:278): the template is a non-raw '''...''' string containing "\${manifest.name}". \$ escapes the interpolation, so every generic mock theme is literally named ${manifest.name}.

CHANGELOG lists "Planned 0.5.0 — live Marketplace download and install", so the mock is intentional, but it should not reach users this way.

Fix

  • Until the live API ships: in release builds either hide the Marketplace tab (keep Install from file), or show an explicit "Demo catalog, nothing is downloaded" banner and make Install a no-op that does not touch the extensions folder.
  • Choose the repository by build/config (kDebugMode or a dart-define with the API base URL) in one place at startup; move MockMarketplaceRepository and its fixtures under test/ or a dev-only file.
  • Fix the \${manifest.name} escape (or generate the JSON with jsonEncode, not a template string).
  • Relates to #1560 / #1562 (install path) and the Beta channel epic #1499 (live marketplace may ship to Beta first).
主要語言
Dart
星號
23
分支
1
平均合併
31 分鐘
30 天內合併 PR
570

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

QueryaHub/Querya-Desktop 的其他 Issue

查看 QueryaHub/Querya-Desktop 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。