Remove UsernameCard from profile page - #6
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request removes the unused Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Round-2 reviewer C flagged the link-level analogue of round-1's
top-level forward-compat issue: the additional-links save loop
reconstructed each {url, label} from scratch, dropping any per-item
extras a future writer (CLI or feature) might add (e.g. verified,
addedAt). Each row now carries a `loadedRef` to the original record
item; the save spreads loadedRef under the new url/label, mirroring
the same pattern used for the top-level metadata builder. Cleared
labels still come off the wire because `label: undefined` is dropped
by JSON.stringify.
Same change adds a stable per-row id (round-2 reviewer A nit #4 / C
suggestion #2): inputs are now React-keyed by `row.id` instead of array
index, so removing a middle row no longer reuses DOM nodes / focus /
selection from a different row.
Smaller round-2 nits in the same diff:
- Trash button gains `disabled={isSaving}` for parity with Add link
(B nit #4); adds disabled-style classes for visual feedback.
- Inline comment on the Type radio onChange documents that
typeOtherText is intentionally preserved when toggling Other → preset
(A nit #2). Save logic is unaffected.
- profile-client.tsx: the empty-state branch's redundant
`editHref &&` guard was removed (B nit #6); converted the wrapping
`(hasDetails || editHref) && <div>...` block to a clean ternary that
TypeScript narrows correctly. Also reflowed indentation inside the
Details `<dl>` after the ternary collapse.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
UsernameCardcomponent from the dashboard profile pagepdsUrldestructure fromuseAuth()and theUsernameCarddynamic importOne file changed, 4 lines removed.