From f1bf37349d4136efc7c64ac95af41a897e205d9c Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 2 Mar 2026 20:19:15 -0500 Subject: [PATCH] Extract AuthLayout component and polish auth UI Shared layout for setup, login, and callback pages with consistent styling. Add GitHub mark icon to action buttons. Document dev server commands in CLAUDE.md. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 5 +++ apps/arc-web/app/components/auth-layout.tsx | 38 ++++++++++++++++ apps/arc-web/app/routes/auth-login.tsx | 42 ++++++++++------- apps/arc-web/app/routes/setup.tsx | 50 ++++++++++++--------- 4 files changed, 99 insertions(+), 36 deletions(-) create mode 100644 apps/arc-web/app/components/auth-layout.tsx diff --git a/CLAUDE.md b/CLAUDE.md index 0da39a8a8..f5af33cb6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,5 +1,10 @@ # Arc +## Dev servers + +1. `arc serve --demo` — starts the Rust API server in demo mode +2. `cd apps/arc-web && bun run dev` — starts the React dev server + ## API workflow The OpenAPI spec at `openapi/arc-api.yaml` is the source of truth for the arc-api HTTP interface. diff --git a/apps/arc-web/app/components/auth-layout.tsx b/apps/arc-web/app/components/auth-layout.tsx new file mode 100644 index 000000000..9cb3cc160 --- /dev/null +++ b/apps/arc-web/app/components/auth-layout.tsx @@ -0,0 +1,38 @@ +import type { ReactNode } from "react"; + +function ArcLogo({ className }: { className?: string }) { + return ( + Arc + ); +} + +export function AuthLayout({ + children, + footer, +}: { + children: ReactNode; + footer?: ReactNode; +}) { + return ( +
+
+
+ +
+
+ {children} +
+ {footer && ( +
+ {footer} +
+ )} +
+
+ ); +} diff --git a/apps/arc-web/app/routes/auth-login.tsx b/apps/arc-web/app/routes/auth-login.tsx index ffc57a0bc..9ab33715a 100644 --- a/apps/arc-web/app/routes/auth-login.tsx +++ b/apps/arc-web/app/routes/auth-login.tsx @@ -1,4 +1,5 @@ import { redirect } from "react-router"; +import { AuthLayout } from "../components/auth-layout"; import { getGitHubOAuth, generateState } from "../lib/github.server"; import type { Route } from "./+types/auth-login"; @@ -16,21 +17,30 @@ export function action({ request }: Route.ActionArgs) { export default function AuthLogin() { return ( -
-
-

Sign in to Arc

-

- Authenticate with your GitHub account to continue. -

-
- -
-
-
+ +

+ Sign in to Arc +

+

+ Authenticate with your GitHub account to continue. +

+
+ +
+
+ ); +} + +function GitHubMark() { + return ( + + + ); } diff --git a/apps/arc-web/app/routes/setup.tsx b/apps/arc-web/app/routes/setup.tsx index 1433a599b..8a16d1766 100644 --- a/apps/arc-web/app/routes/setup.tsx +++ b/apps/arc-web/app/routes/setup.tsx @@ -1,4 +1,5 @@ import { redirect } from "react-router"; +import { AuthLayout } from "../components/auth-layout"; import { isGitHubAppConfigured } from "../lib/github.server"; import type { Route } from "./+types/setup"; @@ -35,26 +36,35 @@ export default function Setup({ loaderData }: Route.ComponentProps) { const { manifest } = loaderData; return ( -
-
-

Set up Arc

-

- Register a GitHub App to enable OAuth login and repository access. -

-
+

+ Set up Arc +

+

+ Register a GitHub App to enable OAuth login and repository access. +

+ + + -
-
-
+ + Register GitHub App + + + + ); +} + +function GitHubMark() { + return ( + + + ); }