Skip to content

fix(potd): include language segment in GitHub source links#5663

Merged
MarkusNeusinger merged 2 commits into
mainfrom
claude/fix-plot-links-VXF4Z
May 4, 2026
Merged

fix(potd): include language segment in GitHub source links#5663
MarkusNeusinger merged 2 commits into
mainfrom
claude/fix-plot-links-VXF4Z

Conversation

@MarkusNeusinger
Copy link
Copy Markdown
Owner

Summary

The "plot of the day" component links to the implementation file on GitHub, but the URL was not updated for the per-language path migration. Links currently 404 because they point to plots/{spec}/implementations/{library}.py (e.g. plots/indicator-rsi/implementations/plotly.py) instead of the correct plots/{spec}/implementations/{language}/{library}.py (e.g. plots/indicator-rsi/implementations/python/plotly.py).

This adds the missing {language} segment in both potd components.

Changes

  • app/src/components/PlotOfTheDay.tsx — insert ${data.language}/ before the library file in the GitHub href.
  • app/src/components/PlotOfTheDayTerminal.tsx — same fix for githubFileUrl.

Test plan

  • Open the homepage, hover/click the potd source link — confirm the URL contains /implementations/python/ and resolves on GitHub.
  • Same for the terminal-styled potd variant.

Generated by Claude Code

Plot-of-the-day links pointed to plots/{spec}/implementations/{lib}.py,
which 404s after the path migration that introduced the per-language
subfolder. Insert {language} before {library} so links resolve to
plots/{spec}/implementations/{language}/{library}.py.
Copilot AI review requested due to automatic review settings May 4, 2026 11:30
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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 fixes the Plot of the Day GitHub source links so they match the repository’s language-prefixed implementation layout (plots/{spec}/implementations/{language}/{library}.py). It aligns the homepage POTD components with the codebase’s per-language path migration and prevents the current 404s from broken source links.

Changes:

  • Updated the standard POTD card to include data.language in the GitHub implementation URL.
  • Updated the terminal-style POTD card to include potd.language in the GitHub implementation URL.
  • Left the rest of the POTD navigation behavior unchanged.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
app/src/components/PlotOfTheDay.tsx Fixes the homepage POTD source-link href to point at the language-scoped implementation path.
app/src/components/PlotOfTheDayTerminal.tsx Fixes the terminal POTD GitHub source URL to use the language-scoped implementation path.

<Typography
component="a"
href={`${GITHUB_URL}/blob/main/plots/${data.spec_id}/implementations/${data.library_id}.py`}
href={`${GITHUB_URL}/blob/main/plots/${data.spec_id}/implementations/${data.language}/${data.library_id}.py`}
const displayFilename = `plots/${potd.spec_id}/${potd.library_id}.py`;
const implPath = specPath(potd.spec_id, potd.language, potd.library_id);
const githubFileUrl = `${GITHUB_URL}/blob/main/plots/${potd.spec_id}/implementations/${potd.library_id}.py`;
const githubFileUrl = `${GITHUB_URL}/blob/main/plots/${potd.spec_id}/implementations/${potd.language}/${potd.library_id}.py`;
The previous tests clicked the source/GitHub links to verify analytics
but never asserted the rendered href, so a regression to the old
language-less path would have gone unnoticed. Pin the URL shape with
a regex match in both component tests, and add the missing language
field to PlotOfTheDay's mock data.
@MarkusNeusinger MarkusNeusinger merged commit f27f6f8 into main May 4, 2026
9 checks passed
@MarkusNeusinger MarkusNeusinger deleted the claude/fix-plot-links-VXF4Z branch May 7, 2026 20:29
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.

3 participants