From 296bc6a9c361417f7da6079dbcd397671ac28680 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 25 Aug 2026 23:19:58 +0000 Subject: [PATCH] Hi, Jules here! I have successfully refactored the `SessionsPage` by decomposing it into pure JSX subcomponents. Here is a summary of what I accomplished: - Created the `ui/components/sessions/` directory. - Extracted `EventCockpitDeck.tsx`, `DirectPassDrawer.tsx`, `WorkshopDrawer.tsx`, and `ScopeModal.tsx` from `ui/components/SessionsPage.tsx`. - Refactored `SessionsPage.tsx` to import and assemble these subcomponents cleanly. - Preserved zero React dependencies, keeping it pure Hono SSR JSX. - Preserved all inline client-side JavaScript, DOM IDs, and form submission handlers. - Formatted and linted all code via `deno fmt` and `deno task lint`. - Verified that all tests are passing. Let me know if you need any further adjustments! Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com> --- ui/components/SessionsPage.tsx | 811 +------------------- ui/components/sessions/DirectPassDrawer.tsx | 323 ++++++++ ui/components/sessions/EventCockpitDeck.tsx | 112 +++ ui/components/sessions/ScopeModal.tsx | 86 +++ ui/components/sessions/WorkshopDrawer.tsx | 302 ++++++++ 5 files changed, 831 insertions(+), 803 deletions(-) create mode 100644 ui/components/sessions/DirectPassDrawer.tsx create mode 100644 ui/components/sessions/EventCockpitDeck.tsx create mode 100644 ui/components/sessions/ScopeModal.tsx create mode 100644 ui/components/sessions/WorkshopDrawer.tsx diff --git a/ui/components/SessionsPage.tsx b/ui/components/SessionsPage.tsx index a4aaddb..64a2cf3 100644 --- a/ui/components/SessionsPage.tsx +++ b/ui/components/SessionsPage.tsx @@ -1,4 +1,8 @@ import { AuthenticatedLayout } from "./AuthenticatedLayout.tsx"; +import { EventCockpitDeck } from "./sessions/EventCockpitDeck.tsx"; +import { DirectPassDrawer } from "./sessions/DirectPassDrawer.tsx"; +import { WorkshopDrawer } from "./sessions/WorkshopDrawer.tsx"; +import { ScopeModal } from "./sessions/ScopeModal.tsx"; export const SessionsPage = ({ sessions, @@ -24,114 +28,7 @@ export const SessionsPage = ({ style="display: none; margin-bottom: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); font-size: 0.9rem;" /> - {eventPasses && eventPasses.length > 0 && ( -
-

- Event Cockpit Deck (Live Workshops) -

-
- {eventPasses.map((event) => ( -
-
-
-

- {event.name} -

-
- Expires: {new Date(event.expires_at).toLocaleString()} -
-
- Active -
- - {/* Progress Bar for Seats */} -
-
- Seats Claimed - - {event.seats_claimed} /{" "} - {event.max_seats === 0 ? "∞" : event.max_seats} - -
-
-
0 - ? Math.min( - (event.seats_claimed / event.max_seats) * 100, - 100, - ) - : 100 - }%;`} - > -
-
-
- - {/* Quick Copy Snippets */} -
-
- - PIN: - - - {event.pin_code} - - -
-
- - Link: - - - /e/{event.slug} - - -
-
- - {/* Cockpit Actions */} -
- - -
-
- ))} -
-
- )} +
@@ -199,703 +96,11 @@ export const SessionsPage = ({
-
-

- Mint an isolated, scoped child session for 1-click magic links, CLI - tools, team members, or AI assistants without exposing your primary - passkeys. -

- -
- {/* Label Input */} -
- - -
- - {/* Direct 1-Click Destination (App Selection) */} -
- - -

- Selecting an app scopes the pass and automatically redirects the - recipient to that app upon 1-click redemption. -

-
- - {/* Lifespan Presets */} -
- -
- - - - -
- -
- - {/* Access Mode Presets */} -
- -
- - - {isAdmin && ( - - )} - -
- -
- - {/* Progressive Disclosure: Specific App & Capability Scopes */} -
- - ▸ Customize Specific App Grants & Capabilities (Optional) - -
-

- Select which subsidiary microservices and IAM capabilities - this delegated token is permitted to access: -

- -
- - - - {apps.map((app) => ( - - ))} -
-
-
- -
- - -
-
- - {/* Hand-Off Card (Revealed upon generation) */} - -
- - + + - {/* Edit Scopes Modal */} - + {/* Desktop Table View (≥ 768px) */}