fix: send Insights docs link to issue-discovery doc in Discovery mode…#268
Conversation
|
Closing — CI is failing (build + format) and the diff includes unrelated changes (removing the viewMode guard on MinerScoreBreakdown). The bug is valid but the fix is a one-liner — no need for the restructuring that broke the build. |
anderdc
left a comment
There was a problem hiding this comment.
The bug is real but the fix is a one-liner — the component already has isIssueMode, just use it in the href. Drop the assembleIssueInsights restructuring (it's what broke the build) and the unrelated MinerScoreBreakdown guard removal.
anderdc
left a comment
There was a problem hiding this comment.
Docs link fix looks good now. Still has the unrelated MinerScoreBreakdown guard removal in MinerDetailsPage.tsx — drop that change, it's not part of this fix.
|
Hi, @anderdc Thanks for your feedback. I have just updated. Please review again and let me know. 👍 |
anderdc
left a comment
There was a problem hiding this comment.
MinerScoreBreakdown revert done. Clean one-file fix. Looks good.
Bug is already fixed on test — viewMode is already passed and the conditional href already works.
|
Closing — the bug from #152 is already fixed on |
|
Reopening — you addressed all the feedback. Sorry for the back and forth. |
anderdc
left a comment
There was a problem hiding this comment.
All feedback addressed. Clean fix.
Summary
Fixes #152. On a miner's detail page, the "Learn more about scoring in the docs" link in the Insights & Next Actions card always pointed to
docs.gittensor.io/oss-contributions.html, even when the user had toggled the page to Issue Discovery mode. The link now matches the active view.Root cause
MinerDetailsPagealready derivesviewMode: 'prs' | 'issues'from the URL toggle at the top of the page and passes it toMinerScoreCard. It did not pass the same prop toMinerInsightsCard, so the insights card had no way to know which docs page to link to and used the OSS one as a hardcoded fallback.Fix
MinerInsightsCardaccepts a new optionalviewMode?: 'prs' | 'issues'prop (default'prs'for backward compatibility).docsUrlconstant inside the component picks betweenissue-discovery.htmlandoss-contributions.htmlbased onviewMode.MinerDetailsPageforwards its existingviewModetoMinerInsightsCard, matching the pattern it already uses forMinerScoreCard.No other callers exist (verified via grep).
Type of Change
Testing
npm run buildnpm run lint:fix/miners/details?githubId=152555741- toggle is on OSS Contributions --> "docs" link opensdocs.gittensor.io/oss-contributions.html✅ (unchanged)&viewMode=issues, card re-renders --> "docs" link now opensdocs.gittensor.io/issue-discovery.html✅issue-discovery.htmlChecklist
'prs')MinerScoreCardfor the sameviewModepropMedia to Upload
14.04.2026_22.08.25_REC_152.mp4