chore: Allow chat page to be scrollable, dont show waiting tasks in init sandbox (#283)

This commit is contained in:
Brace Sproul 2025-06-20 12:57:23 -07:00 • committed by GitHub
parent f9841ebdb2
commit 91d5b0b087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 7 deletions

View file

@ -17,7 +17,7 @@ export default function ChatPage() {
const displayThreads: ThreadDisplayInfo[] = threads.map(threadToDisplayInfo);
return (
<div className="bg-background h-screen overflow-y-hidden">
<div className="bg-background h-screen">
<Suspense>
<Toaster />
<GitHubAppProvider>

View file

@ -1,11 +1,10 @@
"use client";
import {
Loader2,
CheckCircle,
XCircle,
GitBranch,
MessageSquare,
FileText,
ChevronDown,
} from "lucide-react";
import { useState, useEffect, useRef } from "react";

View file

@ -82,7 +82,7 @@ export function DefaultView({ threads, threadsLoading }: DefaultViewProps) {
</div>
{/* Main Content */}
<div className="flex-1 overflow-auto">
<div className="flex-1 overflow-y-auto">
<div className="mx-auto max-w-4xl space-y-6 p-4">
{/* Terminal Chat Input */}
<Card

View file

@ -48,14 +48,14 @@ export type Step = {
* Maps custom events to step objects for UI rendering. Skipped steps are filtered out.
*/
export function mapCustomEventsToSteps(events: CustomNodeEvent[]) {
return INIT_STEPS.map((stepName) => {
return INIT_STEPS.flatMap((stepName) => {
const event = [...events]
.filter((e) => e.action === stepName)
.sort(
(a, b) =>
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
)[0];
if (!event) return { name: stepName, status: "waiting" as const };
if (!event) return [];
if (event.data.status === "skipped")
return { name: stepName, status: "skipped" as const };
if (event.data.status === "pending")
@ -69,6 +69,6 @@ export function mapCustomEventsToSteps(events: CustomNodeEvent[]) {
error:
typeof event.data.error === "string" ? event.data.error : undefined,
};
return { name: stepName, status: "waiting" as const };
return [];
}).filter((step) => step.status !== "skipped");
}