Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ coverage.html
tmux-*.log
.playwright-mcp/.mcp.json

# Spotlight mode
.spotlight-active
.playwright-mcp/
.mcp.json
.gstack/
Expand Down
3 changes: 0 additions & 3 deletions desktop/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@
"Settings": {
"note": "s, \u2318,, titlebar gear"
},
"Spotlight": {
"note": "f opens the fuzzy task palette"
},
"ToggleDangerous": {
"note": "! cycles permission mode for new executions"
},
Expand Down
11 changes: 0 additions & 11 deletions internal/config/keybindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ type KeybindingsConfig struct {
CollapseDone *KeybindingConfig `yaml:"collapse_done,omitempty"`
OpenBrowser *KeybindingConfig `yaml:"open_browser,omitempty"`
OpenPR *KeybindingConfig `yaml:"open_pr,omitempty"`
Spotlight *KeybindingConfig `yaml:"spotlight,omitempty"`
SpotlightSync *KeybindingConfig `yaml:"spotlight_sync,omitempty"`
}

// DefaultKeybindingsConfigPath returns the default path for the keybindings config file.
Expand Down Expand Up @@ -260,14 +258,5 @@ open_browser:
open_pr:
keys: ["G"]
help: "open PR"

# Spotlight mode
spotlight:
keys: ["f"]
help: "spotlight"

spotlight_sync:
keys: ["F"]
help: "spotlight sync"
`
}
1 change: 0 additions & 1 deletion internal/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4396,7 +4396,6 @@ func writeWorkflowMCPConfig(worktreePath string, taskID int64, configDir string)
"taskyou_list_tasks",
"taskyou_get_project_context",
"taskyou_set_project_context",
"taskyou_spotlight",
},
}

Expand Down
26 changes: 0 additions & 26 deletions internal/executor/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,6 @@ func TestWriteWorkflowMCPConfig(t *testing.T) {
"taskyou_list_tasks",
"taskyou_get_project_context",
"taskyou_set_project_context",
"taskyou_spotlight",
}
if len(autoApprove) != len(expectedTools) {
t.Errorf("autoApprove has %d items, want %d", len(autoApprove), len(expectedTools))
Expand Down Expand Up @@ -1729,31 +1728,6 @@ func TestWriteWorkflowMCPConfig(t *testing.T) {
}
})

t.Run("auto-approves taskyou_spotlight", func(t *testing.T) {
configPath := setupTempConfigDir(t)
worktreePath := t.TempDir()

if err := writeWorkflowMCPConfig(worktreePath, 1, ""); err != nil {
t.Fatalf("unexpected error: %v", err)
}

taskyou := readWorkflowConfig(t, configPath, worktreePath)
autoApprove, ok := taskyou["autoApprove"].([]interface{})
if !ok {
t.Fatal("expected autoApprove array")
}
var found bool
for _, v := range autoApprove {
if v == "taskyou_spotlight" {
found = true
break
}
}
if !found {
t.Errorf("taskyou_spotlight missing from autoApprove list: %v", autoApprove)
}
})

t.Run("honors per-project CLAUDE_CONFIG_DIR override", func(t *testing.T) {
// Project with a custom claude config dir must get its MCP config
// written there, not to the default ~/.claude.json. Otherwise Claude
Expand Down
82 changes: 0 additions & 82 deletions internal/mcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

"github.com/bborn/workflow/internal/db"
"github.com/bborn/workflow/internal/github"
"github.com/bborn/workflow/internal/spotlight"
"github.com/bborn/workflow/internal/tasksummary"
)

Expand Down Expand Up @@ -300,21 +299,6 @@ func (s *Server) handleRequest(req *jsonRPCRequest) {
"required": []string{"context"},
},
},
{
Name: "taskyou_spotlight",
Description: "Enable spotlight mode to sync worktree changes back to the main repository for testing. This bridges the gap between isolated task development and application runtime by syncing git-tracked files to where your app runs. Use 'start' to enable, 'stop' to restore original state, 'sync' for manual sync, or 'status' to check current state.",
InputSchema: map[string]interface{}{
"type": "object",
"properties": map[string]interface{}{
"action": map[string]interface{}{
"type": "string",
"enum": []string{"start", "stop", "sync", "status"},
"description": "Action to perform: 'start' enables spotlight mode and syncs files, 'stop' disables and restores original state, 'sync' manually syncs files (while active), 'status' shows current spotlight state",
},
},
"required": []string{"action"},
},
},
},
})

Expand Down Expand Up @@ -715,72 +699,6 @@ This saves future tasks from re-exploring the codebase.`},
},
})

case "taskyou_spotlight":
action, _ := params.Arguments["action"].(string)
if action == "" {
s.sendError(id, -32602, "action is required")
return
}

// Get current task
task, err := s.db.GetTask(s.taskID)
if err != nil || task == nil {
s.sendError(id, -32603, "Failed to get current task")
return
}

if task.WorktreePath == "" {
s.sendError(id, -32602, "Task has no worktree (spotlight requires a worktree)")
return
}

// Get the project directory (main repo)
project, err := s.db.GetProjectByName(task.Project)
if err != nil || project == nil {
s.sendError(id, -32603, "Failed to get project directory")
return
}
mainRepoDir := project.Path

// Spotlight requires worktree isolation - it syncs changes between a worktree and the main repo.
// For non-worktree projects, the task already runs in the project directory.
if !project.UsesWorktrees() {
s.sendError(id, -32602, "Spotlight is not available for non-worktree projects (task already runs in project directory)")
return
}

// Handle spotlight actions
var result string
switch action {
case "start":
result, err = spotlight.Start(task.WorktreePath, mainRepoDir)
case "stop":
result, err = spotlight.Stop(task.WorktreePath, mainRepoDir)
case "sync":
if !spotlight.IsActive(task.WorktreePath) {
s.sendError(id, -32602, "Spotlight mode is not active. Use 'start' to enable spotlight before syncing")
return
}
result, err = spotlight.Sync(task.WorktreePath, mainRepoDir)
case "status":
result, err = spotlight.Status(task.WorktreePath, mainRepoDir)
default:
s.sendError(id, -32602, fmt.Sprintf("Unknown spotlight action: %s", action))
return
}
if err != nil {
s.sendError(id, -32603, err.Error())
return
}

s.db.AppendTaskLog(s.taskID, "system", fmt.Sprintf("Spotlight %s: %s", action, result))

s.sendResult(id, toolCallResult{
Content: []contentBlock{
{Type: "text", Text: result},
},
})

default:
s.sendError(id, -32602, fmt.Sprintf("Unknown tool: %s", params.Name))
}
Expand Down
Loading