Fall back gracefully when deployedRelative is null - #23
Conversation
Hero and PetCard interpolated pet.deployedRelative directly, which would render the literal string "null" if a deployed pet ever lacked deployedAt. No live path produces that today, but the display sites should not depend on it holding. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe dashboard now omits missing relative deployment text in the deployed-phase message and displays ChangesDeployment status display
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk:⚪ Minimal · up to This change prevents deployed pets from displaying the literal “null” while preserving existing output when relative time is available. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
User description
Summary
pet.deployedRelativedirectly into display strings, which would render the literal word "null" if a deployed pet'sdeployedRelativewere ever nullmarkDeployedalways setsdeployedAt, andtoDashboardPetonly computesdeployedRelativewhen it's present), but the display sites shouldn't rely on that invariant holdingdeployedRelativeis presentTest plan
pnpm typecheckpnpm lintpnpm test(15/15 passing)🤖 Generated with Claude Code
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Update the dashboard
HeroandPetCardcomponents to gracefully display deployed pets whendeployedRelativeis null, avoiding the literal “null” text while preserving existing output when a relative time is available.Latest Contributors(2)
Summary by CodeRabbit