Skip to content

Perbaiki Link Video Belum Muncul Ketika Klik Analisis#10

Draft
hardihardi wants to merge 1 commit into
feat/traffic-detection-system-integration-230004736315457304from
fix-analysis-video-link-4233785994974729608
Draft

Perbaiki Link Video Belum Muncul Ketika Klik Analisis#10
hardihardi wants to merge 1 commit into
feat/traffic-detection-system-integration-230004736315457304from
fix-analysis-video-link-4233785994974729608

Conversation

@hardihardi

@hardihardi hardihardi commented Jul 13, 2026

Copy link
Copy Markdown
Owner
  • Memperbaiki transisi status dari 'ANALYZING' ke 'STARTED' pada pengolahan sumber URL sehingga aliran video backend dapat dirender.
  • Menambahkan tombol "Buka Sumber" pada header monitor video untuk memudahkan akses ke video asli (khusus sumber URL).
  • Meningkatkan UI dengan overlay pemuatan saat menghubungkan ke stream backend.
  • Memperbaiki beberapa kesalahan type-checking terkait properti file dan ukuran tombol (size="xs" menjadi size="sm").
  • Memperbarui teks status pada panel kontrol agar lebih informatif ("ANALISIS AKTIF").

PR created automatically by Jules for task 4233785994974729608 started by @hardihardi

Summary by Sourcery

Improve the traffic analysis dashboard UX and correctness around starting video analysis, including better status handling, clearer controls, and direct access to source videos while connecting to backend streams.

New Features:

  • Add a "Buka Sumber" link in the video monitor header to open the original URL source in a new tab.
  • Show a loading overlay on the video stream player while the backend analysis stream is being established.
  • Provide a CTA in the empty video state to navigate directly to the Riwayat page.

Bug Fixes:

  • Ensure backend URL health checks and analysis intervals react properly to BACKEND_URL changes.
  • Set analysis status to STARTED at the correct time for both URL-based and file-based sources so backend streams and recognition results are rendered.
  • Fix type usage for uploaded video sources by storing file name and MIME type along with the file object.

Enhancements:

  • Update control status text and color to reflect an active analysis state more clearly.
  • Increase export report action button sizes for better usability.
  • Refine dashboard header controls and icons for simulation mode to improve clarity and layout.

Build:

  • Add a dev_server.log file to the repository.

- Memperbaiki transisi status dari 'ANALYZING' ke 'STARTED' pada pengolahan sumber URL sehingga aliran video backend dapat dirender.
- Menambahkan tombol "Buka Sumber" pada header monitor video untuk memudahkan akses ke video asli (khusus sumber URL).
- Meningkatkan UI dengan overlay pemuatan saat menghubungkan ke stream backend.
- Memperbaiki beberapa kesalahan type-checking terkait properti file dan ukuran tombol (size="xs" menjadi size="sm").
- Memperbarui teks status pada panel kontrol agar lebih informatif ("ANALISIS AKTIF").
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vision-pulse Ready Ready Preview Jul 13, 2026 11:31am

@sourcery-ai

sourcery-ai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Reviewer's Guide

PR fixes video stream rendering when analyzing URL/file sources, improves monitoring UI with loading overlay and source link, and refines status text and button sizing for clarity and consistency.

Sequence diagram for video analysis and stream rendering status transitions

sequenceDiagram
    actor User
    participant TrafficDashboard
    participant Backend

    User->>TrafficDashboard: onStatusChange('ANALYZING')
    TrafficDashboard->>TrafficDashboard: renderVideoPlayer()
    TrafficDashboard-->>User: show overlay [status === 'ANALYZING']

    alt source.type === 'url'
        TrafficDashboard->>Backend: fetch(BACKEND_URL + '/process-url', { url })
        Backend-->>TrafficDashboard: 200 OK
        TrafficDashboard->>TrafficDashboard: setStatus('STARTED')
        TrafficDashboard->>TrafficDashboard: renderVideoPlayer()
        TrafficDashboard-->>User: img src BACKEND_URL + '/stream'
    else source.type === 'file'
        TrafficDashboard->>Backend: fetch(BACKEND_URL + '/upload-video', { FormData })
        Backend-->>TrafficDashboard: 200 OK
        TrafficDashboard->>TrafficDashboard: toBase64(file)
        TrafficDashboard->>Backend: getEnhancedRecognition(videoDataUri)
        Backend-->>TrafficDashboard: result
        TrafficDashboard->>TrafficDashboard: setStatus('STARTED')
        TrafficDashboard->>TrafficDashboard: renderVideoPlayer()
        TrafficDashboard-->>User: img src BACKEND_URL + '/stream'
    end
Loading

File-Level Changes

Change Details Files
Ensure analysis status transitions to STARTED only after backend stream/upload is initiated so video stream can render correctly.
  • Set status to STARTED after posting URL source to backend processing endpoint.
  • Await upload-video fetch for file sources before proceeding with analysis.
  • Move/set STARTED status to occur after file upload and before enhanced recognition call to align frontend state with backend stream availability.
  • Expand effect dependency arrays to include BACKEND_URL so health checks and analysis intervals react to backend changes.
src/components/traffic/traffic-dashboard.tsx
Improve video monitor UI to guide users into analysis and show loading state while connecting to backend stream.
  • Adjust empty-player placeholder to vertical layout with clearer guidance text and a button linking to /history.
  • Add an overlay with spinner and status message when status is ANALYZING while streaming from backend.
  • Update monitor header to show active video name and add an external link button to open original URL sources in a new tab.
  • Slightly adjust header layout for simulation mode toggle icon and placement.
src/components/traffic/traffic-dashboard.tsx
Standardize button sizes in alert and export controls for better usability and visual consistency.
  • Change backend error alert action buttons from size xs to size sm.
  • Change export-report action buttons from size xs to size sm.
src/components/traffic/traffic-dashboard.tsx
src/components/traffic/export-report.tsx
Clarify and slightly restyle analysis control status display.
  • Change STARTED status label from "ANALISIS SELESAI" to "ANALISIS AKTIF".
  • Adjust STARTED status color from text-green-500 to text-green-600 for better emphasis.
src/components/traffic/control-status.tsx
Enrich video upload metadata passed into history items for file sources.
  • When creating a file-type source in VideoUploadForm, include fileName and fileType along with the File object so downstream components can access file properties.
src/components/dashboard/video-upload-form.tsx
Add development log file to repository.
  • Introduce dev_server.log file at repository root (new file tracked).
dev_server.log

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant