Skip to content

Commit 242445e

Browse files
authored
feat(ui): update homepage and sidebar (#1512)
1 parent f6daefb commit 242445e

File tree

80 files changed

+1055
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1055
-431
lines changed

apps/agentstack-ui/src/@types/svg.d.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
*/
55

66
declare module '*.svg' {
7-
import type * as React from 'react';
8-
9-
const ReactComponent: React.FunctionComponent<
10-
React.ComponentProps<'svg'> & { title?: string; titleId?: string; desc?: string; descId?: string }
11-
>;
7+
import type { FC, SVGProps } from 'react';
8+
const content: FC<SVGProps<SVGElement>>;
9+
export default content;
10+
}
1211

13-
export default ReactComponent;
12+
declare module '*.svg?url' {
13+
const content: string;
14+
export default content;
1415
}

apps/agentstack-ui/src/api/schema.d.ts

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ export interface paths {
8585
cookie?: never;
8686
};
8787
/** A2A Proxy Http Transport */
88-
get: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options'];
88+
get: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get'];
8989
/** A2A Proxy Http Transport */
90-
put: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options'];
90+
put: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get'];
9191
/** A2A Proxy Http Transport */
92-
post: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options'];
92+
post: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get'];
9393
/** A2A Proxy Http Transport */
94-
delete: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options'];
94+
delete: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get'];
9595
/** A2A Proxy Http Transport */
96-
options: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options'];
96+
options: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get'];
9797
/** A2A Proxy Http Transport */
98-
head: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options'];
98+
head: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get'];
9999
/** A2A Proxy Http Transport */
100-
patch: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options'];
100+
patch: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get'];
101101
trace?: never;
102102
};
103103
'/api/v1/a2a/{provider_id}/http/{path}': {
@@ -108,19 +108,19 @@ export interface paths {
108108
cookie?: never;
109109
};
110110
/** A2A Proxy Http Transport */
111-
get: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options'];
111+
get: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get'];
112112
/** A2A Proxy Http Transport */
113-
put: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options'];
113+
put: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get'];
114114
/** A2A Proxy Http Transport */
115-
post: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options'];
115+
post: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get'];
116116
/** A2A Proxy Http Transport */
117-
delete: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options'];
117+
delete: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get'];
118118
/** A2A Proxy Http Transport */
119-
options: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options'];
119+
options: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get'];
120120
/** A2A Proxy Http Transport */
121-
head: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options'];
121+
head: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get'];
122122
/** A2A Proxy Http Transport */
123-
patch: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options'];
123+
patch: operations['a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get'];
124124
trace?: never;
125125
};
126126
'/api/v1/configurations/system': {
@@ -1791,7 +1791,7 @@ export interface components {
17911791
updated_at?: string;
17921792
};
17931793
/** ContextResponse */
1794-
agentstack_server__api__schema__common__EntityModel____class_getitem_____locals___ModelOutput__14: {
1794+
agentstack_server__api__schema__common__EntityModel____class_getitem_____locals___ModelOutput__13: {
17951795
/**
17961796
* Created At
17971797
* Format: date-time
@@ -1825,7 +1825,7 @@ export interface components {
18251825
updated_at?: string;
18261826
};
18271827
/** ContextResponse */
1828-
agentstack_server__api__schema__common__EntityModel____class_getitem_____locals___ModelOutput__15: {
1828+
agentstack_server__api__schema__common__EntityModel____class_getitem_____locals___ModelOutput__14: {
18291829
/**
18301830
* Created At
18311831
* Format: date-time
@@ -4121,7 +4121,7 @@ export interface operations {
41214121
};
41224122
};
41234123
};
4124-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options: {
4124+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get: {
41254125
parameters: {
41264126
query?: {
41274127
path?: string;
@@ -4154,7 +4154,7 @@ export interface operations {
41544154
};
41554155
};
41564156
};
4157-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options: {
4157+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get: {
41584158
parameters: {
41594159
query?: {
41604160
path?: string;
@@ -4187,7 +4187,7 @@ export interface operations {
41874187
};
41884188
};
41894189
};
4190-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options: {
4190+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get: {
41914191
parameters: {
41924192
query?: {
41934193
path?: string;
@@ -4220,7 +4220,7 @@ export interface operations {
42204220
};
42214221
};
42224222
};
4223-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options: {
4223+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get: {
42244224
parameters: {
42254225
query?: {
42264226
path?: string;
@@ -4253,7 +4253,7 @@ export interface operations {
42534253
};
42544254
};
42554255
};
4256-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options: {
4256+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get: {
42574257
parameters: {
42584258
query?: {
42594259
path?: string;
@@ -4286,7 +4286,7 @@ export interface operations {
42864286
};
42874287
};
42884288
};
4289-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options: {
4289+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get: {
42904290
parameters: {
42914291
query?: {
42924292
path?: string;
@@ -4319,7 +4319,7 @@ export interface operations {
43194319
};
43204320
};
43214321
};
4322-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_options: {
4322+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http_get: {
43234323
parameters: {
43244324
query?: {
43254325
path?: string;
@@ -4352,7 +4352,7 @@ export interface operations {
43524352
};
43534353
};
43544354
};
4355-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options: {
4355+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get: {
43564356
parameters: {
43574357
query?: never;
43584358
header?: never;
@@ -4384,7 +4384,7 @@ export interface operations {
43844384
};
43854385
};
43864386
};
4387-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options: {
4387+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get: {
43884388
parameters: {
43894389
query?: never;
43904390
header?: never;
@@ -4416,7 +4416,7 @@ export interface operations {
44164416
};
44174417
};
44184418
};
4419-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options: {
4419+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get: {
44204420
parameters: {
44214421
query?: never;
44224422
header?: never;
@@ -4448,7 +4448,7 @@ export interface operations {
44484448
};
44494449
};
44504450
};
4451-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options: {
4451+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get: {
44524452
parameters: {
44534453
query?: never;
44544454
header?: never;
@@ -4480,7 +4480,7 @@ export interface operations {
44804480
};
44814481
};
44824482
};
4483-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options: {
4483+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get: {
44844484
parameters: {
44854485
query?: never;
44864486
header?: never;
@@ -4512,7 +4512,7 @@ export interface operations {
45124512
};
45134513
};
45144514
};
4515-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options: {
4515+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get: {
45164516
parameters: {
45174517
query?: never;
45184518
header?: never;
@@ -4544,7 +4544,7 @@ export interface operations {
45444544
};
45454545
};
45464546
};
4547-
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__options: {
4547+
a2a_proxy_http_transport_api_v1_a2a__provider_id__http__path__get: {
45484548
parameters: {
45494549
query?: never;
45504550
header?: never;
@@ -5009,7 +5009,7 @@ export interface operations {
50095009
[name: string]: unknown;
50105010
};
50115011
content: {
5012-
'application/json': components['schemas']['agentstack_server__api__schema__common__EntityModel____class_getitem____<locals>__ModelOutput'];
5012+
'application/json': components['schemas']['agentstack_server__api__schema__common__EntityModel____class_getitem_____locals___ModelOutput__13'];
50135013
};
50145014
};
50155015
/** @description Validation Error */
@@ -5179,7 +5179,7 @@ export interface operations {
51795179
[name: string]: unknown;
51805180
};
51815181
content: {
5182-
'application/json': components['schemas']['agentstack_server__api__schema__common__EntityModel____class_getitem_____locals___ModelOutput__15'];
5182+
'application/json': components['schemas']['agentstack_server__api__schema__common__EntityModel____class_getitem____<locals>__ModelOutput'];
51835183
};
51845184
};
51855185
/** @description Validation Error */

apps/agentstack-ui/src/app/(auth)/auth.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import NextAuth from 'next-auth';
77

88
import { getProviderConstructor } from '#app/(auth)/providers/providers.ts';
99
import { runtimeConfig } from '#contexts/App/runtime-config.ts';
10+
import type { AuthProvider } from '#modules/auth/types.ts';
1011
import { routes } from '#utils/router.ts';
1112

1213
import type { ProviderConfig, ProviderWithId } from './types';
@@ -50,7 +51,7 @@ if (isAuthEnabled) {
5051
}
5152
}
5253

53-
export const authProviders = providers
54+
export const authProviders: AuthProvider[] = providers
5455
.map((provider) => {
5556
if (typeof provider === 'function') {
5657
const providerData = provider();

apps/agentstack-ui/src/app/(auth)/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
import '#styles/style.scss';
77

8-
import { SigninLayout } from '#components/layouts/SigninLayout.tsx';
8+
import { SignInLayout } from '#components/layouts/SignInLayout.tsx';
99

1010
export default function RootLayout({
1111
children,
1212
}: Readonly<{
1313
children: React.ReactNode;
1414
}>) {
15-
return <SigninLayout>{children}</SigninLayout>;
15+
return <SignInLayout>{children}</SignInLayout>;
1616
}

apps/agentstack-ui/src/app/(auth)/signin/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import { SignInView } from '#modules/auth/SignInView.tsx';
6+
import { SignInView } from '#modules/auth/components/SignInView.tsx';
77

8-
interface PageProps {
9-
searchParams: Promise<Record<string, string | string[] | undefined>>;
8+
interface Props {
9+
searchParams: Promise<{ callbackUrl?: string }>;
1010
}
1111

12-
export default async function SignInPage({ searchParams }: PageProps) {
13-
const callbackUrl = (await searchParams).callbackUrl;
12+
export default async function SignInPage({ searchParams }: Props) {
13+
const { callbackUrl } = await searchParams;
1414

15-
return <SignInView callbackUrl={typeof callbackUrl == 'string' ? callbackUrl : undefined} />;
15+
return <SignInView callbackUrl={callbackUrl} />;
1616
}

apps/agentstack-ui/src/components/SidePanel/SidePanel.module.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,18 @@ $panel-width: rem(432px);
2020
}
2121
}
2222

23+
.closeButton {
24+
&:global(.cds--popover-container) {
25+
position: absolute;
26+
inset-block-start: $spacing-02;
27+
inset-inline-end: calc($spacing-02 - var(--scrollbar-width));
28+
z-index: 1;
29+
}
30+
}
31+
2332
.content {
2433
@include scrollbar();
34+
position: relative;
2535
background-color: $background;
2636
inline-size: $panel-width;
2737
block-size: 100%;

apps/agentstack-ui/src/components/SidePanel/SidePanel.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,42 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
import { Close } from '@carbon/icons-react';
7+
import { IconButton } from '@carbon/react';
68
import clsx from 'clsx';
79
import type { PropsWithChildren } from 'react';
810

11+
import { useApp } from '#contexts/App/index.ts';
912
import { useScrollbar } from '#hooks/useScrollbar.ts';
1013

1114
import classes from './SidePanel.module.scss';
1215

1316
interface Props extends PropsWithChildren {
1417
isOpen?: boolean;
18+
showCloseButton?: boolean;
1519
className?: string;
1620
}
1721

18-
export function SidePanel({ isOpen, className, children }: Props) {
22+
export function SidePanel({ isOpen, showCloseButton, className, children }: Props) {
23+
const { closeSidePanel } = useApp();
1924
const scrollbarProps = useScrollbar();
2025

2126
return (
2227
<aside className={clsx(classes.root, { [classes.isOpen]: isOpen }, className)}>
2328
<div className={classes.content} {...scrollbarProps}>
29+
{showCloseButton && (
30+
<IconButton
31+
kind="ghost"
32+
size="sm"
33+
label="Close"
34+
align="left"
35+
wrapperClasses={classes.closeButton}
36+
onClick={closeSidePanel}
37+
>
38+
<Close />
39+
</IconButton>
40+
)}
41+
2442
{children}
2543
</div>
2644
</aside>

0 commit comments

Comments
 (0)