Skip to content

Keep long slug IDs compact and copyable - #78

Merged
kentwelcome merged 3 commits into
mainfrom
spacedock-ensign/compact-copyable-slug-ids
Jul 28, 2026
Merged

Keep long slug IDs compact and copyable#78
kentwelcome merged 3 commits into
mainfrom
spacedock-ensign/compact-copyable-slug-ids

Conversation

@kentwelcome

Copy link
Copy Markdown
Contributor

Keep long slug IDs from squeezing task titles while making complete identifiers easy to copy.

What changed

  • Bound ID columns using responsive Unicode display-cell widths.
  • Ellipsize long IDs while preserving title space and short-ID alignment.
  • Copy complete IDs on double-click through OSC 52.
  • Show transient copy feedback and document terminal support.

Evidence

  • Spacetop library: 385/385 passed; Spacetop core: 188/188 passed.
  • make lint passed; an independent CJK copy probe returned the full slug.

074

Copilot AI review requested due to automatic review settings July 28, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread crates/spacetop/src/app/mouse.rs
Comment thread crates/spacetop/src/ui/list.rs
@kentwelcome
kentwelcome merged commit 7a96927 into main Jul 28, 2026
1 check passed
@kentwelcome
kentwelcome deleted the spacedock-ensign/compact-copyable-slug-ids branch July 28, 2026 05:00
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.

2 participants