Ajit/poslish app#2165
Conversation
fix(updates): correct semver version comparison logic refactor(plugin): replace rating colors with theme variables - Add fetchPromotions() to cache promotional content from API - Render cached promotions as settings items with image icons - Support item.image in settings list for inline image rendering - Fix version check to compare semver components sequentially - Add --success-text-color CSS variable and ThemeBuilder accessor - Replace hardcoded brand icon colors with inherited theme colors - Add like/like-solid icon glyphs with cache-busting font URL (?v3) - Add settings-category-discover-apps i18n string across all locales - Fix file mode on style.css (755→644) - Validate promotion icon/link_text types before rendering
Greptile SummaryThis PR polishes the app by adding a server-driven promotions section to the settings page, fixing a version-comparison bug, refreshing the plugin rating display, and updating the icon font with new icons and simplified brand-colour rules.
Confidence Score: 5/5Safe to merge; the promotions feature validates click-target URLs but leaves the icon image URL unvalidated — a low-impact gap worth a follow-up. All changed paths are well-contained: the version-comparison rewrite is a straightforward loop improvement, the UI changes are cosmetic, and the promotions feature correctly validates promo.url before browser navigation. The one gap — promo.icon reaching img src without a scheme check — is limited in impact because image loading in a WebView doesn't execute JS and the remote data comes from the project's own API endpoint. src/settings/mainSettings.js — the promo.icon field is passed to img src without scheme validation, unlike promo.url which has an https-only guard. Important Files Changed
Sequence DiagramsequenceDiagram
participant App as App (onDeviceReady)
participant API as API (/promotions)
participant LS as localStorage
participant MS as mainSettings()
participant SP as settingsPage
participant Browser as system.openInBrowser
App->>API: fetch /promotions
API-->>App: "[{label, url, icon, link_text}, ...]"
App->>LS: setItem("cached_promotions", JSON)
Note over MS: User opens Settings
MS->>LS: getItem("cached_promotions")
LS-->>MS: cached promotions array
MS->>SP: "push items with link=promo.url, image=promo.icon"
SP-->>MS: settings page rendered
Note over SP: User clicks promotion item
SP->>Browser: system.openInBrowser(link)
Reviews (2): Last reviewed commit: "fix(promotions): allow server to clear c..." | Re-trigger Greptile |
… URL scheme - Remove data.length guard so empty [] response clears stale promotions - Validate promo.url starts with http:// or https:// before rendering
|
@greptile_apps review again |
No description provided.