Skip to content

fix(plugins): stop auto-installing plugins on detail page click - #1075

Merged
lane711 merged 5 commits into
mainfrom
lane711/plugin-install-click-behavior
Sep 4, 2026
Merged

fix(plugins): stop auto-installing plugins on detail page click#1075
lane711 merged 5 commits into
mainfrom
lane711/plugin-install-click-behavior

Conversation

@lane711

@lane711 lane711 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes plugin install behavior so clicking a plugin card no longer silently installs and activates it. Users must now explicitly click the Install button.

Changes

  • Removed ensurePlugin() auto-install call from GET /admin/plugins/:id route handler
  • Uninstalled plugins now render a detail page with plugin info + explicit Install button
  • Added uninstalled status support to plugin settings template (status badge, toggle button, tab defaults)
  • Added installPlugin() JS function to the detail page for explicit install flow

Testing

Unit Tests

  • All unit tests passing (1730 passed)
  • No type errors in changed files

E2E Tests

  • Added tests/e2e/68-plugin-install-click.spec.ts
    • Verifies clicking uninstalled plugin navigates to detail page without auto-installing
    • Verifies Install button on detail page triggers explicit install

Checklist

  • Code follows project conventions
  • Tests added/updated and passing
  • Type checking passes
  • No console errors or warnings
  • Documentation updated (if needed)

Generated with Claude Code in Conductor

Previously, clicking any plugin card navigated to /admin/plugins/:id
which called ensurePlugin(), silently installing and activating plugins
without explicit user action. Now uninstalled plugins show a detail page
with an explicit Install button — matching expected UX where install
requires deliberate action.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Route: also match by plugin name in uninstalled lookup (handles
  id/codeName mismatches)
- Test 93: explicitly install oauth-providers before testing settings
  (was relying on removed auto-install)
- Test 68: increase timeouts, wait for URL change before asserting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of relying on finding uninstalled plugins in the list,
explicitly uninstall hello-world and navigate directly to its detail
page. Eliminates flakiness from unknown CI plugin state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Click Install + waitForNavigation instead of waitForTimeout to properly
handle the 1500ms delayed reload. Assert Install button gone instead of
matching status badge text with anchored regex.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lane711
lane711 merged commit aeefc78 into main Sep 4, 2026
2 checks passed
lane711 added a commit that referenced this pull request Sep 4, 2026
GraphQL document mutations were denied for every caller. requireWritePermission
called repo.isAllowed() with an empty typeSettings object, but base grants live
on the document type — with none supplied, isAllowed sees only per-document ACL
rows and denies update/publish/unpublish/delete even for an admin. Load the type
via DocumentTypeRegistry and pass its settings.

Two E2E corrections:

- 100-graphql: the type id is `blog_post`, not `blog_posts`. createDocument on a
  type that does not exist surfaced as INTERNAL_SERVER_ERROR.
- 80-user-profile-code-config: a fresh deploy has no `plugins` row for
  user-profiles, and #1075 made uninstalled plugins render the Info tab only, so
  the guidance panel behind the Settings tab was absent. Install the plugin first
  (no-op when already installed).

Verified: 100-graphql 5/5 and 80-user-profile-code-config 3/3 pass locally;
packages/core type-check clean; unit suite 1930 passed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant