GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(site/src/components/Link): hide the external link icon on internal links by chrifro · Pull Request #32045 · coder/coder

Conversation

@chrifro

@chrifro chrifro commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

The shared Link component showed its external link icon by default, so same-tab internal links (for example "Activity Audit", "License Consumption" and "Go to workspaces") looked external.

When showExternalIcon is unset, Link now shows the icon only when the link opens in a new tab (target="_blank") or its href points to another http(s) origin. With asChild, it reads href and target from the child and falls back to its own props, matching how Slot merges them; a RouterLink has only to, so it counts as internal. An explicit showExternalIcon still overrides the default, so existing showExternalIcon={false} call sites are unchanged. Docs links built with docs() resolve to https://coder.com/docs, so they keep the icon.

The origin check uses new URL in a try/catch rather than URL.parse, which Chrome 111 and Safari 16.4 in browserslist lack.

The InlineUsage story renders links without href, so its Pixel baseline loses the icon. New stories: Internal, InternalRouterLink, ExternalSameTab.

Closes DEQ-608

Before After
before after

/deployment/overview, "How we calculate engaged users" expanded, captured from the dev server.

Decision log
  • Changed the Link default instead of adding showExternalIcon={false} at each call site, so every internal link is fixed, including ones the ticket did not list.
  • With asChild, child href/target take precedence over Link's own, mirroring Radix Slot's prop merge. A child that builds its anchor internally, or a RouterLink with an absolute external to, counts as internal; such callers can pass showExternalIcon explicitly. No current caller does this.
  • Same-origin absolute URLs (for example notification links back into the deployment) count as internal.
  • Checks run: pnpm test for Link and its consumers (Markdown, HelpPopover, notifications, Filter, TemplateBuilder), pnpm lint:types, Biome, make pre-commit, and the frontend-deep-review skill (all findings fixed).

Generated by Coder Agents on behalf of @chrifro.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chrifro
fix(site/src/components/Link): hide the external link icon on interna…
1f4afaf
…l links

Link showed its external link icon by default, even on same-tab internal
links. When showExternalIcon is unset, show the icon only for links that
open in a new tab or point to another origin. With asChild, read href and
target from the child, so a RouterLink counts as internal.
@chrifro
chrifro temporarily deployed to main November 11, 2026 10:05 — with GitHub Actions Inactive
@chrifro
chrifro temporarily deployed to main November 11, 2026 10:05 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 11, 2026

Copy link
Copy Markdown

DEQ-608

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned chrifro Nov 11, 2026
@chrifro
chrifro requested a review from aqandrew November 11, 2026 10:41
@chrifro
chrifro marked this pull request as ready for review November 11, 2026 10:41
@chrifro
chrifro temporarily deployed to main November 11, 2026 10:41 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
main — 1f4afaf4 Deployed Nov 11, 2026 by chrifro via cla #254118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aqandrew aqandrew Awaiting requested review from aqandrew

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@chrifro chrifro

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@chrifro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.