Skip to content
Closed
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
26 changes: 0 additions & 26 deletions apps/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 38 additions & 36 deletions apps/ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { AnalysisStatusPanel } from './components/AnalysisStatusPanel';
import { DiagnosticLog } from './components/DiagnosticLog';
import { FileUpload } from './components/FileUpload';
import { WaveformPlayer } from './components/WaveformPlayer';
import { Button, Checkbox, DeviceRack, Panel } from './components/ui';
// Audit Finding #5: IdleValuePropPanel now occupies the Signal Monitor area
// when no file is selected. It tells the producer what ASA does and what to
// expect in 30s / 5min.
Expand Down Expand Up @@ -1016,14 +1017,13 @@ export default function App() {
<main className="space-y-5">
<section className="grid grid-cols-1 lg:grid-cols-12 gap-3 md:gap-4">
<div className="lg:col-span-4 flex flex-col gap-4">
<div className="flex flex-col">
<div className="bg-bg-surface-dark border border-border border-b-0 rounded-t-sm px-3 py-1.5 flex items-center">
<span className="w-2 h-2 bg-accent rounded-full mr-2"></span>
<h3 className="text-[10px] font-mono text-text-secondary uppercase tracking-wider">Input Source</h3>
</div>
<DeviceRack
name="Input Source"
status={audioFile ? (isAnalyzing ? 'active' : 'success') : 'idle'}
>
<div
data-testid="input-panel"
className="bg-bg-card border border-border rounded-b-sm p-4 flex flex-col min-h-[220px]"
className="flex flex-col min-h-[220px]"
>
{showInputCollapsed && audioFile ? (
// Audit N9: compact post-analysis summary. Replaces the
Expand Down Expand Up @@ -1054,20 +1054,21 @@ export default function App() {
</p>
</div>
<div className="flex items-center gap-2">
<button
type="button"
<Button
variant="secondary"
size="md"
onClick={handleFileClear}
className="flex-1 text-[10px] font-mono uppercase tracking-wider text-text-secondary border border-border bg-bg-panel hover:border-accent/40 hover:text-text-primary px-2 py-2 rounded-sm transition-colors"
className="flex-1"
>
↺ Analyze new file
</button>
<button
type="button"
</Button>
<Button
variant="secondary"
size="md"
onClick={() => setInputManuallyExpanded(true)}
className="text-[10px] font-mono uppercase tracking-wider text-text-secondary border border-border bg-bg-panel hover:border-accent/40 hover:text-text-primary px-2 py-2 rounded-sm transition-colors"
>
Adjust settings
</button>
</Button>
</div>
</div>
) : (
Expand All @@ -1079,13 +1080,13 @@ export default function App() {
<p className="text-[10px] font-mono uppercase tracking-wider text-text-secondary">
Editing analysis settings
</p>
<button
type="button"
<Button
variant="secondary"
size="sm"
onClick={() => setInputManuallyExpanded(false)}
className="text-[10px] font-mono uppercase tracking-wider text-text-secondary border border-border bg-bg-panel hover:border-accent/40 hover:text-text-primary px-2 py-1 rounded-sm transition-colors"
>
Hide
</button>
</Button>
</div>
)}
<FileUpload
Expand Down Expand Up @@ -1121,20 +1122,21 @@ export default function App() {
</div>
</div>
<label
className={`mt-4 rounded-sm border px-3 py-3 transition-colors cursor-pointer ${
htmlFor="pitch-note-toggle"
className={`mt-4 rounded-sm border px-3 py-3 transition-colors cursor-pointer block ${
pitchNoteTranslationRequested
? 'border-accent bg-accent/10 text-accent'
: 'border-border bg-bg-panel text-text-secondary'
} ${isAnalyzing ? 'opacity-50 cursor-not-allowed' : ''}`}
>
<div className="flex items-start gap-3">
<input
type="checkbox"
<Checkbox
id="pitch-note-toggle"
checked={pitchNoteTranslationRequested}
onChange={(e) => setPitchNoteTranslationRequested(e.target.checked)}
onCheckedChange={(checked) => setPitchNoteTranslationRequested(checked === true)}
disabled={isAnalyzing}
aria-label="PITCH/NOTE TRANSLATION"
className="mt-0.5 h-4 w-4 accent-accent"
className="mt-0.5"
/>
<div className="space-y-1">
<p className="text-[10px] font-mono uppercase tracking-wider">STEM PITCH/NOTE TRANSLATION</p>
Expand All @@ -1146,20 +1148,21 @@ export default function App() {
</div>
</label>
<label
className={`mt-3 rounded-sm border px-3 py-3 transition-colors cursor-pointer ${
htmlFor="interpretation-toggle"
className={`mt-3 rounded-sm border px-3 py-3 transition-colors cursor-pointer block ${
interpretationRequested && phase2ConfigEnabled
? 'border-accent bg-accent/10 text-accent'
: 'border-border bg-bg-panel text-text-secondary'
} ${isAnalyzing || !phase2ConfigEnabled ? 'opacity-50 cursor-not-allowed' : ''}`}
>
<div className="flex items-start gap-3">
<input
type="checkbox"
<Checkbox
id="interpretation-toggle"
checked={interpretationRequested}
onChange={(e) => handleInterpretationRequestedChange(e.target.checked)}
onCheckedChange={(checked) => handleInterpretationRequestedChange(checked === true)}
disabled={isAnalyzing || !phase2ConfigEnabled}
aria-label="AI INTERPRETATION"
className="mt-0.5 h-4 w-4 accent-accent"
className="mt-0.5"
/>
<div className="space-y-1">
<div className="flex flex-wrap items-center gap-2">
Expand Down Expand Up @@ -1238,25 +1241,24 @@ export default function App() {
transition={{ duration: 0.3, ease: 'easeOut', delay: 0.1 }}
className="mt-4 flex justify-end"
>
<motion.button
<Button
variant="primary"
size="lg"
ledIndicator
leadingIcon={<Play className="w-3 h-3 fill-current" />}
onClick={handleStartAnalysis}
disabled={isAnalyzeDisabled}
whileHover={isAnalyzeDisabled ? {} : { scale: 1.02 }}
whileTap={isAnalyzeDisabled ? {} : { scale: 0.98 }}
className="group relative bg-bg-panel border border-accent/60 hover:bg-accent hover:border-accent text-accent hover:text-bg-app shadow-[0_0_10px_rgba(255,136,0,0.15)] hover:shadow-[0_0_18px_rgba(255,136,0,0.4)] disabled:opacity-40 disabled:shadow-none disabled:border-border disabled:text-text-secondary disabled:cursor-not-allowed font-bold py-2.5 px-7 rounded-sm flex items-center transition-all duration-200 uppercase tracking-wider font-mono text-xs"
title={estimateWrongService ? 'Point the UI at the Sonic Analyzer backend to enable analysis.' : undefined}
>
<span className="w-1.5 h-1.5 rounded-full bg-accent group-hover:bg-bg-app/50 group-disabled:bg-border mr-3 animate-pulse" />
<Play className="w-3 h-3 mr-2 fill-current" />
Run Analysis
</motion.button>
</Button>
</motion.div>
</>
)}
</>
)}
</div>
</div>
</DeviceRack>
</div>

<div className="lg:col-span-8 flex flex-col">
Expand Down
Loading
Loading