Skip to content

Conversation

@itsdevcoffee
Copy link
Owner

Summary

Comprehensive TUI UX improvements addressing user confusion between plugin search and marketplace browser interfaces. Implements intelligent marketplace autocomplete, dynamic filter counts, and visual enhancements.

Key Features

🔍 Intelligent Marketplace Autocomplete

  • Type @ to see marketplace picker with live filtering
  • Arrow keys navigate, Enter selects and autocompletes
  • Background color highlights active marketplace filter
  • Pattern: @marketplace-name search terms for scoped fuzzy search
  • Example: @claude-code-plugins test searches for "test" within that marketplace only

📊 Dynamic Filter Counts

  • Filter tab counts update in real-time as you search
  • Shows how many results exist in each filter without switching
  • Example: Type "test" → All (15) | Discover (3) | Ready (10) | Installed (2)

🎯 Unified Terminology

  • Plugin list: "Tab next view" (consistent with filter cycling)
  • Marketplace list: "Tab change order" (consistent with sort modes)
  • Help view organized by context with clear annotations

Changes

7 commits with features, fixes, and code quality improvements:

  1. feat: improve TUI UX with conservative polish - Core terminology updates and help improvements
  2. refactor: remove breadcrumb feature - Based on user testing feedback
  3. feat: intelligent marketplace autocomplete - Full picker UI with navigation
  4. fix: lazy-load marketplace items - Ensures autocomplete works at startup
  5. fix: autocomplete exit logic - Handles trailing spaces correctly
  6. feat: background color for @marketplace - Visual separation with contrasting background
  7. feat: dynamic filter counts - Real-time count updates based on search

Bug Fixes

  • Fixed stale pointer reference in marketplace selection
  • Added bounds checking for scroll offset edge cases
  • Replaced broken string parsing with strings.SplitN
  • Improved viewport height validation for small terminals
  • Added URL validation before exec.Command calls

Code Quality

  • Extracted helper functions for viewport management, URL opening, status rendering
  • Consolidated flash message clearing functions
  • Simplified marketplace item rendering
  • All tests passing, linter clean
  • Reviewed and simplified by maximus (code-reviewer + code-simplifier)

Test Plan

  • Manual testing of marketplace autocomplete
  • Verified dynamic filter counts update correctly
  • Tested @marketplace-name background styling
  • Verified terminology changes across all views
  • All unit tests passing (14 test cases)
  • Linter clean (0 issues)
  • Build successful on Linux

Screenshots

User-provided testing screenshots confirm:

  • Marketplace picker appears when typing @
  • Background color creates clear visual separation
  • Dynamic counts update in real-time

Documentation

Added comprehensive analysis: docs/research/2026-02-04-tui-ux-improvement-options.md

Related Issues

Addresses user feedback about clunky navigation between plugin search and marketplace browser.

Implements foundational UX improvements to address user confusion
between plugin search and marketplace browser interfaces.

Key Changes:
- Unified terminology: "filter" → "view", "sort mode" → "order"
- Made @marketplace filtering discoverable with placeholder hints
- Added context breadcrumbs when returning from marketplace browser
- Enhanced help view with context-aware sections and annotations
- Fixed critical bugs: pointer stability, bounds checking, string parsing
- Simplified code with helper functions and reduced duplication

UX Improvements:
- Tab key now shows "next view" (plugin list) vs "change order" (marketplace)
- Search placeholder: "Search plugins (or @marketplace to filter)..."
- Status bar displays active marketplace filter: "@marketplace-name (N results)"
- Help view now groups shortcuts by context (plugin actions, marketplace actions, etc.)
- Breadcrumb appears briefly when returning to plugin list: "← from Marketplace Browser"

Bug Fixes:
- Fixed stale pointer reference when selecting marketplace (copy value instead of pointer to slice)
- Added final bounds check to prevent negative scroll offset
- Replaced broken string parsing with strings.SplitN for plugin@marketplace format
- Improved viewport height bounds checking for very small terminals
- Added URL validation before exec.Command calls (GitHub prefix check)

Code Quality:
- Extracted helper functions: formatPluginCount, formatGitHubStats, openURL, openPath
- Consolidated flash message clearing with unified clearFlashAfter function
- Extracted viewport initialization into dedicated functions
- Simplified status bar rendering with focused helper functions
- All tests passing, linter clean, build successful

Related: docs/research/2026-02-04-tui-ux-improvement-options.md
Tasks completed: #1-4 (Option 1 - Conservative Polish)
The breadcrumb was just a temporary text indicator that didn't provide
real navigation value. User feedback indicated expectation of a proper
navigation history stack (back/forward), which would be a larger feature.

Keeping the 3 core improvements:
- Unified terminology (next view vs change order)
- @marketplace filtering discoverability
- Contextual help view
Implements sophisticated @marketplace filtering with autocomplete UX
based on user feedback during testing.

Key Features:
- Marketplace picker appears when typing @ (replaces "no plugins found")
- Arrow keys navigate marketplace list
- Enter selects marketplace and autocompletes @marketplace-name
- Pattern: @marketplace-name [search terms] for fuzzy search within marketplace
- Example: "@claude-code-plugins test" searches for "test" in that marketplace

UX Improvements:
- Placeholder updated: "or @marketplace-name to filter" (more specific)
- Picker shows marketplace names with plugin counts
- Helpful hint: "↑↓ to navigate • Enter to select • Keep typing to filter"
- Autocomplete deactivates when user adds search terms after marketplace name

Implementation:
- Added marketplaceAutocompleteActive, marketplaceAutocompleteList, marketplaceAutocompleteCursor to Model
- UpdateMarketplaceAutocomplete() detects @ mode and filters marketplace list
- SelectMarketplaceAutocomplete() completes the marketplace name
- Enhanced filteredSearch() to parse "@marketplace-name search" pattern
- Arrow keys and Enter intercepted when autocomplete active
- renderMarketplaceAutocomplete() displays marketplace picker

Note: Syntax coloring for @marketplace deferred (requires textinput cursor customization)

Closes user feedback: confusing "no plugins found" when typing @
Marketplace items weren't loaded at startup, causing 'No marketplaces found'
when typing @. Now lazy-loads marketplace data on first @ keypress.
When user types '@marketplace-name ' (with trailing space), should show
all plugins from that marketplace, not re-enter autocomplete mode.
The @marketplace-name filter now displays with:
- Burnt orange background (PlumMedium)
- White text, bold
- Padding for breathing room
- Creates clear visual distinction from search terms

Example: '@claude-code-plugins test' shows the filter with background
and regular search text without, making the active filter obvious.
Filter tab counts now update in real-time as you type or change filters.

Before: All (527) | Discover (74) | Ready (444) | Installed (9)
        (static, never changed)

After:  All (15) | Discover (3) | Ready (10) | Installed (2)
        (updates as you search for 'test')

Implementation:
- Added getDynamicFilterCounts() method
- Calculates count for each filter mode based on current query
- Runs filteredSearch() for each mode to get accurate counts
- Updates in real-time as user types

UX Benefit: Users can see at a glance how many results exist in each
filter without switching tabs.
@itsdevcoffee itsdevcoffee merged commit 3b2f546 into main Feb 4, 2026
2 of 4 checks passed
@itsdevcoffee itsdevcoffee deleted the feature/tui-ux-improvements branch February 4, 2026 12: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