Skip to content

Link download results to indexer sources - #872

Open
Pachinko0 wants to merge 1 commit into
Doezer:mainfrom
Pachinko0:codex/pr-download-source-links
Open

Link download results to indexer sources#872
Pachinko0 wants to merge 1 commit into
Doezer:mainfrom
Pachinko0:codex/pr-download-source-links

Conversation

@Pachinko0

@Pachinko0 Pachinko0 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • link release titles to the indexer source when a comments URL is available
  • open source pages in a new tab with noopener/noreferrer protection
  • keep plain text titles when no source URL exists
  • cover both desktop and mobile result layouts

Verification

  • npx vitest run client/tests/GameDownloadDialog.test.tsx
  • npm run check

Summary by CodeRabbit

  • New Features
    • Release titles now link to available external comments or source pages.
    • Links open in a new browser tab with appropriate security protections.
    • Titles remain non-clickable when no link is available.
    • Works consistently across mobile and desktop views.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Game download result titles now link to download.comments when available. Mobile and desktop views preserve non-linking headings without a URL. Tests cover URL, target, security attributes, and both responsive layouts.

Changes

Release title links

Layer / File(s) Summary
Conditional title links
client/src/components/GameDownloadDialog.tsx
Mobile and desktop release titles render external links when download.comments exists. They retain heading fallbacks without a URL.
Link behavior validation
client/__tests__/GameDownloadDialog.test.tsx
Torrent fixtures support optional comments URLs. Parameterized tests verify the link URL, new-tab target, and noopener noreferrer relationship on mobile and desktop.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes linking download results to their indexer source, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@Pachinko0
Pachinko0 marked this pull request as ready for review August 3, 2026 15:48
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@client/src/components/GameDownloadDialog.tsx`:
- Around line 1140-1154: Preserve heading semantics in both result layouts by
keeping the existing h4 wrappers around the release titles and rendering the
conditional external a inside them. Apply this change to
client/src/components/GameDownloadDialog.tsx lines 1140-1154 and 1256-1270,
while retaining the existing link behavior and non-link title rendering.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 516b3e2d-d0aa-4965-a2b5-a2f0f64129a7

📥 Commits

Reviewing files that changed from the base of the PR and between e0bea9e and 02e3c5a.

📒 Files selected for processing (2)
  • client/__tests__/GameDownloadDialog.test.tsx
  • client/src/components/GameDownloadDialog.tsx

Comment on lines +1140 to +1154
{download.comments ? (
<a
href={download.comments}
target="_blank"
rel="noopener noreferrer"
className="font-semibold text-sm leading-snug break-all line-clamp-2 min-w-0 flex-1 hover:underline cursor-pointer"
onClick={(event) => event.stopPropagation()}
>
{download.title}
</a>
) : (
<h4 className="font-semibold text-sm leading-snug break-all line-clamp-2 min-w-0 flex-1">
{download.title}
</h4>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve heading semantics in both result layouts.

Both conditional branches replace the existing <h4> with a bare <a> when download.comments exists. This removes the heading role from linked release titles.

  • client/src/components/GameDownloadDialog.tsx#L1140-L1154: Keep the mobile <h4> wrapper and render the conditional external <a> inside it.
  • client/src/components/GameDownloadDialog.tsx#L1256-L1270: Keep the desktop <h4> wrapper and render the conditional external <a> inside it.

As per coding guidelines: client/src/**/*.{tsx,ts}: Use semantic HTML elements such as <button>, <nav>, <main>, and <section> instead of clickable <div> elements.

📍 Affects 1 file
  • client/src/components/GameDownloadDialog.tsx#L1140-L1154 (this comment)
  • client/src/components/GameDownloadDialog.tsx#L1256-L1270
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@client/src/components/GameDownloadDialog.tsx` around lines 1140 - 1154,
Preserve heading semantics in both result layouts by keeping the existing h4
wrappers around the release titles and rendering the conditional external a
inside them. Apply this change to client/src/components/GameDownloadDialog.tsx
lines 1140-1154 and 1256-1270, while retaining the existing link behavior and
non-link title rendering.

Source: Coding guidelines

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