-
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?
Fix blank screen on empty analysis and >60m timestamp bug #53
Conversation
- Added "No highlights found" empty state to `app/analyze/[videoId]/page.tsx` to prevent blank screens when AI generates zero topics. - Updated `lib/ai-processing.ts` to use shared `formatTimestamp` utility, fixing a bug where local `formatTime` incorrectly formatted >60m timestamps as MM:SS (e.g. 70:00), causing validation failures. - Relaxed `parseTimestamp` validation in `lib/timestamp-utils.ts` to support MM:SS formats where minutes >= 60 as a fallback.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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.
Pull request overview
This PR fixes two critical issues: a blank screen when video analysis produces zero topics, and incorrect timestamp formatting for videos longer than 60 minutes.
Changes:
- Added empty state UI to handle zero-topic analysis results gracefully
- Replaced buggy local
formatTimeimplementation with robustformatTimestamputility - Relaxed timestamp parsing to accept MM:SS where MM >= 60 for legacy data compatibility
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/timestamp-utils.ts | Modified parseTimestamp validation to allow minutes >= 60 in MM:SS format when hours are absent |
| lib/ai-processing.ts | Replaced flawed formatTime with formatTimestamp to fix >60 minute timestamp formatting bug |
| app/analyze/[videoId]/page.tsx | Added empty state UI with retry functionality for zero-topic analysis results |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Relax minute check to allow MM:SS where MM >= 60 (fallback scenarios) | ||
| // unless hours are present, in which case strict 0-59 applies |
Copilot
AI
Jan 14, 2026
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 says 'Relax minute check to allow MM:SS where MM >= 60' but this logic only validates that when hours > 0, minutes must be < 60. The relaxation for MM:SS format when hours are absent is implicit (no check exists), which could be confusing. Consider adding an explicit comment or restructuring to make the two cases clearer. For example: // When hours are present, minutes must be 0-59 strictly before line 33, and a comment before line 30 clarifying that without hours, minutes can be >= 60 for MM:SS format timestamps.
| // 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 |
| <button | ||
| type="button" | ||
| onClick={() => { | ||
| // Force regenerate logic |
Copilot
AI
Jan 14, 2026
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').
| // Force regenerate logic | |
| // Retry analysis (may use cached results) |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95dd4e1207
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <button | ||
| type="button" | ||
| onClick={() => { | ||
| // Force regenerate logic | ||
| processVideo(normalizedUrl, mode); |
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.
Force a cache bypass for empty-state retry
The empty-state “Try again” button just calls processVideo(normalizedUrl, mode) without setting the regen/force-regenerate path, so if the current video analysis is already cached with an empty topics array (which is now what triggers this state), the retry will immediately short‑circuit to the same cached empty result and the user can never re-run analysis. This is most visible for older cached analyses that produced zero topics; the UI now suggests a retry that cannot actually regenerate.
Useful? React with 👍 / 👎.
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.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| disabled={isModeLoading} | ||
| > | ||
| Try again | ||
| </button> |
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.
Retry button doesn't force regeneration for cached empty results
High Severity
The "Try again" button in the new empty state UI calls processVideo(normalizedUrl, mode) with a comment saying // Force regenerate logic, but it doesn't actually force regeneration. The forceRegenerate flag is derived from URL params at component mount and isn't modified by this button. When a video analysis returns zero topics (the exact scenario this UI handles), the empty result is cached. Clicking "Try again" will load the same cached empty result instead of re-running the analysis, making the retry functionality ineffective.
Fixed a critical issue where video analysis resulting in zero topics (often due to timestamp parsing failures for longer videos) would render a blank screen.
Changes:
app/analyze/[videoId]/page.tsxto inform users when no highlights are found and offer a retry action.lib/ai-processing.tsto use the robustformatTimestampfromlib/timestamp-utils.tsinstead of a flawed local implementation that broke for videos > 60 minutes.lib/timestamp-utils.tsparseTimestampto be more permissive with MM:SS formats (allowing minutes >= 60) to handle legacy or external data safely.PR created automatically by Jules for task 10651664497245241971 started by @SamuelZ12
Note
Addresses blank screens on zero-topic analyses and timestamp issues for long videos.
topics.length === 0with guidance and a retry action; preserves existing error-state handling.formatTimestampthroughout prompts, transcript rendering, chunk windows, and fallbacks; removes duplicate formatter.parseTimestampminute validation (allow MM:SS with minutes ≥ 60 when no hours) and centralizes formatting viaformatTimestamp; timestamp range handling updated accordingly.Written by Cursor Bugbot for commit 95dd4e1. This will update automatically on new commits. Configure here.