Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

0.3.0: every mark shows a short code, and /clip <code> copies that block - #1

Merged
mowens3 merged 2 commits into
mainfrom
clip-codes
Dec 6, 2026
Merged

mowens3 merged 2 commits into
mainfrom
clip-codes

Conversation

@mowens3

@mowens3 mowens3 commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

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>.
  • Tests: 8 (a new one for codes; the two fallback tests now expect the code).
  • README and CHANGELOG (0.3.0); plugin.json set to 0.3.0 by the release lane's bump.

Released through the lane after merge.

🤖 Generated with Claude Code

…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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-06T03:03:49.577721Z 0c19a86 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment thread hooks/register.tsx
// `/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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid ambiguous short codes

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 👍 / 👎.

Comment thread hooks/register.tsx
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])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread hooks/register.tsx
{block}
<Box flexDirection="row" justifyContent="flex-end">
<Link href={`file://${file}`}>{label('⧉ ctrl+click')}</Link>
<Text dimColor>{` · /clip ${codeOf(source)}`}</Text>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@mowens3
mowens3 enabled auto-merge December 6, 2026 04:03
@mowens3
mowens3 merged commit 37b7b69 into main Dec 6, 2026
1 check passed
@mowens3
mowens3 deleted the clip-codes branch December 6, 2026 04:03
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