Skip to content

feat(ux): add clipboard yank (y) with type-aware display#879

Merged
cpcloud merged 5 commits intomicasa-dev:mainfrom
cpcloud:worktree-cosmic-inventing-corbato
Mar 31, 2026
Merged

feat(ux): add clipboard yank (y) with type-aware display#879
cpcloud merged 5 commits intomicasa-dev:mainfrom
cpcloud:worktree-cosmic-inventing-corbato

Conversation

@cpcloud
Copy link
Copy Markdown
Collaborator

@cpcloud cpcloud commented Mar 31, 2026

Summary

  • Press y in normal mode to copy the focused cell's raw value to the system clipboard via BubbleTea v2's tea.SetClipboard (OSC 52)
  • Status bar shows the copied value styled by cell kind (money=green, date=accent, text=bright)
  • Money values copied without currency symbol (776.53 not $776.53)
  • Ops cells copy the full pretty-printed extraction JSON instead of the count
  • Long values truncated to terminal width using grapheme-cluster-aware truncation (uniseg)
  • Status text sanitized against Unicode control characters and line separators
  • Blocked on dashboard to prevent copying from hidden underlying table
  • Documented OSC 52 terminal configuration requirements (tmux, iTerm2, etc.)
  • Design spec and implementation plan in plans/

@cpcloud cpcloud added enhancement New feature or request ux User experience labels Mar 31, 2026
@cpcloud cpcloud force-pushed the worktree-cosmic-inventing-corbato branch from 09ea4c3 to 989c0db Compare March 31, 2026 16:37
cpcloud and others added 3 commits March 31, 2026 12:48
Design spec covers keybinding (y), OSC 52 rationale, edge cases,
dashboard blocking, and test matrix. Implementation plan has
step-by-step TDD tasks with exact code and expected outputs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Press y in normal mode to copy the focused cell's raw value to the
system clipboard via BubbleTea v2's tea.SetClipboard (OSC 52).

- Status bar shows "Copied: <value>" with type-appropriate color
  (money=green, date=accent, text=bright, status=secondary)
- Money values copied without currency symbol (Currency.StripSymbol)
- Ops cells copy pretty-printed extraction JSON, not the count
- Display values sanitized (Unicode control chars, line separators)
  and truncated to terminal width using grapheme-cluster iteration
- Blocked on dashboard to prevent copying from hidden table
- statusStyled kind for pre-rendered status messages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add y keybinding to Nav mode table, clipboard section with OSC 52
terminal configuration requirements (tmux, iTerm2, kitty, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cpcloud cpcloud force-pushed the worktree-cosmic-inventing-corbato branch from 989c0db to 4a46460 Compare March 31, 2026 16:50
Screen does not forward OSC 52 sequences. The previous config
(bindkey backspace remap) was unrelated to clipboard support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cpcloud cpcloud merged commit 6622f36 into micasa-dev:main Mar 31, 2026
29 checks passed
@cpcloud cpcloud deleted the worktree-cosmic-inventing-corbato branch March 31, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ux User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant