a link in chat always opens a new tab, in-app paths included
ChatLink applies target="_blank" to every anchor without exception, so linking an Officer route does not navigate the app — it loads a second copy of the whole SPA in a new tab and the person loses their place in the first. That is the intended behaviour, so this declares it rather than treating it as a defect. What changes for an agent is small and constant: name an internal route in backticks instead of linking it, since the reader is already in the app, and save links for things that genuinely belong in a tab of their own. Asked for by the owner after it was raised and set aside yesterday. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
name: Links open a new tab
|
||||||
|
description: Use when your reply contains a link, or a path inside Officer you are tempted to link.
|
||||||
|
version: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
**Every link in chat opens in a new tab.** `target="_blank"` is applied to all of them, and there is no
|
||||||
|
form of link that does not get it.
|
||||||
|
|
||||||
|
For an external URL that is what anyone wants. For a path inside Officer it is worth knowing before you
|
||||||
|
write one: `[the browser panel](/browser)` does not navigate the app, it loads a second copy of the whole
|
||||||
|
SPA in a new tab. The person ends up with two Officers open and their place lost in the first.
|
||||||
|
|
||||||
|
So:
|
||||||
|
|
||||||
|
- **A route the user should go to** — name it, do not link it. `/browser`, in backticks. They are already
|
||||||
|
in the app; telling them where is enough, and they keep the tab they are in.
|
||||||
|
- **Something genuinely separate** — a repository, a doc, a page on another host — link it. A new tab is
|
||||||
|
the right outcome and this needs no thought.
|
||||||
|
|
||||||
|
The same applies to an image: `` renders inline, but a bare link to an image is still a
|
||||||
|
link, and still opens a tab.
|
||||||
Reference in New Issue
Block a user