Skip to content

feat(web): add URL parameter support for auto-opening plugin install modal - #8

Merged
amondnet merged 2 commits into
mainfrom
feat/add-url-param-plugin-install-modal
Oct 15, 2025
Merged

feat(web): add URL parameter support for auto-opening plugin install modal#8
amondnet merged 2 commits into
mainfrom
feat/add-url-param-plugin-install-modal

Conversation

@amondnet

Copy link
Copy Markdown
Contributor

Summary

Enable direct linking to specific plugins with automatic install modal display. Users can now share URLs with query parameters to directly open a plugin's installation instructions.

Features

  • URL Parameter Support: Accept ?plugin= or ?install= query parameters
  • Auto-scroll: Smoothly scroll to the target plugin card on page load
  • Auto-open Modal: Automatically display the install modal for the specified plugin
  • Smooth UX: 500ms delay ensures scroll completes before modal opens

Usage Examples

https://yoursite.com/?plugin=nanobanana
https://yoursite.com/?install=grafana
https://yoursite.com/?plugin=firebase

Technical Changes

  • apps/web/app/pages/index.vue:
    • Added route query parameter detection
    • Implemented plugin card ref tracking for scrolling
    • Added auto-scroll watcher with smooth behavior
  • apps/web/app/components/PluginCard.vue:
    • Added autoOpenModal prop
    • Implemented watcher to auto-open modal when prop is true

Test Plan

  1. Visit /?plugin=nanobanana - should scroll to nanobanana card and open install modal
  2. Visit /?install=grafana - should scroll to grafana card and open install modal
  3. Visit / without params - should work normally without auto-actions
  4. Test with non-existent plugin name - should gracefully handle (no scroll, no modal)

Screenshots

N/A - Functional feature, behavior-based changes only

…modal

Enable direct linking to specific plugins with automatic install modal display.
Users can now share URLs like ?plugin=nanobanana or ?install=grafana to show
a specific plugin's installation instructions.

Features:
- URL query parameter detection (?plugin= or ?install=)
- Auto-scroll to target plugin card
- Auto-open install modal with smooth animation
- 500ms delay for natural UX after scroll completion

Changes:
- apps/web/app/pages/index.vue: Add route query parameter handling and auto-scroll logic
- apps/web/app/components/PluginCard.vue: Add autoOpenModal prop and watcher
@vercel

vercel Bot commented Oct 15, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
claude-code-plugins Ready Ready Preview Comment Oct 15, 2025 3:30pm

Apply critical fixes from PR review to enhance reliability and user experience.

Changes:
- Add VueUse useTimeoutFn import for proper timer management
- Fix Badge color type safety with proper union types
- Implement retry logic with up to 5 attempts (200ms intervals)
- Add user feedback toast for persistent navigation failures
- Store and cleanup timer references to prevent memory leaks
- Improve network error handling with detailed logging
- Separate HTTP errors from JSON parsing errors
- Remove noisy error logs during normal loading

Error Handling Improvements:
- Silent retries during ref loading (no error spam)
- Only log errors on final failure after max retries
- Add onBeforeUnmount cleanup for timer references
- Guard async callbacks with component lifecycle checks

Type Safety:
- Badge.color now properly typed as Nuxt UI color union
- Prevents TypeScript compilation errors

Fixes:
- Memory leaks from uncleaned timers
- Silent failures with no user feedback
- Noisy error logs during normal page load
- Race conditions during component unmount
@amondnet
amondnet merged commit 4c1e4f9 into main Oct 15, 2025
1 of 2 checks passed
@pleaseai pleaseai Bot mentioned this pull request Oct 15, 2025
@amondnet
amondnet deleted the feat/add-url-param-plugin-install-modal branch October 15, 2025 20:12
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