Skip to content

Conversation

@joshkerr
Copy link
Owner

Summary

  • Replace browse command with direct movie, tv, and queue commands
  • Eliminates the media type selection step for a faster user experience
  • Add standalone queue management via goplexcli queue

Before: goplexcli browse → Select "Movies" or "TV Shows" → Pick item
After: goplexcli movie → Pick item (one less step)

Changes

  • Add movie command - jumps directly to movie list
  • Add tv command - jumps directly to TV episode list
  • Add queue command - standalone queue management
  • Remove browse command entirely
  • Extract shared logic into runMediaBrowser() helper
  • Update login help text to reference new commands

Test plan

  • goplexcli --help shows movie, tv, queue (no browse)
  • goplexcli movie --help works
  • goplexcli tv --help works
  • goplexcli queue --help works
  • Build succeeds
  • go fmt passes

🤖 Generated with Claude Code

joshkerr and others added 11 commits January 29, 2026 10:25
Replace browse command with direct movie, tv, and queue commands
to streamline user experience and eliminate media type selection step.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
10-task plan to replace browse with movie/tv/queue commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace browse with direct movie/tv/queue commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add the runMediaBrowser function that handles the shared media browsing
flow for movie and tv commands. This function is parameterized by media
type ("movie" or "episode") and extracts common browsing logic that will
be used by both runMovie and runTV.

Note: Build currently fails with "undefined: ui.PromptViewQueue" as this
function will be added in a subsequent task.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add UI prompt function that asks users whether they want to view
their queue or continue browsing media. This function will be called
by runMediaBrowser when items exist in the queue.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add the command runner functions that connect Cobra commands to the
implementation. runMovie and runTV are thin wrappers that call
runMediaBrowser with the appropriate media type filter. runQueueCommand
provides standalone queue access without the full browse loop.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the deprecated browse command now that movie, tv, and queue
commands provide the same functionality with a cleaner UX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This function is no longer needed after the browse command was removed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This function was only used by the browse command which has been removed.
The movie and tv commands use their own dedicated selection logic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
After successful login, users are now shown both the cache reindex
command and the new movie/tv browse commands for better discoverability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Standardize formatting across the codebase using go fmt.
Fixes trailing whitespace and blank line consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 29, 2026 19:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request simplifies the CLI user experience by replacing the browse command with three direct commands: movie, tv, and queue. This eliminates an unnecessary media type selection step, streamlining the workflow from "browse → select type → pick item" to just "movie/tv → pick item".

Changes:

  • Added three new commands (movie, tv, queue) that provide direct access to specific media types and queue management
  • Removed the browse command and extracted shared logic into a runMediaBrowser() helper function
  • Added PromptViewQueue() function to allow viewing the queue before browsing media (fzf only)

Reviewed changes

Copilot reviewed 5 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cmd/goplexcli/main.go Added movie/tv/queue commands, removed browse command, extracted shared browsing logic into runMediaBrowser(), updated login help text
internal/ui/fzf.go Added PromptViewQueue() for queue access, whitespace cleanup
internal/ui/browser.go Struct field alignment improvements
internal/stream/web.go Whitespace cleanup
internal/stream/server.go Struct constant alignment and whitespace cleanup
internal/plex/client.go Struct field alignment and whitespace cleanup
internal/player/player.go Whitespace cleanup
internal/download/download.go Whitespace cleanup
internal/config/config.go Struct field alignment and whitespace cleanup
internal/cache/cache.go Whitespace cleanup
cmd/preview/main.go Whitespace cleanup
docs/plans/2026-01-29-cli-command-simplification.md Implementation plan documentation
docs/plans/2026-01-29-cli-command-simplification-design.md Design documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +504 to 524
// Check if user wants to view queue first (show option at top of list)
if q.Len() > 0 && ui.IsAvailable(cfg.FzfPath) {
// Show queue option in selection
viewQueue, err := ui.PromptViewQueue(cfg.FzfPath, q.Len())
if err != nil {
if err.Error() == "cancelled by user" {
return nil
}
return fmt.Errorf("media type selection failed: %w", err)
}
} else {
// Fallback to manual selection
var err error
mediaType, err = selectMediaTypeManualWithQueue(q.Len())
if err != nil {
return err
}
}

// Handle queue view
if mediaType == "queue" {
result, err := handleQueueView(cfg, q)
if err != nil {
return err
}
if result == "done" {
return nil
}
continue browseLoop
}

// Filter media by type
var filteredMedia []plex.MediaItem
switch mediaType {
case "movies":
for _, item := range mediaCache.Media {
if item.Type == "movie" {
filteredMedia = append(filteredMedia, item)
if viewQueue {
result, err := handleQueueView(cfg, q)
if err != nil {
return err
}
}
case "tv shows":
for _, item := range mediaCache.Media {
if item.Type == "episode" {
filteredMedia = append(filteredMedia, item)
if result == "done" {
return nil
}
continue browseLoop
}
case "all":
filteredMedia = mediaCache.Media
default:
filteredMedia = mediaCache.Media
}

if len(filteredMedia) == 0 {
fmt.Println(warningStyle.Render("No media found for selected type."))
continue browseLoop
}
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

When fzf is not available, users cannot view the queue before browsing media. The queue viewing prompt at line 507 is only shown when ui.IsAvailable(cfg.FzfPath) is true. Consider adding a manual prompt option similar to other parts of the code that have fzf/manual fallbacks, or document this as a limitation.

Copilot uses AI. Check for mistakes.
Comment on lines +638 to +640
// If user wants to go back, just exit (no browse to return to)
if result == "back" {
return nil
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The "Back to Browse" label in the queue action prompt may be misleading when accessed via the standalone goplexcli queue command, since there's no browse session to return to. Consider updating the label to be more generic like "Back" or "Exit", or pass a context parameter to customize the label based on how the queue was accessed.

Copilot uses AI. Check for mistakes.
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