Repository navigation
0.3.0: every mark shows a short code, and /clip <code> copies that block - #1
Conversation
…pies that block The owner, 2026-12-05: "ctrl click still doesnt work". In tmux with its mouse on, tmux takes the click before the terminal can open the link. Each mark now shows its block's code (/clip a3f9), and typing it copies exactly that block, anywhere. Tests: 8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c19a866cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // `/clip [n]`: the block n back from the newest (1 the newest). | ||
| // The short code a block's mark shows: `/clip <code>` copies that block, wherever a click does not reach (tmux with its | ||
| // mouse on takes the click before the terminal can open a link: the owner, 2026-12-05, "ctrl click still doesnt work"). | ||
| const codeOf = (text: string) => nameOf(text).slice(0, 4) |
There was a problem hiding this comment.
When two distinct blocks in seen share the same first four FNV hex digits, both marks show the same code and this lookup silently selects the newest one. /clip <code> can therefore copy a different block than the user intended; reject ambiguous matches or make the displayed codes unique.
Useful? React with 👍 / 👎.
| const words = args.trim().split(/\s+/) | ||
| if (words[0] === 'setup') return setup($, words[1] === 'remove') | ||
| if (/^[0-9a-f]{4}$/.test(words[0] ?? '')) { | ||
| const found = [...seen].reverse().find(t => codeOf(t) === words[0]) |
There was a problem hiding this comment.
Keep codes resolvable for older marks
If a session draws more than 50 distinct blocks, remember evicts older entries while this lookup searches only seen. A user who scrolls back to an older mark and enters its still-visible code will get “no block drawn” instead of copying it; retain a lookup for blocks whose marks remain available or make the limit explicit.
Useful? React with 👍 / 👎.
| {block} | ||
| <Box flexDirection="row" justifyContent="flex-end"> | ||
| <Link href={`file://${file}`}>{label('⧉ ctrl+click')}</Link> | ||
| <Text dimColor>{` · /clip ${codeOf(source)}`}</Text> |
There was a problem hiding this comment.
Show codes on fullscreen marks
This adds the code beside the ordinary-layout link, but the fullscreen branch returns earlier with only ⧉ copy. In fullscreen, users cannot get the code from the mark to use /clip <code>, despite the change promising a code on every mark; include it in the fullscreen button label too.
Useful? React with 👍 / 👎.
In tmux with its mouse on, tmux takes the click before the terminal can open the copy mark's link, so Ctrl+click does nothing there. Each mark now shows its block's code (
/clip a3f9), and typing that copies exactly that block, anywhere. The fallback mark (before/clip setup) shows the code too.hooks/register.tsx:codeOf(), the code beside each mark, and/clip <code>.plugin.jsonset to 0.3.0 by the release lane'sbump.Released through the lane after merge.
🤖 Generated with Claude Code