Skip to content

feat: add Pop stash button to Stash Details Panel#1

Open
peterjthomson wants to merge 2 commits intokaurifund:masterfrom
peterjthomson:feature/stash-pop
Open

feat: add Pop stash button to Stash Details Panel#1
peterjthomson wants to merge 2 commits intokaurifund:masterfrom
peterjthomson:feature/stash-pop

Conversation

@peterjthomson
Copy link

Summary

Adds a Pop button to the Stash Details Panel, which applies the stash and removes it from the list in one action.

Changes

  • Add handlePop function that calls popStash() API (already available in backend)
  • Make Pop the primary CTA (most common stash workflow)
  • Demote Apply to secondary (for when you want to keep the stash)
  • Add tooltips to clarify each button's behavior:
    • Pop: Apply and remove stash
    • Apply: Apply but keep stash
    • Drop: Remove without applying

Before / After

Before After
Apply (primary) Pop (primary)
Create Branch Apply (secondary)
Drop Create Branch
Drop

The popStash API was already implemented in the backend but wasn't exposed in the UI.

- Add handlePop function that applies stash and removes it from list
- Make Pop the primary CTA (most common workflow)
- Add tooltips to clarify each button's behavior:
  - Pop: Apply and remove stash
  - Apply: Apply but keep stash
  - Drop: Remove without applying
- Add getClaudeCodeAgentTaskHint() function to read session data from
  ~/.claude/projects/{encoded-path}/*.jsonl files
- Extract the first user message as the task hint, stripping system tags
- Update getEnhancedWorktrees to call the function for 'claude' agents
- Update WorktreeDetailPanel to display hints for both Cursor and Claude Code

Claude Code stores sessions as JSONL files with user messages containing
the original task. The path is encoded by replacing / with - in the folder name.
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