Skip to content

Website Demo Page from PR #169 (Part 2/4)#192

Merged
uelkerd merged 2 commits into
mainfrom
feat/website-demo-html
Sep 27, 2025
Merged

Website Demo Page from PR #169 (Part 2/4)#192
uelkerd merged 2 commits into
mainfrom
feat/website-demo-html

Conversation

@uelkerd
Copy link
Copy Markdown
Owner

@uelkerd uelkerd commented Sep 27, 2025

Summary

• Ultra-granular split for Sourcery compatibility (96k chars < 150k limit)
• Interactive comprehensive demo page from PR #169 feat/clean-demo-website
• Part 2/4 of website files split to resolve automated review constraints

Changes (1/1 file - Ultra-Granular ✅)

comprehensive-demo.html: Interactive emotion detection demo with DeBERTa v3 Large, Material Icons, voice recording capabilities

Technical Details

AI Integration: DeBERTa v3 Large model for 28-emotion classification
Interactive Features: Voice recording, real-time emotion analysis, result visualization
Modern UI: Material Icons, glassmorphism design, responsive layout
Performance: Optimized for mobile and desktop with smooth animations

Original Work Attribution

File sourced from PR #169 feat/clean-demo-website branch.
This represents the sophisticated interactive demo functionality that showcases the full AI capabilities.

Sourcery Compatibility

• ✅ 96,621 diff characters (< 150,000 limit)
• ✅ Single file change for focused review
• ✅ Fortress compliant (1 file)

🤖 Generated with Claude Code

Summary by Sourcery

Redesign the comprehensive-demo.html to streamline the interactive AI showcase into a single unified pipeline, modernize the UI with Material Icons and responsive layout, and modularize JavaScript by extracting scripts into dedicated modules while removing legacy demo code.

New Features:

  • Introduce a unified end-to-end AI pipeline demo combining voice transcription, summarization, and emotion detection in one flow
  • Add audio upload and live recording support for real-time API interactions

Enhancements:

  • Modernize the UI with Material Icons, glassmorphism-inspired CSS, and updated hero, navigation, and footer sections
  • Refactor and modularize JavaScript by moving core demo logic into separate files and cleaning up commented-out legacy scripts

Summary by CodeRabbit

  • New Features

    • Live API-driven demo with audio upload/recording, text input, action buttons (Process, Generate, Clear, API Key) and a visual flow bar (Input → Transcription → Summarization → Emotion Analysis).
    • Dual-column results (Emotion Analysis, Summarization) with collapsible transcription/details and a processing panel with progress console.
  • UI/UX

    • Rebranded page, simplified hero and four feature cards, dark navbar, single streamlined Input/Processing flow, cleaner icons and tooltip placeholders, simplified footer.
  • Chores

    • Updated assets (Bootstrap, Material Icons), added favicon, removed legacy libraries, introduced modular scripts.
  • Documentation

    • Updated links to API docs and model references.

Ultra-granular split for Sourcery compatibility (96k chars < 150k limit):
- Interactive emotion detection demo with DeBERTa v3 Large
- Material Icons integration and modern UI design
- Voice recording and real-time analysis capabilities
- Dark theme with glassmorphism and advanced CSS

Part 2/4 of website files from feat/clean-demo-website.
Provides complete interactive demo functionality.

Original work attribution: PR #169 feat/clean-demo-website

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 27, 2025 08:54
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 27, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

The HTML page was rebranded and restructured into a single flow demo emphasizing live API usage. Navigation, assets, and UI components were overhauled, legacy sections removed, and modular script references added. The layout now centers on Input → Transcription → Summarization → Emotion Analysis, with redesigned results panels and simplified footer.

Changes

Cohort / File(s) Summary
Page rebranding & metadata
website/comprehensive-demo.html
Updated title/meta to SAMO Emotion Detection API (SAMO Whisper, SAMO T5, SAMO DeBERTa v3 Large); added favicon; retained CSP note.
Assets & dependencies
website/comprehensive-demo.html
Switched to Bootstrap CSS/JS with integrity/crossorigin; added Google Material Icons; removed Prism.js and Font Awesome.
Navigation & header
website/comprehensive-demo.html
Implemented dark navbar, updated brand link, collapsible menu with Home/All Features/Integration/Try Now.
Demo flow redesign
website/comprehensive-demo.html
Replaced multi-tab demos with unified Input → Transcription → Summarization → Emotion Analysis flow; added live API notice and streamlined hero/feature cards.
Input components
website/comprehensive-demo.html
Added audio upload, recording controls with timer/visualizer placeholders, direct text input, and action buttons (Process, Generate, Clear All, API Key, Reset, Debug).
Results & processing panels
website/comprehensive-demo.html
Dual-column results (Emotion Analysis, Summarization); hidden transcription/details sections; consolidated Processing Information panel with status, model counts, confidence, and progress console.
Script structure
website/comprehensive-demo.html
Referenced modular scripts (config.js, layout-manager.js, comprehensive-demo.js, demo-initialization.js, voice-recorder.js); commented out legacy inline scripts.
Legacy removals
website/comprehensive-demo.html
Removed previous “Emotion/Voice/Batch/Summarization/Monitoring/Security” sections and older chart/monitoring blocks.
New CSS classes
website/css/comprehensive-demo.css
Added sizing utilities for material icons, .hidden-element, .recording-timer, .audio-visualizer, .spinner-large, .progress-console, and .progress-console-row to support the new UI.
Footer & accessibility
website/comprehensive-demo.html
Updated footer branding/links to API docs and model references; added tooltip placeholders and improved icon usage.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as Demo UI
  participant Recorder
  participant API as SAMO API

  User->>UI: Open page / paste text or upload/record audio
  UI->>Recorder: Start/stop recording (optional)
  Recorder-->>UI: Audio blob
  UI->>API: POST /transcribe (audio)
  API-->>UI: Transcription
  UI->>API: POST /summarize (text)
  API-->>UI: Summary
  UI->>API: POST /analyze-emotion (text)
  API-->>UI: Emotions + confidences
  UI-->>User: Render Summary, Emotion badges, Details

  alt Error
    API-->>UI: Error
    UI-->>User: Show error in Processing Information panel
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • sourcery-ai

Poem

I twitch my whiskers at the new design,
Hop through inputs, tidy and fine.
Whispered audio, summaries bright,
Emotions bloom in gentle light.
Scripts in order, buttons in row—
I thump with glee: "Let's make it go!" 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title references an internal PR number and part sequence instead of summarizing the key change—adding a comprehensive emotion detection demo page—so it doesn’t clearly convey the primary update to reviewers. Rename the title to succinctly describe the feature added, for example “Add interactive emotion detection demo page” or “Implement comprehensive emotion detection demo UI,” omitting PR numbers and part labels.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/website-demo-html

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11a7dd9 and d5d97f2.

📒 Files selected for processing (1)
  • website/css/comprehensive-demo.css (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • website/css/comprehensive-demo.css
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Sep 27, 2025

Reviewer's Guide

This PR refactors the comprehensive-demo.html page by modernizing the UI with Material Icons and glassmorphism, consolidating multiple feature sections into a unified interactive pipeline layout, cleaning up head resources (CDN links, metadata, and CSS/JS references), and moving inline JavaScript into external modules for better maintainability.

File-Level Changes

Change Details Files
Head section cleanup and resource updates
  • Updated title, description, and favicon; removed inline CSP meta tag
  • Replaced Font Awesome and Prism.js with Google Material Icons
  • Added integrity and crossorigin attributes to Bootstrap CDN links
  • Removed Highcharts and custom performance optimizer script
  • Swapped styles.css for comprehensive-demo.css
website/comprehensive-demo.html
Navigation and hero section redesign
  • Switched navbar from light to dark theme and updated brand icon
  • Expanded nav items and added a “Try Now” CTA button
  • Replaced hero badges with feature cards and updated section copy
  • Introduced floating feature cards highlighting each AI component
website/comprehensive-demo.html
Demo section restructuring into interactive pipeline
  • Removed individual feature tabs and demo blocks
  • Created a single #demo section with horizontal pipeline steps
  • Built dynamic input layout and hidden results/components
  • Added responsive alerts, input controls, and API notice
website/comprehensive-demo.html
Externalized scripts and refactored inline JS
  • Commented out or removed all inline JavaScript functions
  • Split logic into config.js, layout-manager.js, voice-recorder.js, comprehensive-demo.js, and demo-initialization.js
  • Deferred loading of Chart.js with onload/onerror handlers
  • Left legacy scripts commented out for future reference
website/comprehensive-demo.html

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

@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io Bot commented Sep 27, 2025

Here's the code health analysis summary for commits 93d71d2..d5d97f2. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Test coverage LogoTest coverage⚠️ Artifact not reportedTimed out: Artifact was never reportedView Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Terraform LogoTerraform✅ SuccessView Check ↗
DeepSource Secrets LogoSecrets✅ SuccessView Check ↗
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @uelkerd, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a major overhaul of the comprehensive demo page, transforming it into a streamlined, interactive experience that showcases SAMO-DL's core AI capabilities through a unified processing flow. The changes enhance user engagement with new voice input options and a modern aesthetic, while also improving the underlying code structure for better maintainability. This is a strategic step in a multi-part integration of a larger feature, carefully segmented to optimize the review process.

Highlights

  • Website Demo Page Refactor: This pull request introduces a significantly refactored and enhanced interactive demo page for the SAMO-DL platform, focusing on a unified AI processing pipeline.
  • Unified AI Pipeline: The demo now features a single, integrated pipeline for voice transcription (SAMO Whisper), text summarization (SAMO T5), and 28-emotion detection (SAMO DeBERTa v3 Large), replacing previous separate demo sections.
  • Modern UI/UX and Voice Integration: The user interface has been updated with Google Material Icons, a glassmorphism design, and includes new capabilities for audio file upload and direct voice recording for real-time transcription and analysis.
  • Granular PR Split: This PR represents 'Part 2/4' of a larger feature, specifically split into an ultra-granular change to ensure compatibility with automated review tools like Sourcery and facilitate focused review.
  • Code Structure Modernization: The inline JavaScript has been modularized into several external files (e.g., config.js, layout-manager.js, comprehensive-demo.js, voice-recorder.js), improving maintainability and organization.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 introduces the comprehensive demo page for SAMO-DL, showcasing an interactive AI pipeline with emotion detection, voice transcription, and text summarization capabilities. The changes refactor an existing comprehensive demo page into a more focused, modern interface with improved UX and Material Design aesthetics.

  • Streamlined UI with Material Icons and glassmorphism design
  • Enhanced interactive demo featuring DeBERTa v3 Large for 28-emotion classification
  • Modular JavaScript architecture with separate script files for better maintainability

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • This HTML file is still extremely large and monolithic—consider further splitting sections into reusable partial templates and moving inline scripts into separate modules to improve maintainability and reduce PR surface area.
  • Several interactive controls (e.g. recording buttons, file inputs) are missing ARIA attributes or clear labels—please add proper aria-labels and keyboard support to ensure full accessibility.
  • There’s a lot of commented-out legacy code and unused script tags; cleaning up dead code will reduce clutter and make the demo easier to understand and maintain.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- This HTML file is still extremely large and monolithic—consider further splitting sections into reusable partial templates and moving inline scripts into separate modules to improve maintainability and reduce PR surface area.
- Several interactive controls (e.g. recording buttons, file inputs) are missing ARIA attributes or clear labels—please add proper aria-labels and keyboard support to ensure full accessibility.
- There’s a lot of commented-out legacy code and unused script tags; cleaning up dead code will reduce clutter and make the demo easier to understand and maintain.

## Individual Comments

### Comment 1
<location> `website/comprehensive-demo.html:563` </location>
<code_context>
+    <script src="js/config.js"></script>

-            showLoading('emotion');
+    <!-- Chart.js for emotion visualization - MUST load before simple-demo-functions.js -->
+    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.js"
+            onload="console.log('✅ Chart.js loaded successfully')"
</code_context>

<issue_to_address>
**suggestion (bug_risk):** Chart.js is loaded but no fallback is provided if the CDN fails.

Provide a user-facing fallback or error message if Chart.js fails to load, rather than only logging to the console, to enhance usability in restricted network environments.
</issue_to_address>

### Comment 2
<location> `website/comprehensive-demo.html:310` </location>
<code_context>
+                                                    <span class="material-icons me-2">bar_chart</span>
+                                                    Top 5 Emotions
+                                                </h6>
+                                                <div id="emotionBadges" class="mb-3"></div>
+                                                <div id="emotionChart"></div>
+                                            </div>
</code_context>

<issue_to_address>
**suggestion:** Emotion badges container is present but may be empty if no emotions are detected.

Add a user-friendly message or fallback in the container when no emotions are detected to enhance user feedback.

Suggested implementation:

```
                                                <div id="emotionBadges" class="mb-3">
                                                    <span id="emotionBadgesFallback" class="text-muted">
                                                        No emotions detected.
                                                    </span>
                                                </div>

```

If emotion badges are rendered via JavaScript, you should update your badge rendering logic to hide the `emotionBadgesFallback` element when emotions are present, and show it when none are detected. For example:

```js
const emotionBadgesContainer = document.getElementById('emotionBadges');
const fallback = document.getElementById('emotionBadgesFallback');

function renderEmotionBadges(emotions) {
    // Clear previous badges
    emotionBadgesContainer.innerHTML = '';
    if (emotions.length === 0) {
        fallback.style.display = 'inline';
    } else {
        fallback.style.display = 'none';
        emotions.forEach(emotion => {
            // ...create and append badge elements...
        });
    }
}
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread website/comprehensive-demo.html
Comment thread website/comprehensive-demo.html Outdated
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request provides a significant and positive overhaul of the demo page, moving from a multi-tabbed, script-heavy single file to a more modern, streamlined, and modular design. The new UI is much improved, and separating JavaScript into multiple files is a great step for maintainability. My review focuses on further improving security, accessibility, and maintainability. I've identified a few issues such as broken icons due to a missing library, security vulnerabilities related to external links and CDN scripts, and inconsistencies in coding practices (inline styles/scripts). Addressing these points will help solidify the "Enterprise-grade" quality mentioned in the PR description.

Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Comment thread website/comprehensive-demo.html Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93d71d2 and 11a7dd9.

📒 Files selected for processing (1)
  • website/comprehensive-demo.html (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

Comment thread website/comprehensive-demo.html
@uelkerd uelkerd self-assigned this Sep 27, 2025
- Replace Font Awesome icons with Material Icons equivalents
- Add integrity and crossorigin attributes to Chart.js CDN script
- Remove empty navigation list item
- Move all inline styles to CSS classes in comprehensive-demo.css
- Remove inline onclick handlers and add proper event listeners
- Clean up commented-out legacy script tags
- Enhance accessibility with ARIA labels and keyboard support
- Add Chart.js fallback with user-facing error message
- Add emotion badges fallback for empty states
- Improve code maintainability and security

Addresses all gemini-code-assist bot review comments
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.

2 participants