Skip to content

feat: add deprecation warning#35

Open
trueberryless wants to merge 4 commits into
dependents-dev:mainfrom
trueberryless:feat/deprecation-info
Open

feat: add deprecation warning#35
trueberryless wants to merge 4 commits into
dependents-dev:mainfrom
trueberryless:feat/deprecation-info

Conversation

@trueberryless

@trueberryless trueberryless commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a little warning symbol to deprecated packages near the name of the package in the list. To make it accessible, it also has a <title>Deprecated</title>, which shows on hover and gets picked up by screen readers.

Here is an example in the preview: https://pr-35-dependents-dev.gameroman.workers.dev/?package=qs

Summary by CodeRabbit

  • New Features

    • Deprecated packages are now identified during analysis.
    • Deprecated packages display a warning icon in results and copied Markdown links.
    • Analysis progress updates as deprecation checks complete.
  • Bug Fixes

    • Improved handling of dependent package version data.
    • Improved caching consistency and cache updates.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@trueberryless, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9793d720-818f-429c-9a24-8bc293cbd0ba

📥 Commits

Reviewing files that changed from the base of the PR and between 0f4c139 and 120212f.

📒 Files selected for processing (1)
  • src/components/App.tsx
📝 Walkthrough

Walkthrough

Package analysis now records deprecation status for each dependent, checks statuses in batches with progress updates, and displays warning indicators in Markdown output and the results table. API fetch caching and dependent-version parsing are also updated.

Changes

Package deprecation indicators

Layer / File(s) Summary
Fetch contract and dependent value handling
src/lib/api.ts
cachedFetch returns a stable commit function and normalizes request bodies for cache hashing; dependent values use broader runtime-safe types and version extraction.
Analysis deprecation checks
src/components/App.tsx, src/lib/api.ts
Analysis results include deprecation state, query package status in batches, and emit incremental progress updates.
Deprecated package indicators
src/components/App.tsx
Copied Markdown and the results table show warning indicators for deprecated packages.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR satisfies issue #12 by showing a deprecated indicator next to packages using the registry's deprecation flag.
Out of Scope Changes check ✅ Passed The changes stay aligned with the deprecation-warning feature and its supporting data handling.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a deprecation warning indicator for packages.
✨ 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.

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

Preview deployment

✅ Deployment complete!

@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

🧹 Nitpick comments (1)
src/components/App.tsx (1)

160-172: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Consider the N+1 API call pattern and silent error handling for deprecation checks.

Each item triggers a separate getPackageIsDeprecated HTTP request — up to 3000 for a full result set. While batching (chunks of 50) and cachedFetch mitigate repeat cost, the first analysis for a large package could be slow and risk registry rate-limiting. Additionally, .catch(() => false) on line 165 silently masks network and rate-limit errors as "not deprecated," which could produce incorrect results under load.

Two things worth considering:

  1. The DependentValueObject type added in api.ts (line 159) includes a deprecated field — if the dependents view data already contains this, you could read r.value.deprecated?.deprecated directly during getSortedDependents processing and avoid the N+1 calls entirely.
  2. If separate fetches remain necessary, consider logging or surfacing a count of failed deprecation checks so users know results may be incomplete.
🤖 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 `@src/components/App.tsx` around lines 160 - 172, The deprecation analysis loop
in App.tsx performs one request per item and silently treats failures as not
deprecated. Reuse the existing deprecated value from DependentValueObject during
getSortedDependents processing when available, removing unnecessary
getPackageIsDeprecated calls; otherwise retain the fetches but track and surface
failed checks instead of mapping errors silently to false.
🤖 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 `@src/components/App.tsx`:
- Around line 534-549: Update the deprecated icon SVG in the pkg.deprecated Show
block to include role="img" and aria-label="Deprecated" alongside its existing
title, matching the accessibility attributes used by the error icon.

---

Nitpick comments:
In `@src/components/App.tsx`:
- Around line 160-172: The deprecation analysis loop in App.tsx performs one
request per item and silently treats failures as not deprecated. Reuse the
existing deprecated value from DependentValueObject during getSortedDependents
processing when available, removing unnecessary getPackageIsDeprecated calls;
otherwise retain the fetches but track and surface failed checks instead of
mapping errors silently to false.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c681d427-3648-4397-9fb4-2f9e3024f310

📥 Commits

Reviewing files that changed from the base of the PR and between 54da82f and 0f4c139.

📒 Files selected for processing (2)
  • src/components/App.tsx
  • src/lib/api.ts

Comment thread src/components/App.tsx

@gameroman gameroman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The icon looks nice

I was thinking about adding an extra column called "Note" instead,
where we would put stuff like "deprecated", "has a replacement", etc,
see example

Also left a couple of comments 😄

Comment thread src/lib/api.ts Outdated
Comment thread src/lib/api.ts Outdated
Comment thread src/lib/api.ts Outdated
Comment thread src/lib/api.ts Outdated
@trueberryless

Copy link
Copy Markdown
Contributor Author

I was thinking about adding an extra column called "Note" instead,
where we would put stuff like "deprecated", "has a replacement", etc,
see e18e/ecosystem-issues#261 (comment)

For now, I was deciding against this idea (because I was also thinking about it), because deprecated packages are very rare, which means we would have a column that is mostly empty. And I also wonder how often such a column would actually be filled with some info, even if we add more stuff like "has a replacement", "last updated...", etc.

IMHO a column should only be added if every package has associated info with it, which isn't the case here. That's why I am a little hesitant. Especially, because tables with many rows quickly become inaccessible on smaller devices as well...

trueberryless and others added 2 commits July 12, 2026 19:56
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@gameroman

Copy link
Copy Markdown
Member

I was thinking about adding an extra column called "Note" instead,
where we would put stuff like "deprecated", "has a replacement", etc,
see e18e/ecosystem-issues#261 (comment)

For now, I was deciding against this idea (because I was also thinking about it), because deprecated packages are very rare, which means we would have a column that is mostly empty.

I think it depends on the package, packages that have a replacement are more likely to have deprecated or replaceable dependents too

What I think we could do is keep the icon in the ui, but when "Copying as Markdown table", then, if a package has a note, add a Notes column, instead of copying an emoji

And I also wonder how often such a column would actually be filled with some info, even if we add more stuff like "has a replacement", "last updated...", etc.

IMHO a column should only be added if every package has associated info with it, which isn't the case here. That's why I am a little hesitant.

If no package in the table has any note, we could hide the column maybe? Don't know if that's a good idea though

Especially, because tables with many rows quickly become inaccessible on smaller devices as well...

Yeah, it's currently not very good on mobile, I think mobile needs some more improvements, maybe on mobile make it into cards or several rows instead of simple table

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.

Show deprecated packages in list

2 participants