From 36cccffe8452059c1895c537c8b51076d52fb4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Fri, 21 Aug 2026 14:48:27 +0000 Subject: [PATCH] a link in chat always opens a new tab, in-app paths included MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../officer/core/links-open-a-new-tab.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 affordances/officer/core/links-open-a-new-tab.md diff --git a/affordances/officer/core/links-open-a-new-tab.md b/affordances/officer/core/links-open-a-new-tab.md new file mode 100644 index 0000000..e8b493a --- /dev/null +++ b/affordances/officer/core/links-open-a-new-tab.md @@ -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: `![](https://…)` renders inline, but a bare link to an image is still a +link, and still opens a tab.