fix(dashboard): make the clip-generation view legible on a phone
The "generating" screen was the one the user singled out, and the scan box was the reason. Interface only; no pipeline, request or data changes. The visible defect: two HUD pills were pinned to opposite corners of the preview, ~150px and ~170px wide. Any box narrower than their combined width made them overlap and interleave their letters — "SCANNING CO|VIRAL_DETECTION: ACTIVE". That is every phone, and the md tablet width too, where this panel is only 55% of the viewport. They are now one flex row with justify-between and a truncating left pill, so they degrade instead of colliding, and the right-hand pill (which says nothing the left one doesn't) waits for lg. The rest of the box was desktop flourish that turns to noise at phone scale, so below sm it drops the blueprint grid, the dashed thirds guides, the ping ring and the scissors, and the bottom telemetry bar — which was spending a third of a 175px box on two lines that are always true. The box itself goes 2:1 instead of 16:9 (object-cover crops rather than shrinks, so no picture is lost) and loses 16px of the margin under it. Removing the invented telemetry leaves a phone with nothing to read, since the log terminal starts collapsed there, so the panel now shows the real log tail under the preview: "Transcribing with faster-whisper", "Asking Gemini to pick the viral moments". Between that and the tighter box, "Generated Shorts" is now on the first screen instead of a full scroll down, and its empty state gets a min-height and a line saying clips appear one by one. Verified at 360/390/640/768/1024/1440: no pill overlap and no horizontal scroll at any width; the full HUD is intact from lg up.
This commit is contained in:
parent
3709d64085
commit
b9f232366a
2 changed files with 42 additions and 24 deletions
|
|
@ -1657,6 +1657,19 @@ function App() {
|
|||
/>
|
||||
)}
|
||||
|
||||
{/* Phones only. The scan box drops its invented telemetry at
|
||||
this size and the log terminal below starts collapsed, so
|
||||
without this the screen would say nothing about what the job
|
||||
is actually doing. The log tail is the real answer. */}
|
||||
{status === 'processing' && (
|
||||
<div className="sm:hidden mb-3 flex items-start gap-2 text-xs text-ink2 min-w-0">
|
||||
<Loader2 size={14} className="animate-spin text-brass shrink-0 mt-px" />
|
||||
<span className="min-w-0 leading-snug break-words">
|
||||
{logs.length ? logs[logs.length - 1] : 'starting up…'}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* The render is dead time: the user is watching a progress bar
|
||||
with nothing to do, so this is where the one star ask goes. */}
|
||||
{status === 'processing' && (
|
||||
|
|
@ -1842,12 +1855,15 @@ function App() {
|
|||
</div>
|
||||
) : (
|
||||
status === 'processing' ? (
|
||||
<div className="h-full flex flex-col items-center justify-center text-muted space-y-4">
|
||||
<Loader2 size={32} className="animate-spin text-brass" />
|
||||
<div className="h-full min-h-[140px] flex flex-col items-center justify-center text-muted space-y-3 text-center px-4">
|
||||
<Loader2 size={28} className="animate-spin text-brass" />
|
||||
<p className="text-sm lowercase">Waiting for clips...</p>
|
||||
<p className="text-xs text-muted/80 max-w-[26ch] leading-snug">
|
||||
They appear here one by one as each finishes rendering.
|
||||
</p>
|
||||
</div>
|
||||
) : status === 'error' ? (
|
||||
<div className="h-full flex flex-col items-center justify-center text-danger space-y-2">
|
||||
<div className="h-full min-h-[120px] flex flex-col items-center justify-center text-danger space-y-2">
|
||||
<p>Generation failed.</p>
|
||||
</div>
|
||||
) : null
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const ProcessingAnimation = ({ media, isComplete, syncedTime, isSyncedPlaying, s
|
|||
return (match && match[2].length === 11) ? match[2] : null;
|
||||
};
|
||||
|
||||
const containerClasses = `relative w-full aspect-video rounded-card overflow-hidden bg-black border border-rule2 mb-8 group animate-fade transition-all duration-500
|
||||
const containerClasses = `relative w-full aspect-[2/1] sm:aspect-video rounded-card overflow-hidden bg-black border border-rule2 mb-4 sm:mb-8 group animate-fade transition-all duration-500
|
||||
${isComplete && !isSyncedPlaying ? 'grayscale brightness-50' : ''}
|
||||
${isSyncedPlaying ? 'ring-2 ring-brass ring-offset-2 ring-offset-black' : ''}`;
|
||||
|
||||
|
|
@ -115,36 +115,38 @@ const ProcessingAnimation = ({ media, isComplete, syncedTime, isSyncedPlaying, s
|
|||
{/* Overlays - Hide when synced playing so user sees clean video */}
|
||||
{!isSyncedPlaying && !isComplete && (
|
||||
<>
|
||||
<div className="absolute inset-0 bg-[linear-gradient(var(--rule-blueprint)_1px,transparent_1px),linear-gradient(90deg,var(--rule-blueprint)_1px,transparent_1px)] bg-[size:40px_40px] z-10 pointer-events-none"></div>
|
||||
<div className="hidden sm:block absolute inset-0 bg-[linear-gradient(var(--rule-blueprint)_1px,transparent_1px),linear-gradient(90deg,var(--rule-blueprint)_1px,transparent_1px)] bg-[size:40px_40px] z-10 pointer-events-none"></div>
|
||||
<div className="absolute left-0 w-full h-[2px] bg-brass shadow-[0_0_15px_2px_var(--color-glow)] animate-[scan_2.5s_linear_infinite] z-20 pointer-events-none"></div>
|
||||
<div className="absolute left-0 w-full h-[15%] bg-[var(--color-paper-emit)] animate-[scan-overlay_2.5s_linear_infinite] z-10 pointer-events-none"></div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* HUD Elements - Hide when synced playing */}
|
||||
{/* Top HUD bar. One flex row, not two pills pinned to opposite corners:
|
||||
pinned, they overlapped and interleaved their letters as soon as the
|
||||
box was narrower than their combined ~330px — every phone, and the
|
||||
md tablet width too, where this panel is only 55% of the viewport.
|
||||
justify-between + a truncating left pill degrades instead. */}
|
||||
{!isSyncedPlaying && (
|
||||
<div className={`absolute top-4 left-4 z-30 flex items-center gap-2 px-3 py-1.5 rounded-full bg-black/70 readout transition-colors duration-500 ${isComplete ? 'text-ok' : 'text-brass animate-pulse'}`}>
|
||||
{isComplete ? (
|
||||
<>
|
||||
<CheckCircle size={14} /> Analysis Complete
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Scan size={14} /> Scanning Content...
|
||||
</>
|
||||
<div className="absolute top-2.5 left-2.5 right-2.5 sm:top-4 sm:left-4 sm:right-4 z-30 flex items-start justify-between gap-2 pointer-events-none">
|
||||
<div className={`flex items-center gap-2 px-3 py-1.5 rounded-full bg-black/70 readout min-w-0 transition-colors duration-500 ${isComplete ? 'text-ok' : 'text-brass animate-pulse'}`}>
|
||||
{isComplete
|
||||
? <CheckCircle size={14} className="shrink-0" />
|
||||
: <Scan size={14} className="shrink-0" />}
|
||||
<span className="truncate">{isComplete ? 'Analysis Complete' : 'Scanning Content...'}</span>
|
||||
</div>
|
||||
{/* Carries nothing the left pill doesn't; it is the first thing to
|
||||
go when there is no room. */}
|
||||
{!isComplete && (
|
||||
<div className="hidden lg:flex items-center gap-2 px-3 py-1.5 bg-black/70 rounded-full readout shrink-0">
|
||||
VIRAL_DETECTION: ACTIVE
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!isSyncedPlaying && !isComplete && (
|
||||
<div className="absolute top-4 right-4 z-30 flex items-center gap-2 px-3 py-1.5 bg-black/70 rounded-full readout">
|
||||
VIRAL_DETECTION: ACTIVE
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Visual Flair */}
|
||||
{!isSyncedPlaying && !isComplete && (
|
||||
<div className="absolute inset-0 pointer-events-none z-20 overflow-hidden">
|
||||
<div className="hidden sm:block absolute inset-0 pointer-events-none z-20 overflow-hidden">
|
||||
<div className="absolute top-0 bottom-0 left-[35%] w-px border-r border-dashed border-brass opacity-40"></div>
|
||||
<div className="absolute top-0 bottom-0 right-[35%] w-px border-l border-dashed border-brass opacity-40"></div>
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-12 h-12 border border-rule2 rounded-full flex items-center justify-center">
|
||||
|
|
@ -158,14 +160,14 @@ const ProcessingAnimation = ({ media, isComplete, syncedTime, isSyncedPlaying, s
|
|||
|
||||
{/* Synced Playing Indicator */}
|
||||
{isSyncedPlaying && (
|
||||
<div className="absolute top-4 right-4 z-30 badge-brass bg-black/70 animate-pulse">
|
||||
<div className="absolute top-2.5 right-2.5 sm:top-4 sm:right-4 z-30 badge-brass bg-black/70 animate-pulse">
|
||||
<Activity size={12} /> Live Sync
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Bottom Info Bar */}
|
||||
{!isSyncedPlaying && !isComplete && (
|
||||
<div className="absolute bottom-0 left-0 right-0 p-4 bg-black/70 z-30 flex justify-between items-end border-t border-rule">
|
||||
<div className="hidden sm:flex absolute bottom-0 left-0 right-0 p-4 bg-black/70 z-30 justify-between items-end border-t border-rule">
|
||||
<div className="readout text-brass space-y-1">
|
||||
<div className="flex items-center gap-2"><Activity size={10} className="animate-pulse" /> {'>'} ANALYSIS_THREAD_01: ACTIVE</div>
|
||||
<div className="flex items-center gap-2"><Radio size={10} /> {'>'} AUDIO_TRANSCRIPT: PROCESSING</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue