Keep long slug IDs compact and copyable - #78
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves task-list readability for workflows with long slug IDs by capping the ID column using terminal display-cell widths, rendering long IDs with ellipsis, and adding a mouse double-click action to copy the full underlying ID via OSC 52 (with transient footer feedback and updated help/docs).
Changes:
- Compute a responsive ID column width (4–20 cells) using Unicode display widths and ellipsize overlong IDs while preserving a minimum title width.
- Add double-click-on-ID hit-testing to queue a “copy full ID” intent and emit OSC 52 at the terminal boundary.
- Add UI feedback (“ID copied” / “ID copy failed”) and update docs + tests for layout, Unicode width behavior, and copy feedback.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents double-click ID copy behavior and OSC 52 terminal requirements. |
| crates/spacetop/src/ui/tests/task_list.rs | Adds layout/Unicode width tests for the responsive ID column and footer copy feedback expiration. |
| crates/spacetop/src/ui/tests/chrome.rs | Asserts help popup contains the new double-click copy hint. |
| crates/spacetop/src/ui/mod.rs | Threads copy feedback into overview rendering so footer can show status. |
| crates/spacetop/src/ui/list.rs | Implements responsive ID width calculation and Unicode-aware ellipsizing; records ID-column rect for hit-testing. |
| crates/spacetop/src/ui/help.rs | Adds “Double-click ID” help line. |
| crates/spacetop/src/ui/footer.rs | Adds transient copy success/failure hint rendering. |
| crates/spacetop/src/lib.rs | Emits OSC 52 sequences (base64) when a pending copy intent is drained; adds OSC52 unit tests. |
| crates/spacetop/src/app/overview.rs | Stores a new render-fact (id_column_rect) for ID hit-testing. |
| crates/spacetop/src/app/mouse.rs | Adds ID-cell hit-testing and double-click tracking that triggers a copy action. |
| crates/spacetop/src/app/keys.rs | Introduces OverviewKeyAction::CopyId to route copy intents through the app boundary. |
| crates/spacetop/src/app.rs | Adds copy intent + timed feedback state; wires overview mouse handling with timing/candidate tracking. |
| crates/spacetop/Cargo.toml | Adds base64 and unicode-width dependencies. |
| Cargo.lock | Locks new dependency entries. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep long slug IDs from squeezing task titles while making complete identifiers easy to copy.
What changed
Evidence
make lintpassed; an independent CJK copy probe returned the full slug.074