Skip to content

Detect livestream platform via link input#32

Merged
hunf299 merged 1 commit intomainfrom
codex/remove-ocr-based-platform-detection
Nov 11, 2025
Merged

Detect livestream platform via link input#32
hunf299 merged 1 commit intomainfrom
codex/remove-ocr-based-platform-detection

Conversation

@hunf299
Copy link
Copy Markdown
Owner

@hunf299 hunf299 commented Nov 11, 2025

Summary

  • parse livestream inputs to derive platform and IDs in the prefill modal and surface the detection status to the user
  • include the detected platform when triggering OCR requests and require a known platform before submitting
  • simplify the OCR API to trust the provided platform and drop color/text-based platform heuristics

Testing

  • CI=1 npm run build (fails: Missing NEXT_PUBLIC_SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY)

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 11, 2025

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

Project Deployment Preview Comments Updated (UTC)
working-web Ready Ready Preview Comment Nov 11, 2025 5:28am

@hunf299 hunf299 merged commit e5ce902 into main Nov 11, 2025
1 of 2 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

WorkingWeb/app/page.js

Lines 130 to 152 in 81806f8

return `${GOOGLE_FORM_BASE_URL}?${query}`;
}
function parseLivestreamInput(raw) {
const trimmed = typeof raw === 'string' ? raw.trim() : '';
if (!trimmed) {
return { id: '', platform: 'unknown' };
}
const lower = trimmed.toLowerCase();
let platform = 'unknown';
if (lower.includes('creator.shopee.vn')) {
platform = 'shopee';
} else if (lower.includes('shop.tiktok.com')) {
platform = 'tiktok';
}
let id = '';
if (platform === 'shopee') {
const shopeeMatch = trimmed.match(/live\/(\d+)/i);
if (shopeeMatch) {
id = shopeeMatch[1];
}

P1 Badge Broaden TikTok link detection in parseLivestreamInput

The new parseLivestreamInput marks the platform as TikTok only when the input contains shop.tiktok.com. Many valid TikTok live links use other hosts (seller-vn.shop.tiktokglobalshop.com, www.tiktok.com, etc.) while still exposing a room_id parameter. For those URLs the parser leaves platformDetected as "unknown", and handlePrefillOcr now aborts because it requires a known platform before calling /api/ocr. As a result, OCR can no longer run for common TikTok links that don’t match this single hostname. The detection should accept a broader set of TikTok domains or fall back to room_id when the hostname is unrecognized.

ℹ️ 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".

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant