Skip to content

fix(desktop): open YouTube channel About tab so description is visible - #7

Merged
seungwonme merged 1 commit into
mainfrom
worktree-youtube-about-url
Jul 4, 2026
Merged

fix(desktop): open YouTube channel About tab so description is visible#7
seungwonme merged 1 commit into
mainfrom
worktree-youtube-about-url

Conversation

@seungwonme

Copy link
Copy Markdown
Owner

문제

채널 행 클릭 시 handleOrURL(채널 홈 URL, /channel/UCxxxx)을 그대로 열어 유튜브 홈(영상 목록) 탭이 열리고 설명은 보이지 않았음(PR #6 후속 버그 리포트).

수정

canonicalID 기반으로 .../about 탭 URL을 조립해서 열도록 변경.

  • 핸들 채널: https://www.youtube.com/@handle/about
  • 채널 ID 채널: https://www.youtube.com/channel/UCxxxx/about
  • youtube 외 플랫폼은 기존처럼 handleOrURL 그대로 오픈 (하위 호환)

테스트

  • swift build --package-path apps/desktop 성공
  • 기존 Python 테스트 214개 통과 (pre-commit hook)

@seungwonme
seungwonme merged commit aa034f9 into main Jul 4, 2026
3 checks passed
@seungwonme
seungwonme deleted the worktree-youtube-about-url branch July 4, 2026 13:25

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

Copy link
Copy Markdown

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 refactors the source page opening logic in ContentView.swift by extracting it into a private helper method openSourcePage(_:). It also introduces specific URL construction for YouTube sources using their canonical ID to point to their about page, falling back to the default URL for other platforms. The reviewer suggested adding a defensive check to ensure canonicalID is not empty before constructing the YouTube URL, preventing invalid URL generation and falling back to the default URL instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +704 to +709
guard source.platform == "youtube" else {
if let url = source.handleOrURL.flatMap(URL.init(string:)) {
NSWorkspace.shared.open(url)
}
return
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

만약 source.canonicalID가 빈 문자열("")인 경우, path"channel/"이 되어 https://www.youtube.com/channel//about과 같은 잘못된 URL을 열려고 시도하게 됩니다.

데이터베이스 스키마에서 canonical_idNOT NULL로 정의되어 있더라도 빈 문자열은 저장될 수 있으므로, canonicalID가 비어있는지 확인하는 방어적 코드를 추가하고 이 경우 기존의 handleOrURL로 폴백하도록 개선하는 것이 안전합니다.

Suggested change
guard source.platform == "youtube" else {
if let url = source.handleOrURL.flatMap(URL.init(string:)) {
NSWorkspace.shared.open(url)
}
return
}
guard source.platform == "youtube", !source.canonicalID.isEmpty else {
if let url = source.handleOrURL.flatMap(URL.init(string:)) {
NSWorkspace.shared.open(url)
}
return
}

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