Skip to content

Commit 4dbc6c6

Browse files
feat(dotcom): show release name on admin panel (tldraw#8630)
In order to let tldraw teammates see which dotcom SPA build they are on (the same string Sentry uses for releases), this PR shows that value under the admin panel title. ### Change type - [x] `improvement` ### Test plan 1. Sign in as a tldraw user and open the admin panel. 2. Confirm a **Release:** line appears under “Admin Panel” with `local` in development, or the `production-<sha>` style string after a production deploy. - [ ] Unit tests - [ ] End to end tests ### Code changes | Section | LOC change | | --------------- | ---------- | | Core code | +0 / -0 | | Tests | +0 / -0 | | Automated files | +0 / -0 | | Documentation | +0 / -0 | | Apps | +27 / -0 | | Templates | +0 / -0 | | Config/tooling | +0 / -0 | Made with [Cursor](https://cursor.com)
1 parent 80d88e8 commit 4dbc6c6

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

apps/dotcom/client/src/pages/admin.module.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@
1515
background-color: var(--tla-color-panel);
1616
}
1717

18+
.adminReleaseMeta {
19+
margin: 10px 0 0 0;
20+
font-size: 12px;
21+
line-height: 1.4;
22+
color: var(--tla-color-text-3);
23+
}
24+
25+
.adminReleaseLabel {
26+
font-weight: 500;
27+
margin-right: 4px;
28+
}
29+
30+
.adminReleaseValue {
31+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
32+
font-size: 11px;
33+
font-weight: 500;
34+
color: var(--tla-color-text-2);
35+
word-break: break-all;
36+
}
37+
1838
.adminContent {
1939
flex: 1;
2040
padding: 24px 32px;

apps/dotcom/client/src/pages/admin.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
import { RefObject, useCallback, useEffect, useRef, useState } from 'react'
1010
import { Navigate } from 'react-router-dom'
1111
import { fetch } from 'tldraw'
12+
import { sentryReleaseName } from '../../sentry-release-name'
1213
import { TlaButton } from '../tla/components/TlaButton/TlaButton'
1314
import { useTldrawCurrentUser } from '../tla/hooks/useUser'
1415
import { saveMigrationLog } from './migrationLogsDB'
@@ -166,6 +167,12 @@ export function Component() {
166167
<div className={styles.adminContainer}>
167168
<header className={styles.adminHeader}>
168169
<h1 className="tla-text_ui__big">Admin Panel</h1>
170+
<p className={styles.adminReleaseMeta}>
171+
<span className={styles.adminReleaseLabel}>Release:</span>{' '}
172+
<code className={styles.adminReleaseValue} translate="no">
173+
{sentryReleaseName}
174+
</code>
175+
</p>
169176
</header>
170177

171178
<main className={styles.adminContent}>

0 commit comments

Comments
 (0)