feat: add server icon, edit link, and permanent tabs to plugin updater - #246
Conversation
Restores a few UI refinements from the pre-revert plugin-store work (fbe520b..71d1368) that never made it back in: each server tab shows its live favicon (or a Globe fallback) fetched via getServerStatus, tabs linked to a real Server List listing are marked permanent so they can't be accidentally deleted, and an external-link button next to linked tabs opens that server's edit page. Also tightens the export button's padding to match the rest of the toolbar row. The external link now points at /serverlist/:slug/edit (the current server management route) rather than the old /dashboard/servers/:slug path from before the server list feature settled on its current routes.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Restores several UX refinements to the Plugin Updates page by enriching owned Server List tabs with live server icons, preventing accidental deletion of linked tabs, and adding a quick navigation link to manage the linked listing.
Changes:
getUserServersnow resolves each owned listing’s live status (cached) and returns a favicon-derivediconfor UI display.- Plugin tabs now render a per-tab icon (favicon or Globe fallback), mark linked tabs as
permanent, and show an external-link button to/serverlist/:slug/edit. - Adjusts Export button padding to align with the rest of the toolbar.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/util/serverlist/actions.ts | Enriches getUserServers results by fetching/caching live status and returning an icon field for each owned listing. |
| src/routes/resources/plugins/index.tsx | Updates Tabs rendering to show server icons, make linked tabs non-deletable, add a manage-link button, and tweak Export button padding. |
Suppressed comments (2)
src/routes/resources/plugins/index.tsx:354
- This
Globefallback also uses the array index as itskey, which can lead to incorrect DOM reuse when the tab list changes. Prefer a stable key based on the tab value/name.
<Globe q:slot={`before-${k}`} key={i} size={14} class="shrink-0" />
src/routes/resources/plugins/index.tsx:359
- The external-link button uses an index-based key; if tabs are reordered/removed this can cause the wrong link element to be reused. Use a stable key based on the tab name.
key={`link-${i}`}
| return [ | ||
| linked?.icon ? ( | ||
| <img | ||
| key={i} |
| q:slot={`after-${k}`} | ||
| href={`/serverlist/${linked.slug}/edit`} | ||
| class="lum-btn lum-bg-transparent z-10 rounded-full p-0" | ||
| title={`Manage ${k} on serverlist`} |
Summary
Follow-up to #245 (already merged) — restores a few UI refinements from the pre-revert plugin-store work (
fbe520b..71d1368) that never made it back in:getUserServersnow pings each server viagetServerStatusand returns its live favicon; tabs show that icon (or aGlobefallback) via thebefore-${tab}slot.serverIdset) getpermanent: truein theTabsvalues, hiding the delete button so a linked tab can't be accidentally removed.permanentis an existing, supported prop on the installed@luminescent/ui-qwikTabscomponent.ExternalLinkbutton in theafter-${tab}slot, opening that server's edit page.lum-btn-p-2→lum-btn-p-1, matching the rest of the toolbar row.These were adapted rather than copied verbatim from history: the original reference commit imported
PluginsStoreType/ServerTypewithouttype(the exact bug that got the whole feature reverted originally — see #245), and linked to a/dashboard/servers/:slugpath that no longer exists. This version keeps theimport typefix and points the external link at the current/serverlist/:slug/editroute instead.Test plan
vp install && vp dev, open/resources/pluginswhile logged in with an owned Server List listing/serverlist/:slug/edit🤖 Generated with Claude Code
https://claude.ai/code/session_01CCYKYic3u8tJS2REWSZUnR
Generated by Claude Code