Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/frontend/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const Workspace: React.FC = () => {
<View />
) : (
<ErrorBoundary key={activeView}>
<Suspense fallback={<LoadingScreen />}>
<Suspense fallback={<LoadingScreen embedded />}>
<View />
</Suspense>
</ErrorBoundary>
Expand Down
8 changes: 6 additions & 2 deletions apps/web/src/frontend/app/shell/LoadingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import { Wordmark } from '@/shared/components/Brand';
* synchronously before awaiting resolveApiBase(), so there's
* never a blank frame while the server starts or the API base resolves.
*/
export const LoadingScreen: React.FC = () => (
<div className="h-screen flex items-center justify-center bg-slate-950 relative overflow-hidden">
export const LoadingScreen: React.FC<{ embedded?: boolean }> = ({ embedded = false }) => (
<div
className={`${
embedded ? 'w-full flex-1 min-h-full' : 'h-screen w-full'
} flex items-center justify-center bg-slate-950 relative overflow-hidden`}
>
<div
className="absolute inset-0"
style={{
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/frontend/app/shell/ProfileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function ProfileMenu(): React.ReactElement | null {
: null;

return (
<div ref={ref} className="relative z-[200]">
<div ref={ref} className="relative">
<button
ref={buttonRef}
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ describe('DbaHealthScorecardModal', () => {

expect(screen.getByTestId('dba-scorecard-score-ring').textContent).toContain('100');
expect(screen.getByText(/Skipped: 5/)).toBeTruthy();
// Non-expandable checks (no details/recommendation) render as static <div>, not <button>.
expect(screen.getByTestId('dba-scorecard-check-connection-pool').tagName).toBe('DIV');
});

it('resets running state on close so reopening leaves Run Health Audit enabled', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,52 +675,66 @@ export const DbaHealthScorecardModal: React.FC<Props> = ({
const expanded = expandedChecks.has(check.id);
const hasMore = check.details.length > 0 || Boolean(check.recommendation);
const meta = SEVERITY_BADGE[check.severity];
return (
<div
key={check.id}
className="rounded-lg border border-slate-800 bg-slate-950/50 overflow-hidden"
>
<button
type="button"
data-testid={`dba-scorecard-check-${check.id}`}
aria-expanded={hasMore ? expanded : undefined}
onClick={() => hasMore && toggleCheck(check.id)}
className="flex w-full items-start justify-between gap-3 px-4 py-3 text-left hover:bg-slate-900/60 transition"
>
<div className="flex items-start gap-2.5 min-w-0">
<span className="mt-0.5 text-slate-400">
{hasMore ? (
expanded ? (
<ChevronDown className="h-4 w-4" />
) : (
<ChevronRight className="h-4 w-4" />
)
const rowContent = (
<>
<div className="flex items-start gap-2.5 min-w-0">
<span className="mt-0.5 text-slate-400">
{hasMore ? (
expanded ? (
<ChevronDown className="h-4 w-4" />
) : (
<span className="inline-block h-4 w-4" />
)}
</span>
<div className="min-w-0">
<div className="flex flex-wrap items-center gap-2">
<span className="text-[13px] font-bold text-slate-100">
{check.title}
<ChevronRight className="h-4 w-4" />
)
) : (
<span className="inline-block h-4 w-4" />
)}
</span>
<div className="min-w-0">
<div className="flex flex-wrap items-center gap-2">
<span className="text-[13px] font-bold text-slate-100">
{check.title}
</span>
{check.deduction > 0 && (
<span className="text-[11px] font-bold text-rose-300 tabular-nums">
-{check.deduction} pts
</span>
{check.deduction > 0 && (
<span className="text-[11px] font-bold text-rose-300 tabular-nums">
-{check.deduction} pts
</span>
)}
</div>
<p className="mt-0.5 text-[12px] text-slate-300">{check.summary}</p>
)}
</div>
<p className="mt-0.5 text-[12px] text-slate-300">{check.summary}</p>
</div>
</div>

<span
className={`inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-semibold ${meta.cls}`}
<span
className={`inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-semibold ${meta.cls}`}
>
{meta.icon}
{meta.label}
</span>
</>
);
return (
<div
key={check.id}
className="rounded-lg border border-slate-800 bg-slate-950/50 overflow-hidden"
>
{hasMore ? (
<button
type="button"
data-testid={`dba-scorecard-check-${check.id}`}
aria-expanded={expanded}
onClick={() => toggleCheck(check.id)}
className="flex w-full cursor-pointer items-start justify-between gap-3 px-4 py-3 text-left hover:bg-slate-900/60 transition"
>
{meta.icon}
{meta.label}
</span>
</button>
{rowContent}
</button>
) : (
<div
data-testid={`dba-scorecard-check-${check.id}`}
className="flex w-full items-start justify-between gap-3 px-4 py-3 text-left"
>
{rowContent}
</div>
)}

{expanded && hasMore && (
<div className="border-t border-slate-800 bg-slate-900/50 px-4 py-3 pl-10 space-y-2 text-[12px]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
X,
} from 'lucide-react';
import { useEffect, useRef, useState, type FormEvent } from 'react';
import { createPortal } from 'react-dom';
import { linkedConnectionId } from '@foxschema/shared';
import type { CredentialKind, CredentialSource } from '@foxschema/workflow-engine/definitions';
import { useAuthStore } from '@/platform/authStore';
Expand Down Expand Up @@ -755,11 +756,12 @@ export function CredentialsPanel({
)}
</section>

{confirmTarget && (
<div
className="fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4 backdrop-blur-xs"
onClick={() => setConfirmTarget(null)}
>
{confirmTarget &&
createPortal(
<div
className="fixed inset-0 z-[100] flex items-center justify-center bg-black/70 p-4 backdrop-blur-xs"
onClick={() => setConfirmTarget(null)}
>
<div
role="dialog"
aria-modal="true"
Expand Down Expand Up @@ -801,7 +803,8 @@ export function CredentialsPanel({
</button>
</div>
</div>
</div>
</div>,
document.body,
)}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* indicator, concurrency limits, overlap policy, and run event sinks.
*/
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import {
AlertTriangle,
CheckCircle2,
Expand Down Expand Up @@ -502,11 +503,12 @@ export function EnginePanel(): React.ReactElement {
</div>
</section>

{pendingState && (
<div
className="fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4 backdrop-blur-xs"
onClick={() => setPendingState(null)}
>
{pendingState &&
createPortal(
<div
className="fixed inset-0 z-[100] flex items-center justify-center bg-black/70 p-4 backdrop-blur-xs"
onClick={() => setPendingState(null)}
>
<div
role="dialog"
aria-modal="true"
Expand Down Expand Up @@ -560,7 +562,8 @@ export function EnginePanel(): React.ReactElement {
</button>
</div>
</div>
</div>
</div>,
document.body,
)}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function ExecutionPanel({
<strong>INPUT ({pipeLabel(focused)})</strong>
<span>
{focusedInSamples[0]
? `${focusedInSamples[0].recordCount} record(s)`
? `${focusedInSamples[0].recordCount} ${focusedInSamples[0].recordCount === 1 ? 'record' : 'records'}`
: focused.data.role === 'trigger' || focused.data.type.startsWith('source.trigger')
? 'Trigger root'
: '0 records'}
Expand All @@ -224,7 +224,7 @@ export function ExecutionPanel({
<strong>OUTPUT ({pipeLabel(focused)})</strong>
<span>
{focusedOutSamples[0]
? `${focusedOutSamples[0].recordCount} record(s)`
? `${focusedOutSamples[0].recordCount} ${focusedOutSamples[0].recordCount === 1 ? 'record' : 'records'}`
: '0 records'}
</span>
</div>
Expand All @@ -243,7 +243,8 @@ export function ExecutionPanel({
</div>
<div className="execution-log-line">
<span>
{nodes.length} pipes · {edges.length} connections
{nodes.length} {nodes.length === 1 ? 'pipe' : 'pipes'} · {edges.length}{' '}
{edges.length === 1 ? 'connection' : 'connections'}
</span>
</div>
<div className="execution-log-line success">
Expand Down Expand Up @@ -317,7 +318,7 @@ export function ExecutionPanel({
<span>
{idle
? 'Local worker'
: `${totals.records} records · ${totals.batches} batches`}
: `${totals.records} ${totals.records === 1 ? 'record' : 'records'} · ${totals.batches} ${totals.batches === 1 ? 'batch' : 'batches'}`}
</span>
</div>
<div className="execution-metric">
Expand Down
14 changes: 10 additions & 4 deletions apps/web/src/frontend/features/workflow/components/RunsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,15 @@ export function RunsPanel({
</Select>
</label>
<span className="runs-count">
{sortedRuns.length === runs.length ? `${runs.length} runs` : `${sortedRuns.length} of ${runs.length} runs`}
{sortedRuns.length === runs.length
? `${runs.length} ${runs.length === 1 ? 'run' : 'runs'}`
: `${sortedRuns.length} of ${runs.length} ${runs.length === 1 ? 'run' : 'runs'}`}
</span>
</div>
{runs.length === 0 ? (
<div className="empty">No runs yet — open a workflow in the designer and press Test run.</div>
) : (
<div className="runs-layout">
<div className={selectedId ? 'runs-layout has-detail' : 'runs-layout'}>
<div className="runs-table-wrap">
<table>
<thead>
Expand Down Expand Up @@ -414,8 +416,12 @@ export function RunsPanel({
{detail.pipes.map((pipe) => (
<li key={pipe.id} className={`timeline-${pipe.status}`}>
pipe/{pipe.pipelineId}/{pipe.pipeId}: {pipe.status}
{pipe.processedBatches ? ` · ${pipe.processedBatches} batches` : ''}
{pipe.processedRecords ? ` · ${pipe.processedRecords} rows` : ''}
{pipe.processedBatches
? ` · ${pipe.processedBatches} ${pipe.processedBatches === 1 ? 'batch' : 'batches'}`
: ''}
{pipe.processedRecords
? ` · ${pipe.processedRecords} ${pipe.processedRecords === 1 ? 'row' : 'rows'}`
: ''}
{pipe.error ? ` (${pipe.error})` : ''}
</li>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export function TriggerConfigurationDialog({
))}
</aside>

<main className="trigger-config-content">
<div className="trigger-config-content">
{!trigger ? (
<div className="trigger-empty">No trigger selected.</div>
) : (
Expand Down Expand Up @@ -717,7 +717,7 @@ export function TriggerConfigurationDialog({
</details>
</>
)}
</main>
</div>
</div>
</section>
</div>
Expand Down
Loading
Loading