Skip to content

Commit b2e5f8f

Browse files
committed
fix(hub): minor polishing (#2444)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent a2aeafd commit b2e5f8f

File tree

22 files changed

+191
-52
lines changed

22 files changed

+191
-52
lines changed

frontend/apps/hub/src/components/command-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export function CommandPanel({ className }: { className?: string }) {
146146
)}
147147
>
148148
<span className="hidden @[100px]:inline-flex">Search...</span>
149-
<Kbd className="@[100px]:absolute right-[0.3rem] top-[0.3rem] hidden sm:flex">
149+
<Kbd className="@[100px]:absolute right-[0.3rem] top-1/2 -translate-y-1/2 hidden sm:flex">
150150
<Kbd.Key />K
151151
</Kbd>
152152
</Button>

frontend/apps/hub/src/components/header/header.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { HeaderRouteLoader } from "./header-route-loader";
1818
import { HeaderSubNav } from "./header-sub-nav";
1919
import { MobileHeaderSubNav } from "./mobile-header-sub-nav";
2020
import { NavItem } from "./nav-item";
21+
import { CommandPanel } from "../command-panel";
2122

2223
const UserProfileButton = () => {
2324
const { profile } = useAuth();
@@ -50,7 +51,7 @@ export function Header({ variant = "opaque" }: HeaderProps) {
5051
return (
5152
<header
5253
className={cn(
53-
" sticky top-0 z-10 flex items-center gap-4 border-b py-2",
54+
" sticky top-0 z-10 flex items-center gap-4 border-b py-2 @container",
5455
{
5556
"bg-background/60 backdrop-blur": variant === "default",
5657
"bg-background": variant === "opaque",
@@ -140,6 +141,7 @@ export function Header({ variant = "opaque" }: HeaderProps) {
140141
</div>
141142
</nav>
142143
<div className="gap-6 font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm">
144+
<CommandPanel className="h-full" />
143145
<NavItem
144146
asChild
145147
className="hidden md:inline-block border px-4 py-2 rounded-md"

frontend/apps/hub/src/queries/global.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ const clientOptions: RivetClient.Options = {
133133
...args,
134134
withCredentials: true,
135135
maxRetries: 0,
136+
timeoutMs: 30_000 // 30 seconds
136137
});
137138

138139
return response;

frontend/apps/hub/src/routes/_authenticated/_layout/projects/$projectNameId/environments/$environmentNameId._v2/actor-versions.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ function ProjectBuildsRoute() {
154154
</TableCell>
155155
<TableCell>
156156
<ActorTags
157+
className="max-w-[200px]"
157158
{...build}
159+
truncate={true}
158160
excludeBuiltIn="builds"
159161
/>
160162
</TableCell>

frontend/apps/hub/src/routes/_authenticated/_layout/projects/$projectNameId/environments/$environmentNameId._v2/actors.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
ActorFeature,
3+
ActorNotFound,
34
ActorsActorDetails,
45
ActorsActorEmptyDetails,
56
ActorsListFiltersSchema,
@@ -31,7 +32,16 @@ function Actor() {
3132
const actor = useAtomValue(currentActorAtom);
3233

3334
if (!actor) {
34-
return null;
35+
return (
36+
<ActorNotFound
37+
features={[
38+
ActorFeature.Config,
39+
ActorFeature.Logs,
40+
ActorFeature.State,
41+
ActorFeature.Connections,
42+
]}
43+
/>
44+
);
3545
}
3646

3747
return (

frontend/apps/hub/src/routes/_authenticated/_layout/projects/$projectNameId/environments/$environmentNameId._v2/containers.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
ActorFeature,
3+
ActorNotFound,
34
ActorsActorDetails,
45
ActorsActorEmptyDetails,
56
ActorsListFiltersSchema,
@@ -35,7 +36,11 @@ function Actor() {
3536
const actor = useAtomValue(currentActorAtom);
3637

3738
if (!actor) {
38-
return null;
39+
return (
40+
<ActorNotFound
41+
features={[ActorFeature.Config, ActorFeature.Logs]}
42+
/>
43+
);
3944
}
4045

4146
return (
@@ -68,7 +73,10 @@ const ACTORS_VIEW_CONTEXT = {
6873
selectActor: (
6974
<>
7075
No Container selected.
71-
<br /> Select a Container from the list to view its details.
76+
<br />
77+
<span className="text-sm text-muted-foreground">
78+
Select a Container from the list to view its details.
79+
</span>
7280
</>
7381
),
7482
showActorList: "Show Container list",
@@ -78,14 +86,19 @@ const ACTORS_VIEW_CONTEXT = {
7886
actorId: "Container ID",
7987
noMoreActors: "No more Containers to load.",
8088
noActorsMatchFilter: "No Containers match the filters.",
89+
showHiddenActors: "Show hidden Containers",
8190

8291
createActorModal: {
8392
title: "Create Container",
8493
description:
8594
"Choose a build to create a Container from. Container will be created using default settings.",
8695
},
96+
97+
actorNotFound: "Container not found",
98+
actorNotFoundDescription:
99+
"Change your filters to find the Container you are looking for.",
87100
},
88-
requiresManager: false,
101+
canCreate: false,
89102
};
90103

91104
function Content() {

frontend/apps/hub/src/routes/_authenticated/_layout/projects/$projectNameId/environments/$environmentNameId._v2/logs.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
CommandGroup,
2828
CommandItem,
2929
SmallText,
30+
LiveBadge,
3031
} from "@rivet-gg/components";
3132
import {
3233
useInfiniteQuery,
@@ -238,6 +239,8 @@ function ProjectFunctionsRoute() {
238239
return (
239240
<div className="flex flex-col max-w-full max-h-full w-full h-full bg-card relative">
240241
<div className="flex px-2 w-full border-b sticky top-0 min-h-[42px]">
242+
<LiveBadge className="my-2" />
243+
<div className="h-full border-l ml-2" />
241244
<input
242245
ref={searchInputRef}
243246
type="text"

frontend/apps/hub/src/routes/_authenticated/_layout/projects/$projectNameId/environments/$environmentNameId/_v2.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ function Sidebar() {
7878
}}
7979
>
8080
<div className="flex flex-col">
81-
<CommandPanel className="lg:w-full md:w-full mb-2" />
8281
<ul className="w-full flex flex-col gap-2">
8382
{SIDEBAR.map((item, index) => {
8483
if ("items" in item) {

frontend/packages/components/src/actors/actor-build.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,18 @@ export function ActorBuild({ actor }: ActorBuildProps) {
4040
<Dl>
4141
<Dt>ID</Dt>
4242
<Dd>
43-
<DiscreteCopyButton size="xs" value={data.id}>
43+
<DiscreteCopyButton
44+
size="xs"
45+
value={data.id}
46+
className="truncate"
47+
>
4448
{data.id}
4549
</DiscreteCopyButton>
4650
</Dd>
4751
<Dt>Created</Dt>
4852
<Dd>
4953
<DiscreteCopyButton
54+
className="truncate"
5055
size="xs"
5156
value={formatISO(data.createdAt)}
5257
>
@@ -63,6 +68,7 @@ export function ActorBuild({ actor }: ActorBuildProps) {
6368
>
6469
<ActorTags
6570
className="justify-start text-foreground"
71+
truncate={false}
6672
tags={data.tags}
6773
/>
6874
</Flex>

frontend/packages/components/src/actors/actor-context.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ export const filteredActorsAtom = atom((get) => {
220220

221221
return filter.value.includes(actor.status);
222222
}
223+
224+
return true;
223225
},
224226
);
225227

0 commit comments

Comments
 (0)