Skip to content

fix: propagate README truncation flag through API response (issue #82)#2571

Open
tmdeveloper007 wants to merge 3 commits into
nisshchayarathi:mainfrom
tmdeveloper007:82-readme-truncation-fix
Open

fix: propagate README truncation flag through API response (issue #82)#2571
tmdeveloper007 wants to merge 3 commits into
nisshchayarathi:mainfrom
tmdeveloper007:82-readme-truncation-fix

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary

Fixes README rendering to properly indicate when content has been truncated due to size limits.

Issue: #82

Problem: Large READMEs were silently truncated to 200,000 characters without any indication in the API response. Clients had no way to know content was cut off.

Fix: Added a truncated boolean field to the README API response so the UI can show a "view raw" link when the README was truncated.

Files changed:

  • lib/services/repositoryService.ts
  • app/api/repositories/[id]/readme/route.ts

…shchayarathi#82)

Previously, large READMEs were silently truncated to 200,000 characters without
any indication in the API response, leaving the client unaware that content was
cut off.

This commit:
- Adds a 'truncated' boolean field to the return value of tryReadmeFromRepoPath
- Propagates the truncated flag through fetchAndStoreReadme to the caller
- Includes 'truncated: true/false' in the POST /api/repositories/:id/readme response
  so the UI can show a 'view raw' link when the README was truncated
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Nisshchaya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 46 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7928ef8d-915f-4d80-83ec-35ead96fdc7c

📥 Commits

Reviewing files that changed from the base of the PR and between 07ceab7 and b9892f3.

📒 Files selected for processing (7)
  • app/api/repositories/[id]/readme/route.ts
  • lib/services/bitbucketService.ts
  • lib/services/gitlabService.ts
  • lib/services/repositoryService.ts
  • src/components/repository/ContributorIssueRecommendations.tsx
  • src/components/repository/RepositoryInsights.tsx
  • src/components/visualizations/CodeDependencyGraph.tsx
✨ 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 added the gssoc:invalid GSSoC: Invalid contribution label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

⚠️ GSSoC Quality Check Failed — PR #2571

Hi @tmdeveloper007! 👋 Your PR has been flagged by our automated GSSoC quality check.

Issues found:

  • 🔗 No linked issue — Every PR must be linked to an open issue. Add closes #<issue-number> or fixes #<issue-number> in your description so maintainers know what this PR resolves.

✅ How to fix this

  1. Read the issues listed above carefully
  2. Edit your PR title and description to address them
  3. Make sure your PR is linked to an open issue using closes #<issue-number>
  4. Make sure your changes are meaningful and solve a real problem

Once you've fixed these, a maintainer will review and remove the flag. If you believe this is a mistake, please comment below. 🙏

GSSoC'26 automation · Maintainer: @nisshchayarathi

The return type of tryReadmeFromRepoPath was missing the 'truncated' field,
causing TypeScript errors in CI.
@tmdeveloper007 tmdeveloper007 force-pushed the 82-readme-truncation-fix branch from aa36002 to 3d063ca Compare July 6, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:invalid GSSoC: Invalid contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant