Skip to content

feat(ui): rework extension update detection and entry point - #1535

Merged
monkeyWie merged 17 commits into
mainfrom
codex/extension-update-check
Oct 10, 2026
Merged

monkeyWie merged 17 commits into
mainfrom
codex/extension-update-check

Conversation

@monkeyWie

@monkeyWie monkeyWie commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Single source of truth for update availability: installed extensions are checked against GitHub live via the backend update endpoint on every extension page load. The update badge no longer depends on the extension store index, which can lag behind and previously masked new releases in the market view.

  • One update entry point: a green status chip (● 可更新) next to the extension title — on cards, the desktop detail drawer and the mobile details page. Tapping it opens the existing update confirmation dialog. The former refresh-icon button on cards and the update button in the detail actions are gone; after a successful upgrade the chip disappears immediately.

  • Card cleanup: all extension cards (including extensions missing from the store index) open the detail view on tap; homepage/GitHub/settings/remove remain as card actions.

  • Silent failure: a failed update check simply hides the chip until the next successful check; no error toast.

  • Wording aligned with the app upgrade dialog: dialog title uses newVersionAvailable and the confirm button label newVersionUpdate ("更新" / "Update") across all 22 locales.

  • Robustness: the chip is flex-sized and its label ellipsizes, so long translations (e.g. it, ta) degrade gracefully on minimum-width cards instead of overflowing; the pointer cursor is reserved for the tappable chip.

  • Installed README: render local extension documentation without waiting for the market API, including extensions absent from the store index. Reload it when the installed version changes so an open detail view shows the updated README immediately.

Test plan

  • flutter analyze clean
  • Existing extension-related widget tests passing (22/22), including the full update-confirm flow
  • README regression tests passing (7/7): pending market requests, stale market responses, upgrade reloads on desktop/mobile, and missing-file fallback

/cc review notes: extensions_controller.dart and extensions_page.dart are the core review targets; extension_update_status.dart is the new shared chip widget.

- Update availability is now decided solely by the backend live GitHub
  check (updateFlags); the store index may lag and previously masked
  new versions in the market view.
- Replace the ambiguous refresh icon on extension cards with a labeled
  update button, and add a red dot badge on extension icons (card and
  detail view) when an update is available.
- Surface a toast when the update check fails instead of failing silently.
Drop homepage/GitHub buttons from store extension cards (they remain on
the detail page); keep them only for unlisted extensions whose cards do
not open a detail view. With the labeled update button this caps card
actions at update/settings/delete.
Installed extensions missing from the store index previously had no tap
handler on their card, so they kept on-card homepage/GitHub buttons as
the only metadata entry. Make all cards open the detail view and drop
the homepage/GitHub buttons entirely; details remain the single place
for links.
- Move the update dot from the icon corner to beside the card title
- Restyle the card update button to match the row's ghost buttons
- Drop the detail-view dot; the existing update status chip covers it
- Rename the detail update button label to just Update
Card and detail headers now show a green update chip next to the
extension title; on cards it opens the update dialog directly. The red
dot and the red card button are gone, and the status chip no longer
duplicates inside the detail content. Shorten the English label so the
chip fits narrow cards.
Long translations (e.g. Italian, Tamil) could exceed the card title row
on minimum-width cards. The chip is now flex-sized and its label
ellipsizes, so the title and chip degrade gracefully at any width and
locale.
Remove the update button from the detail actions; the green chip next
to the extension title opens the update dialog on cards, the desktop
drawer and the mobile details page alike.
Extension cards no longer show a pointer cursor on hover; the tappable
update status chip shows it instead, on cards and detail headers alike.
Pill shape with a brand-green tint, outline and dot so the status
reads as a badge next to the title instead of plain text.
The shared newVersionUpdate label now reads Update on the app upgrade
dialog, the tracker update button and the extension update dialog, so
the extension flow matches the host dialog wording.
- Space the update chip off the card title to match the detail header
- Clear the extension's update flag right after a successful upgrade so
  the chip disappears without waiting for the background re-check
- Use the concise Update label across all locales
A failed check simply means no update chip; the failure toast and its
state field are removed.
@codecov

codecov Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.64%. Comparing base (fe25cca) to head (1743036).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1535      +/-   ##
==========================================
+ Coverage   70.53%   70.64%   +0.10%     
==========================================
  Files          88       89       +1     
  Lines       14346    14433      +87     
==========================================
+ Hits        10119    10196      +77     
- Misses       3099     3102       +3     
- Partials     1128     1135       +7     

☔ View full report in Codecov by Harness.
📢 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.

monkeyWie added a commit that referenced this pull request Sep 25, 2026
@monkeyWie monkeyWie added the enhancement New feature or request label Oct 10, 2026
@monkeyWie
monkeyWie merged commit 87a8f87 into main Oct 10, 2026
15 of 16 checks passed
@monkeyWie
monkeyWie deleted the codex/extension-update-check branch October 10, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant