-
Notifications
You must be signed in to change notification settings - Fork 177
Fix blank screen on empty analysis and >60m timestamp bug #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1909,6 +1909,42 @@ export default function AnalyzePage() { | |
| </section> | ||
| )} | ||
|
|
||
| {videoId && topics.length === 0 && pageState === 'IDLE' && !error && ( | ||
| <section className="flex min-h-[calc(100vh-11rem)] flex-col items-center justify-center px-5 text-center"> | ||
| <Card className="w-full max-w-2xl border border-slate-200 bg-white/90 p-9 backdrop-blur-sm"> | ||
| <div className="space-y-4"> | ||
| <div> | ||
| <h2 className="text-xl font-semibold text-slate-900"> | ||
| No highlights found | ||
| </h2> | ||
| <p className="mt-1.5 text-sm leading-relaxed text-slate-600"> | ||
| We processed the transcript but couldn't find any standout highlights matching your criteria. This sometimes happens if the video is very short, has no dialogue, or if the AI filters were too strict. | ||
| </p> | ||
| </div> | ||
| <div className="flex flex-wrap items-center justify-center gap-3 pt-2"> | ||
| <Link | ||
| href="/" | ||
| className="inline-flex items-center justify-center rounded-full border border-slate-200 px-4 py-2 text-xs font-medium text-slate-700 transition hover:bg-[#f8fafc]" | ||
| > | ||
| Go to home | ||
| </Link> | ||
| <button | ||
| type="button" | ||
| onClick={() => { | ||
| // Force regenerate logic | ||
| processVideo(normalizedUrl, mode); | ||
|
Comment on lines
+1931
to
+1935
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The empty-state “Try again” button just calls Useful? React with 👍 / 👎. |
||
| }} | ||
| className="inline-flex items-center justify-center rounded-full bg-slate-900 px-4 py-2 text-xs font-medium text-white transition hover:bg-slate-800 disabled:pointer-events-none disabled:opacity-50" | ||
| disabled={isModeLoading} | ||
| > | ||
| Try again | ||
| </button> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Retry button doesn't force regeneration for cached empty resultsHigh Severity The "Try again" button in the new empty state UI calls |
||
| </div> | ||
| </div> | ||
| </Card> | ||
| </section> | ||
| )} | ||
|
|
||
| {videoId && topics.length > 0 && pageState === 'IDLE' && ( | ||
| <div className="mx-auto w-full max-w-7xl px-5 pb-5 pt-0"> | ||
| {error && ( | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,7 +27,10 @@ export function parseTimestamp(timestamp: string): number | null { | |||||||||
|
|
||||||||||
| // Validate time values | ||||||||||
| if (hours < 0 || hours >= 24) return null; | ||||||||||
| if (minutes < 0 || minutes >= 60) return null; | ||||||||||
| if (minutes < 0) return null; | ||||||||||
| // Relax minute check to allow MM:SS where MM >= 60 (fallback scenarios) | ||||||||||
| // unless hours are present, in which case strict 0-59 applies | ||||||||||
|
Comment on lines
+31
to
+32
|
||||||||||
| // Relax minute check to allow MM:SS where MM >= 60 (fallback scenarios) | |
| // unless hours are present, in which case strict 0-59 applies | |
| // When no hours are present (MM:SS), minutes are allowed to be >= 60 (fallback scenarios) | |
| // When hours are present (HH:MM:SS), minutes must be in the strict range 0-59 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment 'Force regenerate logic' is misleading. This doesn't force regeneration - it simply calls processVideo which may use cached results if available. The comment should either be removed or clarified to reflect the actual behavior (e.g., 'Retry analysis').