From c6ddffc55d493465ad6d01978370b43ef13dee79 Mon Sep 17 00:00:00 2001 From: Nick Vigilante Date: Wed, 10 Jun 2026 10:06:21 -0400 Subject: [PATCH] fix: rename bundled rstudio.svg to rproject.svg, add real RStudio icon (#26216) The bundled `/icon/rstudio.svg` rendered the R language logo (gray oval, blue R), not the RStudio IDE logo, so templates using the `rstudio` `coder_app` and the bundled URL got the wrong artwork ([#26211](https://github.com/coder/coder/issues/26211), PRODUCT-383). This PR: - Renames the existing `rstudio.svg` (R language logo) to `rproject.svg` so the artwork stays available for templates that want it. - Adds a new `rstudio.svg` containing the actual RStudio R-ball logo, extracted from the [Wikimedia source](https://upload.wikimedia.org/wikipedia/commons/d/d0/RStudio_logo_flat.svg) and normalized to `viewBox="0 0 256 256"` to match the rest of the icon set. - Adds `rproject.svg` to `site/src/theme/icons.json` so it appears in the icon picker and gallery alongside `rstudio.svg`. - Switches the `coder_app "rstudio"` example in `docs/admin/templates/extending-templates/web-ides.md` to reference `/icon/rstudio.svg` (and corrects `display_name` to `"RStudio"`), matching every other example on that page. | Path | Before | After | | --- | --- | --- | | `/icon/rstudio.svg` | R language logo | RStudio R-ball | | `/icon/rproject.svg` | (did not exist) | R language logo |
Old rstudio.svg → new rproject.svg New rstudio.svg
**Breaking-change note.** Templates that referenced `/icon/rstudio.svg` expecting the R language oval will now render the RStudio R-ball. Templates that want the R language logo should switch to `/icon/rproject.svg`. The Linear issue acknowledges this tradeoff. **Client cache caveat.** `site/site.go` serves everything under `/icon/` with `Cache-Control: public, max-age=31536000, immutable`, so any browser that already loaded the old artwork at `/icon/rstudio.svg` can keep displaying it for up to a year before revalidating. A hard refresh (Ctrl/Cmd+Shift+R) clears it immediately. Cache-busting (hashed icon URLs) is out of scope for this fix and tracked as a possible follow-up against PRODUCT-383.
Implementation notes - Verified geometric fidelity by rendering the new SVG and a high-resolution crop of the Wikimedia source at 256x256 and computing the RMS pixel difference: 1.268/255 (~0.5%, essentially antialiasing noise). - Picked `viewBox="0 0 256 256"` because 139 of 142 SVGs in `site/static/icon/` already use that viewBox. - Searched the repo for `rstudio.svg` references: the only direct one is `site/src/theme/icons.json`. The docs file references the `rstudio` `coder_app` slug, not the icon path, so the rename does not break any callsite. - R-ball geometry: source circle at (318.7, 312.9) radius 309.8 in the original `viewBox 0 0 1784.1 625.9`. Translating by (-8.9, -3.1) and scaling by 256/619.6 maps its bounding box onto `0 0 256 256`. Path coordinates are pre-computed so the file ships with no transform layer. - Pre-commit hooks passed locally, including `lint/site-icons`.
Fixes #26211 Fixes PRODUCT-383 --- _Generated by Coder Agents on behalf of @nickvigilante._ (cherry picked from commit 1dc12f8ae7248181e61f71167de1576c0a0618af) --- .../templates/extending-templates/web-ides.md | 4 ++-- site/src/theme/icons.json | 1 + site/static/icon/rproject.svg | 14 ++++++++++++++ site/static/icon/rstudio.svg | 14 ++------------ 4 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 site/static/icon/rproject.svg diff --git a/docs/admin/templates/extending-templates/web-ides.md b/docs/admin/templates/extending-templates/web-ides.md index 4240dfe5520..ba27683987f 100644 --- a/docs/admin/templates/extending-templates/web-ides.md +++ b/docs/admin/templates/extending-templates/web-ides.md @@ -240,8 +240,8 @@ EOT resource "coder_app" "rstudio" { agent_id = coder_agent.coder.id slug = "rstudio" - display_name = "R Studio" - icon = "https://upload.wikimedia.org/wikipedia/commons/d/d0/RStudio_logo_flat.svg" + display_name = "RStudio" + icon = "/icon/rstudio.svg" url = "http://localhost:8787" subdomain = true share = "owner" diff --git a/site/src/theme/icons.json b/site/src/theme/icons.json index 8cb169c2b95..b16ec2a727a 100644 --- a/site/src/theme/icons.json +++ b/site/src/theme/icons.json @@ -118,6 +118,7 @@ "rider.svg", "rockylinux.svg", "roo-code.svg", + "rproject.svg", "rstudio.svg", "ruby.png", "ruby.svg", diff --git a/site/static/icon/rproject.svg b/site/static/icon/rproject.svg new file mode 100644 index 00000000000..b5545c3fa4a --- /dev/null +++ b/site/static/icon/rproject.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/site/static/icon/rstudio.svg b/site/static/icon/rstudio.svg index b5545c3fa4a..4e615c95b02 100644 --- a/site/static/icon/rstudio.svg +++ b/site/static/icon/rstudio.svg @@ -1,14 +1,4 @@ - - - - - - - - - - - - + +