Skip to content
Merged
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
191 changes: 0 additions & 191 deletions apps/azure/e2e/full-lifecycle.spec.ts

This file was deleted.

15 changes: 3 additions & 12 deletions apps/azure/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ function AppContent({
// When true, Editor mounts directly into PasteScreen (used by "Add framing" CTA).
// Reset to false once consumed so subsequent navigations don't re-trigger paste.
const [pendingStartPaste, setPendingStartPaste] = useState(false);
const [pendingHandoffTargetId, setPendingHandoffTargetId] = useState<string | null>(null);

// Resolve deep link from URL params
const deepLink = useMemo<DeepLinkParams>(() => {
Expand Down Expand Up @@ -248,23 +247,16 @@ function AppContent({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const navigateToEditor = (
projectId?: string,
processHubId?: string,
startPaste?: boolean,
handoffTargetId?: string
) => {
const navigateToEditor = (projectId?: string, processHubId?: string, startPaste?: boolean) => {
setCurrentProject(projectId || null);
setPendingProcessHubId(processHubId || null);
if (startPaste) setPendingStartPaste(true);
setPendingHandoffTargetId(handoffTargetId || null);
setCurrentView('editor');
};

const navigateToDashboard = () => {
setCurrentProject(null);
setPendingStartPaste(false);
setPendingHandoffTargetId(null);
setCurrentView('dashboard');
};

Expand Down Expand Up @@ -300,8 +292,8 @@ function AppContent({
)}
{currentView === 'dashboard' && !deepLinkError && (
<ProjectDashboard
onOpenProject={(id, processHubId, startPaste, handoffTargetId) =>
navigateToEditor(id, processHubId, startPaste, handoffTargetId)
onOpenProject={(id, processHubId, startPaste) =>
navigateToEditor(id, processHubId, startPaste)
}
onLoadSample={handleLoadSample}
/>
Expand All @@ -311,7 +303,6 @@ function AppContent({
projectId={currentProject}
onBack={navigateToDashboard}
initialProcessHubId={currentProject ? undefined : (pendingProcessHubId ?? undefined)}
initialHandoffTargetId={pendingHandoffTargetId ?? undefined}
initialSample={pendingSample}
startPasteOnMount={pendingStartPaste}
onOpenSettings={() => setIsSettingsOpen(true)}
Expand Down
3 changes: 0 additions & 3 deletions apps/azure/src/components/ProcessHubCadenceQueues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ interface ProcessHubCadenceQueuesProps {
onOpenInvestigation: (id: string) => void;
onSetupSustainment: (investigationId: string) => void;
onLogReview: (recordId: string) => void;
onRecordHandoff: (investigationId: string) => void;
}

const DEPTH_SECTIONS: Array<{ depth: InvestigationDepth; label: string }> = [
Expand Down Expand Up @@ -121,7 +120,6 @@ const ProcessHubCadenceQueues: React.FC<ProcessHubCadenceQueuesProps> = ({
onOpenInvestigation,
onSetupSustainment,
onLogReview,
onRecordHandoff,
}) => {
const hasActiveWork = DEPTH_SECTIONS.some(
({ depth }) => cadence.activeWork[depth].totalCount > 0
Expand Down Expand Up @@ -346,7 +344,6 @@ const ProcessHubCadenceQueues: React.FC<ProcessHubCadenceQueuesProps> = ({
onOpenInvestigation={onOpenInvestigation}
onSetupSustainment={onSetupSustainment}
onLogReview={onLogReview}
onRecordHandoff={onRecordHandoff}
/>
</div>
) : hasActiveReviewItems ? null : (
Expand Down
7 changes: 0 additions & 7 deletions apps/azure/src/components/ProcessHubReviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ interface ProcessHubReviewPanelProps {
onStartInvestigation: () => void;
onSetupSustainment: (investigationId: string) => void;
onLogReview: (recordId: string) => void;
onRecordHandoff: (investigationId: string) => void;
onResponsePathAction: (item: ProcessStateItem, action: ResponsePathAction, hubId: string) => void;
/** Notes wiring */
onRequestAddNote: (item: ProcessStateItem, hubId: string) => void;
Expand Down Expand Up @@ -64,7 +63,6 @@ const ProcessHubReviewPanel: React.FC<ProcessHubReviewPanelProps> = ({
onStartInvestigation,
onSetupSustainment,
onLogReview,
onRecordHandoff,
onResponsePathAction,
onRequestAddNote,
onRequestEditNote,
Expand Down Expand Up @@ -133,10 +131,6 @@ const ProcessHubReviewPanel: React.FC<ProcessHubReviewPanelProps> = ({
onOpenInvestigation(targetId);
return;
}
if (surface === 'handoff' && targetId) {
onRecordHandoff(targetId);
return;
}
if (surface === 'improvement-projects' && targetId) {
onOpenInvestigation(targetProject?.metadata.investigationId ?? targetId);
return;
Expand Down Expand Up @@ -299,7 +293,6 @@ const ProcessHubReviewPanel: React.FC<ProcessHubReviewPanelProps> = ({
onOpenInvestigation={onOpenInvestigation}
onSetupSustainment={onSetupSustainment}
onLogReview={onLogReview}
onRecordHandoff={onRecordHandoff}
/>
</section>
);
Expand Down
31 changes: 2 additions & 29 deletions apps/azure/src/components/ProcessHubSustainmentRegion.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { ShieldCheck, ShieldAlert, ArrowRight, History } from 'lucide-react';
import { ShieldCheck, ShieldAlert, History } from 'lucide-react';
import {
selectControlHandoffCandidates,
selectSustainmentBuckets,
type ProcessHubCadenceSummary,
type ProcessHubInvestigation,
Expand All @@ -16,7 +15,6 @@ export interface ProcessHubSustainmentRegionProps {
onOpenInvestigation: (id: string) => void;
onSetupSustainment: (investigationId: string) => void;
onLogReview: (recordId: string) => void;
onRecordHandoff: (investigationId: string) => void;
}

interface BucketSectionProps {
Expand Down Expand Up @@ -80,7 +78,6 @@ const ProcessHubSustainmentRegion: React.FC<ProcessHubSustainmentRegionProps> =
onOpenInvestigation,
onSetupSustainment,
onLogReview,
onRecordHandoff,
}) => {
const renderDate = new Date();

Expand All @@ -91,25 +88,18 @@ const ProcessHubSustainmentRegion: React.FC<ProcessHubSustainmentRegionProps> =
renderDate
);

const handoffCandidates = selectControlHandoffCandidates(
rollup.investigations,
rollup.controlHandoffs
);

const dueAndOverdueIds = new Set([
...buckets.dueNow.map(item => item.investigation.id),
...buckets.overdue.map(item => item.investigation.id),
]);
const reviewedIds = new Set(buckets.recentlyReviewed.map(item => item.investigation.id));
const handoffIds = new Set(handoffCandidates.map(item => item.investigation.id));

const setupCandidates = rollup.investigations.filter(inv => {
const status = inv.metadata?.investigationStatus;
if (status !== 'resolved' && status !== 'controlled') return false;
if (inv.metadata?.sustainment) return false;
if (dueAndOverdueIds.has(inv.id)) return false;
if (reviewedIds.has(inv.id)) return false;
if (handoffIds.has(inv.id)) return false;
return true;
});

Expand All @@ -134,10 +124,7 @@ const ProcessHubSustainmentRegion: React.FC<ProcessHubSustainmentRegionProps> =
};

const totalSustainmentItems =
buckets.dueNow.length +
buckets.overdue.length +
buckets.recentlyReviewed.length +
handoffCandidates.length;
buckets.dueNow.length + buckets.overdue.length + buckets.recentlyReviewed.length;

return (
<section className="space-y-3" data-testid="sustainment-region" aria-label="Sustainment region">
Expand Down Expand Up @@ -183,20 +170,6 @@ const ProcessHubSustainmentRegion: React.FC<ProcessHubSustainmentRegionProps> =
/>
)}

{handoffCandidates.length > 0 && (
<BucketSection
label="Control handoff"
count={handoffCandidates.length}
icon={<ArrowRight size={14} className="text-content-secondary" />}
items={handoffCandidates}
onItemClick={item => onRecordHandoff(item.investigation.id)}
itemAriaLabel={item => `Record control handoff for ${item.investigation.name}`}
iconForItem={<ArrowRight size={14} className="text-content-secondary" />}
renderSubline={() => 'Needs control handoff'}
testId="sustainment-handoff"
/>
)}

{setupCandidates.length > 0 ? (
<div data-testid="sustainment-setup">
<div className="mb-1 flex items-center justify-between gap-2">
Expand Down
1 change: 0 additions & 1 deletion apps/azure/src/components/ProcessHubView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export interface ProcessHubViewProps {
onStartInvestigation: () => void;
onSetupSustainment: (investigationId: string) => void;
onLogReview: (recordId: string) => void;
onRecordHandoff: (investigationId: string) => void;
onResponsePathAction: (item: ProcessStateItem, action: ResponsePathAction, hubId: string) => void;
onRequestAddNote: (item: ProcessStateItem, hubId: string) => void;
onRequestEditNote: (item: ProcessStateItem, note: ProcessStateNote, hubId: string) => void;
Expand Down
Loading