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 |

<table>
<tr>
<th>Old <code>rstudio.svg</code> &rarr; new
<code>rproject.svg</code></th>
<th>New <code>rstudio.svg</code></th>
</tr>
<tr>
<td align="center"><img
src="https://raw.githubusercontent.com/coder/coder/vigilante/product-383-bundled-iconrstudiosvg-appears-to-show-r-language-logo/site/static/icon/rproject.svg"
width="128" height="128"></td>
<td align="center"><img
src="https://raw.githubusercontent.com/coder/coder/vigilante/product-383-bundled-iconrstudiosvg-appears-to-show-r-language-logo/site/static/icon/rstudio.svg"
width="128" height="128"></td>
</tr>
</table>

**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.

<details>
<summary>Implementation notes</summary>

- 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`.

</details>

Fixes #26211
Fixes PRODUCT-383

---

_Generated by Coder Agents on behalf of @nickvigilante._
This commit is contained in:
Nick Vigilante
2026-06-10 14:06:21 +00:00
committed by GitHub
parent 1cada0649c
commit 1dc12f8ae7
4 changed files with 19 additions and 14 deletions
@@ -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"
+1
View File
@@ -120,6 +120,7 @@
"rider.svg",
"rockylinux.svg",
"roo-code.svg",
"rproject.svg",
"rstudio.svg",
"ruby.png",
"ruby.svg",
+14
View File
@@ -0,0 +1,14 @@
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M128.486 200.448C58.0777 200.448 1 162.292 1 115.224C1 68.1561 58.0777 30 128.486 30C198.895 30 255.972 68.1561 255.972 115.224C255.972 162.292 198.895 200.448 128.486 200.448ZM148 63.3198C94.4835 63.3198 51.0996 89.4049 51.0996 121.583C51.0996 153.76 94.4835 179.845 148 179.845C201.517 179.845 241.011 162.012 241.011 121.583C241.011 81.1662 201.517 63.3198 148 63.3198Z" fill="url(#paint0_linear_2115_2436)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M195.156 162.001C195.156 162.001 202.872 164.325 207.355 166.589C208.91 167.375 211.601 168.942 213.542 171.001C215.444 173.017 216.371 175.059 216.371 175.059L246.78 226.236L197.631 226.258L174.647 183.177C174.647 183.177 169.941 175.106 167.045 172.765C164.63 170.813 163.6 170.118 161.211 170.118C159.548 170.118 149.533 170.118 149.533 170.118L149.542 226.227L106.051 226.245V82.9199H193.388C193.388 82.9199 233.167 83.636 233.167 121.412C233.167 159.189 195.156 162.001 195.156 162.001ZM176.239 114.009L149.909 113.992L149.896 138.363L176.239 138.354C176.239 138.354 188.438 138.317 188.438 125.957C188.438 113.349 176.239 114.009 176.239 114.009Z" fill="url(#paint1_linear_2115_2436)"/>
<defs>
<linearGradient id="paint0_linear_2115_2436" x1="1" y1="30" x2="158.502" y2="265.607" gradientUnits="userSpaceOnUse">
<stop stop-color="#CBCED0"/>
<stop offset="1" stop-color="#84838B"/>
</linearGradient>
<linearGradient id="paint1_linear_2115_2436" x1="106.051" y1="82.9199" x2="249.364" y2="223.625" gradientUnits="userSpaceOnUse">
<stop stop-color="#276DC3"/>
<stop offset="1" stop-color="#165CAA"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

+2 -12
View File
@@ -1,14 +1,4 @@
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M128.486 200.448C58.0777 200.448 1 162.292 1 115.224C1 68.1561 58.0777 30 128.486 30C198.895 30 255.972 68.1561 255.972 115.224C255.972 162.292 198.895 200.448 128.486 200.448ZM148 63.3198C94.4835 63.3198 51.0996 89.4049 51.0996 121.583C51.0996 153.76 94.4835 179.845 148 179.845C201.517 179.845 241.011 162.012 241.011 121.583C241.011 81.1662 201.517 63.3198 148 63.3198Z" fill="url(#paint0_linear_2115_2436)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M195.156 162.001C195.156 162.001 202.872 164.325 207.355 166.589C208.91 167.375 211.601 168.942 213.542 171.001C215.444 173.017 216.371 175.059 216.371 175.059L246.78 226.236L197.631 226.258L174.647 183.177C174.647 183.177 169.941 175.106 167.045 172.765C164.63 170.813 163.6 170.118 161.211 170.118C159.548 170.118 149.533 170.118 149.533 170.118L149.542 226.227L106.051 226.245V82.9199H193.388C193.388 82.9199 233.167 83.636 233.167 121.412C233.167 159.189 195.156 162.001 195.156 162.001ZM176.239 114.009L149.909 113.992L149.896 138.363L176.239 138.354C176.239 138.354 188.438 138.317 188.438 125.957C188.438 113.349 176.239 114.009 176.239 114.009Z" fill="url(#paint1_linear_2115_2436)"/>
<defs>
<linearGradient id="paint0_linear_2115_2436" x1="1" y1="30" x2="158.502" y2="265.607" gradientUnits="userSpaceOnUse">
<stop stop-color="#CBCED0"/>
<stop offset="1" stop-color="#84838B"/>
</linearGradient>
<linearGradient id="paint1_linear_2115_2436" x1="106.051" y1="82.9199" x2="249.364" y2="223.625" gradientUnits="userSpaceOnUse">
<stop stop-color="#276DC3"/>
<stop offset="1" stop-color="#165CAA"/>
</linearGradient>
</defs>
<circle cx="128" cy="128" r="128" fill="#75AADB"/>
<path d="M171.796,168.862h13.883v10.784h-21.196L129.363,127.008h-18.717v41.854h18.303v10.784H82.882v-10.784h15.824V76.106l-15.824,-1.942v-10.205c5.991,1.363,11.197,2.314,17.725,2.314c9.833,0,19.873,-2.314,29.707,-2.314c19.088,0,36.813,8.677,36.813,29.872c0,16.403,-9.833,26.815,-25.079,31.236L171.796,168.862zM110.647,116.597l10.04,0.207c24.501,0.372,33.921,-9.048,33.921,-21.609c0,-14.668,-10.618,-20.452,-24.088,-20.452c-6.363,0,-12.932,0.578,-19.873,1.363V116.597z" fill="#FFFFFF"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 644 B