Skip to content

chore(ui): hide the plugin manager entry on mobile - #273

Merged
shihuili1218 merged 1 commit into
mainfrom
hide-plugin-manager-mobile
Sep 4, 2026
Merged

chore(ui): hide the plugin manager entry on mobile#273
shihuili1218 merged 1 commit into
mainfrom
hide-plugin-manager-mobile

Conversation

@shihuili1218

@shihuili1218 shihuili1218 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Why

Plugin panels are explicitly mobile-disabled in v1: addTab() wraps pluginStore.openForNewTab() in if (!isMobile && (ssh || local)) (PR #265 scope — no touch close affordance; desktop closes via Esc). Auto-open is the only way a tab gets its areas opened, so on a phone the panel can never appear — verified on Android v0.3.0: plugin installed + enabled + auto-open on + new tab → nothing renders, by design.

A visible manager that configures a feature that can never show is a dead end (install → enable → auto-open → nothing), so this hides the settings entry on mobile.

What

  1. Hide plugins on mobile — added to hiddenOnMobile, same treatment as cli / dynamic-discovery.
  2. Empty hiddenOnCompact (narrow desktop windows <640px now show cli + shortcuts), moving shortcuts into hiddenOnMobile. Rationale:
    • No commit ever recorded why those two hid on narrow widths — it copied the mobile list onto a width condition.
    • The reasons to hide both are platform-based, not width-based: phones have no CLI binary / no hardware keyboard. A 600px desktop window has both — the pages are exactly as relevant there.
    • Both pages are narrow-safe layouts (CliSettings column-flex + overflow-x: auto code blocks; ShortcutsScreen min-width: 0 truncate chain).
    • Phone behavior is unchanged: phones always match compact too, so the old effective set was the union {cli, shortcuts, dynamic-discovery} — identical before/after for these two.

Desktop (any width) keeps full plugin functionality; only the mobile entry point is removed.

Test

  • vitest run: 780 passed (62 files).
  • svelte-check: error count identical before/after (all pre-existing in unrelated test files).

Plugin panels are mobile-disabled in v1 (the !isMobile guard around
openForNewTab in addTab — no touch close affordance, PR #265 scope), so
on a phone the manager can only configure a feature that can never
appear: installed + enabled + auto-open still renders nothing. Hide the
settings entry via hiddenOnMobile to match; desktop (including compact
narrow windows) is unchanged.
Copilot AI lite review requested due to automatic review settings September 4, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The current diff also changes desktop compact (<640px) Settings menu visibility in a way that contradicts the stated “desktop unchanged” scope.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR aims to avoid presenting a mobile “dead end” by hiding the Plugins manager entry in Settings on mobile devices, since plugin panels are explicitly disabled on mobile in v1.

Changes:

  • Updates the Settings navigation filtering to hide the plugins page on mobile.
  • Adjusts which Settings pages are hidden under compact vs mobile filters.
File summaries
File Description
src/lib/components/SettingsLayout.svelte Updates Settings menu visibility rules to hide Plugins on mobile (and modifies compact/mobile hide sets).
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +92 to +93
const hiddenOnCompact = new Set<string>([]);
const hiddenOnMobile = new Set<string>(["cli", "dynamic-discovery", "shortcuts", "plugins"]);
@shihuili1218

Copy link
Copy Markdown
Collaborator Author

The compact (<640px) change is intentional, not scope creep: hiddenOnCompact hid cli + shortcuts from narrow desktop windows with no recorded rationale, while both pages only make sense to hide on phones (no CLI binary / no hardware keyboard) — a platform condition, which hiddenOnMobile already expresses. Both pages are narrow-safe (column-flex + overflow-x: auto / min-width: 0 truncate chains), and phone behavior is unchanged since phones always matched compact too. Description updated to declare both changes.

@shihuili1218
shihuili1218 merged commit 0a7401d into main Sep 4, 2026
2 checks passed
@shihuili1218
shihuili1218 deleted the hide-plugin-manager-mobile branch September 4, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants