Skip to content

Copy a link to any thread message, and land a reply's link on that reply - #7159

Merged
max-sixty merged 4 commits into
mainfrom
thread-links
Nov 25, 2026
Merged

max-sixty merged 4 commits into
mainfrom
thread-links

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Each message drawn in a thread now shows a Copy link control (the copy-link action's link symbol) beside Copy. It copies the page's address naming that message, ?thread=<id>, without the fragment the address held, and opening the link opens the thread on that message: a reply's link now lands on the reply (part message) rather than where opening the thread lands, and a link naming a message drawn with no row of its own (a reaction's chip, a step of the agent's work) lands on its thread, as before. The opening message's link is the thread's. y in a thread presses the Copy link of the message the user is in, else of the opening message, from any control of the thread, the panel's Resolve on its head line included; Mod+c (Copy) now reaches the messages from there too.

To weigh: with a pointer the control shows on hover or focus, as Copy does. Under a finger it always shows, beside the reaction or Edit, since the address bar names only the thread; Copy stays hidden there. On a 390px phone the panel's message head keeps about 170px to spare with both controls, so they cut no words. On a margin card, the first message's head also holds the thread's controls, so while the pointer is on that message the wider group covers the end of its time (10:10 AM shows 10:10 A), by the head's existing rule that controls cover the words' end. The link carries no access key, like a section's link; the menu's link row stays the route that adds one. y was unused; Mod+Shift+C opens the inspector in Chrome and Firefox.

Max asked for it ("a link to things like threads, and a button that could copy the link"); a fresh-context review of the captures and a Codex review read it, and Codex's four findings are folded in.

Tests: new browser tests copy a reply's link and the thread's (y from the panel's Resolve) and follow the reply's link to the reply, copy a reply's link under a finger, open a link naming a reaction or a progress step on its thread, and open a link to a message a summary folds; the tabbed-thread arrival test now expects focus on the reply its URL names, and the Copy test's show-and-hide check no longer counts two controls.

This was written by Claude Code on behalf of max-sixty

Each message drawn in a thread shows Copy link beside Copy, under the pointer
or focus like Copy. It copies the page's address naming the message
(`?thread=<id>`, records/thread/address.js `messageLink`), without the
fragment the address held, so the link opens the thread on that message. The
opening message's link is the thread's. `y` in a thread presses the Copy link
of the message the user is in, else of the opening message. Under a finger it
is left out, as Copy is.

A URL naming one of a thread's replies now lands on that reply (part
"message") rather than where opening the thread lands.

Tests: the copy test's check that a message's controls show and hide together
now holds for any number of controls, rather than counting two.
…ch Copy link

A link naming a message the thread draws with no row of its own, a reaction's
chip or a step of the agent's work, now lands on its thread, as before the
reply landing: a message part resolves to its row where the drawing has one,
else to the thread (focus.js `threadFocusDestination`, the primary reader's
`destination`), rather than to nothing.

`y` and Mod+c find the thread's messages from a control the panel draws on its
own head line, as Resolve: they search the whole of the thread
(selectors.js `wholeThread`) rather than the drawing the control stands in.

Under a finger Copy link now shows beside the reaction or Edit, since the
address names only the thread, so nothing else gave a finger a reply's link.
Copy stays hidden there. On a 390px phone the panel's message head keeps
about 170px to spare with both controls.

Tests: the tabbed-thread arrival test now expects focus on the reply its URL
names; new tests copy a reply's link under a finger, open a link naming a
reaction or a progress step on its thread, open a link to a message a summary
folds, and press `y` from the panel's Resolve.
@max-sixty
max-sixty merged commit 118f31f into main Nov 25, 2026
6 checks passed
@max-sixty
max-sixty deleted the thread-links branch November 25, 2026 10:33
leaf-agent added a commit that referenced this pull request Nov 25, 2026
…7164)

Under a finger, a thread's opening message no longer shows Copy link.
Replies still show it. This fixes the two touch tests that have failed
on `main` since #7159 (`118f31f6d`), in [run
45600749683](https://github.com/max-sixty/leaf/actions/runs/45600749683):

-
`tests/browser/margin/test_card_placement.py::test_a_card_s_head_stands_whole_beside_news[True]`
-
`tests/browser/threads/test_rewrites.py::test_a_cards_message_controls_cover_its_head`

**Cause.** #7159 shows Copy link on every message under a finger. On a
margin card the opening message's head also holds the thread's controls
(Open in panel, Resolve, Close). On a card at its least width, the extra
control cut the user's name to "M" and hid the "edited" label.

**Fix.** #7159 gives its reason for showing the control under a finger:
nothing else gives a finger a **reply's** link. The opening message's
link is the thread's own, and the address already holds it while the
thread is open. So under a finger the opening message drops Copy link,
as it already drops Copy. With a pointer nothing changes, and `y` still
copies the thread's link.

**Verification.** Both tests fail locally at `f41ae2fe6`. They pass with
#7159 reverted, and they pass on this branch. #7159's two link tests
also pass. `test_a_finger_copies_a_reply_s_link` now also asserts that
the opening message has no Copy link under a finger; that assertion
fails without the CSS change.

**On screen**, on a touch card 1408 px wide, before and after:

| | before (`f41ae2fe6`) | after |
|---|---|---|
| card with news, user's message first |
![before](https://github.com/user-attachments/assets/c3b70150-43dd-40d5-9204-afa1d2cba1f7)
|
![after](https://github.com/user-attachments/assets/4a0d7dbe-dc83-4aab-ad2f-befc7224e472)
|
| card after a saved rewrite |
![before](https://github.com/user-attachments/assets/b99569a9-5c49-4677-9165-a0c2b93c086d)
|
![after](https://github.com/user-attachments/assets/dcbc851c-48bf-4e54-a230-7b4ce84291ba)
|

What this gives up from #7159: under a finger, the thread's link is no
longer one tap on its opening message. It stays in the address bar, and
`y` still copies it. The pictures also show a defect this PR leaves
alone: under a finger, a reply's link glyph sits about 12 px below the
reaction beside it.

Refs #7163 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 26, 2026
…intainer, and leave every other call to the agent (#7184)

Root `AGENTS.md`, "The maintainer decides", now opens by saying a call
outside its list is the agent's and the work doesn't wait on the
maintainer for it; the agent names the call so they can reverse it. The
list gains three kinds of change that wait for their approval: changing
core UX, such as how a user comments or a keyboard shortcut; growing the
package interface; and adding to the browser runtime or the server a
mechanism that later changes there must reason about. A held change
lands only once they approve it, and the rest of the work lands without
it, as #7159's Copy link control could have landed without `y`. "Where
instructions live" now says other instructions neither repeat a root
rule nor send their reader back to one, since every session reads the
root file; a pointer to a detail stays. "Working on the repository"
drops its sentence on UI decisions a PR body leaves, which the rule
before it already covers. "Read what the page states" drops its closing
reservation, since departing from a principle is already their call.
"Keep the package interface small" now gives the interface entry's
reason, sprawl through names that each look reasonable alone, in place
of what each name costs authors to learn.

Calls the maintainer may reverse: any addition to the package interface
waits, even one name, with renames and another theme token beside its
siblings exempt; "core" covers the server as well as the browser
runtime; a smaller change within a task, such as what one press of
Escape closes, stays the agent's.

In the root-guidance eval against main, main's text merged the `y`
shortcut and a new widget event in 3 of 3 samples each and added a
pointer to a root section in 3 of 3; this text held the shortcut and the
event and added no pointer every time, while still merging #7159's
placement calls, a one-module fix and a one-press Escape change. Main's
44 situations pass 112 of 132 here against 116 of 132 on main. One of
them moves beyond noise: on `filter-hooks-simply`, this text builds the
in-process hooks gate the rubric forbids in 9 of 18 samples, against
none of 9 on main. Codex reviewed two earlier rounds; its findings are
folded in.

Asked for by max-sixty, who commented on the wording and approved it on
a Leaf page.

> _This was written by Claude Code on behalf of max-sixty_
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