Skip to content

fix: hide unavailable library Discussions links - #1374

Merged
tannerlinsley merged 1 commit into
mainfrom
fix/unavailable-discussions
Oct 13, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
fix/unavailable-discussions

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Markdown and Charts expose a Start Discussion link even though Discussions are disabled on their GitHub repositories, so those links lead to unavailable pages.

Add an optional library capability and hide that action for those two libraries. Discord stays available, and all other libraries keep their existing Discussions action.

Fixes #1194.

Validation: GitHub API confirms Discussions are disabled for both repositories. Earlier browser checks confirmed those pages retain Discord and Query retains both actions. Full pnpm test passed on the fix before updating to the current base. No new dependencies or network calls. CI passed on the updated base. A focused esbuild minification comparison against the parent commit found +36 raw / +12 gzip bytes in the library metadata module and +23 raw / +14 gzip bytes in the route module. These are isolated module measurements, not a full production bundle comparison. The runtime change is one boolean check, with no new dependency, loop or network request.

Summary by CodeRabbit

  • New Features
    • Framework documentation now hides the “Start Discussion” link for libraries that don’t support discussions. Discord links remain available.

@changeset-bot

changeset-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d712cbf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fe41d248-1789-4bcc-af66-be6c97a4381c
📥 Commits

Reviewing files that changed from the base of the PR and between 5c9a93f and d712cbf.

📒 Files selected for processing (3)
  • src/libraries/libraries.ts
  • src/libraries/types.ts
  • src/routes/_library/$libraryId/$version.docs.framework.index.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The library type now supports an optional discussion availability flag. The charts and markdown library records disable discussions. The framework documentation page hides the Start Discussion link when the flag is false. The Discord link remains unconditional.

Changes: Discussion Link Visibility

Layer / File(s) Summary
Discussion availability setting
src/libraries/types.ts, src/libraries/libraries.ts
LibrarySlim adds the optional hasDiscussions property. The charts and markdown library records set it to false.
Conditional Start Discussion link
src/routes/_library/$libraryId/$version.docs.framework.index.tsx
The page renders the Start Discussion link unless library.hasDiscussions is exactly false. The Discord link remains unconditional.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: kevinvandy

Merge Risk: ⚪ Minimal · up to d712c

The unavailable discussion links are hidden for Markdown and Charts, while Discord and other libraries’ discussion links remain available. No material merge risk was identified.

Pre-merge checks · Passed 3 · Failed 2

Failed Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check Warning The change also sets hasDiscussions: false for Charts. Issue [#1194] covers the Markdown documentation destination and does not identify Charts. The shared capability and route condition support the… Remove the Charts-specific hasDiscussions: false change, or link a separate issue that requires hiding the Charts Discussions action.
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (3 passed)
Check name Status Explanation
Linked Issues check Passed Issue [#1194] requires that the unavailable Markdown Discussions destination is addressed. The Markdown library record sets hasDiscussions to false. The framework route renders Start Discussion …
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: hiding unavailable library Discussions links.
Full details: Out of Scope Changes check

Explanation

The change also sets hasDiscussions: false for Charts. Issue [#1194] covers the Markdown documentation destination and does not identify Charts. The shared capability and route condition support the Markdown fix, but the Charts metadata change addresses a separate library and is not required by the linked issue.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com d712cbf Oct 13 2026, 04:39 PM

@tannerlinsley
tannerlinsley marked this pull request as ready for review October 13, 2026 16:49
@tannerlinsley
tannerlinsley merged commit 7c96ea3 into main Oct 13, 2026
8 checks passed
@tannerlinsley
tannerlinsley deleted the fix/unavailable-discussions branch October 13, 2026 17:04
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.

"Start Discussion" button navigates to 404 in markdown docs

1 participant