Skip to content

Commit b512b3f

Browse files
committed
fix(webapp): restore admin debug tooltip on Tasks and Runs, make its IDs copyable
The admin-only debug tooltip (the shield icon in the page header) was removed from the Tasks page in #3941 and had never been present on the Runs list. Re-add `<AdminDebugTooltip />` to both pages' accessories so it matches the other dashboard pages. Also wrap the tooltip's identifier values (User ID, Org ID, Project ID, Project ref, Environment ID) in `CopyableText` so admins can copy them on hover, reusing the same copy-on-hover control used in table cells.
1 parent a9815f7 commit b512b3f

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

  • apps/webapp/app
    • components/admin
    • routes
      • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index
      • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs._index

apps/webapp/app/components/admin/debugTooltip.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ShieldCheckIcon } from "@heroicons/react/20/solid";
2+
import { CopyableText } from "~/components/primitives/CopyableText";
23
import * as Property from "~/components/primitives/PropertyTable";
34
import {
45
Tooltip,
@@ -44,31 +45,41 @@ function Content({ children }: { children: React.ReactNode }) {
4445
<Property.Table>
4546
<Property.Item>
4647
<Property.Label>User ID</Property.Label>
47-
<Property.Value>{user.id}</Property.Value>
48+
<Property.Value>
49+
<CopyableText value={user.id} asChild />
50+
</Property.Value>
4851
</Property.Item>
4952
{organization && (
5053
<Property.Item>
5154
<Property.Label>Org ID</Property.Label>
52-
<Property.Value>{organization.id}</Property.Value>
55+
<Property.Value>
56+
<CopyableText value={organization.id} asChild />
57+
</Property.Value>
5358
</Property.Item>
5459
)}
5560
{project && (
5661
<>
5762
<Property.Item>
5863
<Property.Label>Project ID</Property.Label>
59-
<Property.Value>{project.id}</Property.Value>
64+
<Property.Value>
65+
<CopyableText value={project.id} asChild />
66+
</Property.Value>
6067
</Property.Item>
6168
<Property.Item>
6269
<Property.Label>Project ref</Property.Label>
63-
<Property.Value>{project.externalRef}</Property.Value>
70+
<Property.Value>
71+
<CopyableText value={project.externalRef} asChild />
72+
</Property.Value>
6473
</Property.Item>
6574
</>
6675
)}
6776
{environment && (
6877
<>
6978
<Property.Item>
7079
<Property.Label>Environment ID</Property.Label>
71-
<Property.Value>{environment.id}</Property.Value>
80+
<Property.Value>
81+
<CopyableText value={environment.id} asChild />
82+
</Property.Value>
7283
</Property.Item>
7384
<Property.Item>
7485
<Property.Label>Environment type</Property.Label>

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { PlusIcon } from "~/assets/icons/PlusIcon";
1616
import { QuestionMarkIcon } from "~/assets/icons/QuestionMarkIcon";
1717
import { RunsIcon } from "~/assets/icons/RunsIcon";
1818
import { TaskIcon } from "~/assets/icons/TaskIcon";
19+
import { AdminDebugTooltip } from "~/components/admin/debugTooltip";
1920
import { CodeBlock } from "~/components/code/CodeBlock";
2021
import { InlineCode } from "~/components/code/InlineCode";
2122
import { HasNoTasksDeployed, HasNoTasksDev } from "~/components/BlankStatePanels";
@@ -261,6 +262,7 @@ export default function Page() {
261262
<NavBar>
262263
<PageTitle title="Tasks" accessory={<TasksHelpTooltip />} />
263264
<PageAccessories>
265+
<AdminDebugTooltip />
264266
<LinkButton
265267
variant={"docs/small"}
266268
LeadingIcon={BookOpenIcon}

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs._index/route.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { ListCheckedIcon } from "~/assets/icons/ListCheckedIcon";
1212
import { QuestionMarkIcon } from "~/assets/icons/QuestionMarkIcon";
1313
import { TaskIcon } from "~/assets/icons/TaskIcon";
14+
import { AdminDebugTooltip } from "~/components/admin/debugTooltip";
1415
import { DevDisconnectedBanner, useDevPresence } from "~/components/DevPresence";
1516
import { InlineCode } from "~/components/code/InlineCode";
1617
import { StepContentContainer } from "~/components/StepContentContainer";
@@ -166,6 +167,7 @@ export default function Page() {
166167
<DevDisconnectedBanner isConnected={isConnected} />
167168
)}
168169
<PageAccessories>
170+
<AdminDebugTooltip />
169171
<LinkButton
170172
variant={"docs/small"}
171173
LeadingIcon={BookOpenIcon}

0 commit comments

Comments
 (0)