Repository navigation
fix: preserve full stop in credential status line when no model count… - #6470
Amanjha2005 wants to merge 2 commits into
Conversation
|
@Amanjha2005 is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
|
✅ Thanks @Amanjha2005! This PR now meets the contribution requirements and has been reopened. A maintainer will review it soon. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
Walkthrough
ChangesCredential status copy
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The change preserves the final period in credential status messages when no model count is appended, fixing incorrect sentence formatting without affecting broader behavior. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The PR satisfies the directly addressed requirement in issue Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
|
Hi @mmabrouk, this PR is ready for review — all checks pass except the Vercel deploy which needs maintainer authorization. Please take a look when you get a chance! |
|
🤖 The AI agent says: Thank you, @Amanjha2005, for fixing the missing full stop in the credential status line. PR #6472 fixes the same issue (#6443) and also stops the stale model list, so we are keeping that one and closing this PR. You are welcome to contribute again. |
… follows
Fixes #6443
Summary
Moved where the trailing full stop gets stripped from the provider's status message, inside credentialStatusLine() in cardCopy.ts.
The old code stripped the full stop from every message, always — even when nothing was going to be appended after it. When a key was rejected, this caused the message to show as "OpenAI rejected this key (401)Nothing has been saved." with no space or punctuation between the two sentences.
The full stop should only be stripped when a "· N models fetched" suffix is about to be added right after it — that's the actual reason the strip exists. Now the strip only happens inside the branch where modelCount is not null. When modelCount is null, the message is returned untouched, full stop included.
Testing
Verified locally
Ran the existing unit test suite for this file with pnpm vitest — all 23 tests pass, including the updated test for this case.
Added or updated tests
Updated the test "says nothing about a fetch that did not happen" in provider-card-copy.test.ts — it was asserting the old buggy output (full stop missing). It now asserts the full stop is preserved.
QA follow-up
N/A
Demo
This is a text/logic-only fix — there is no UI to screenshot. As evidence, here is the local test run showing all 23 tests passing after the change, including the updated test for this exact bug:

Checklist
Contributor Resources