Skip to content

feat: add visual feedback when profile link is copied#98

Open
aditya2206-afk wants to merge 4 commits into
vishnukothakapu:mainfrom
aditya2206-afk:feature/copy-link-feedback
Open

feat: add visual feedback when profile link is copied#98
aditya2206-afk wants to merge 4 commits into
vishnukothakapu:mainfrom
aditya2206-afk:feature/copy-link-feedback

Conversation

@aditya2206-afk

@aditya2206-afk aditya2206-afk commented May 15, 2026

Copy link
Copy Markdown

Fixes #94

Description

Added visual feedback when the profile link is copied.

Changes Made

  • Added toast notification on copy
  • Auto-dismiss after 2 seconds
  • Maintained UI consistency

GSSoC

Participant

Summary by CodeRabbit

  • Bug Fixes

    • Added robust error handling for clipboard copy operations with clear failure messaging.
  • Improvements

    • Copy actions now write full https profile/link URLs and show success confirmations.
    • External links opened in a new tab now use safer link attributes.
  • UI

    • Minor layout adjustments around QR and copy controls while preserving copied-state feedback.
  • Accessibility

    • Copy controls include descriptive aria labels and titles for assistive support.

Review Change Stack

@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

@aditya2206-afk is attempting to deploy a commit to the vishnukothakapu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • dev.db is excluded by !**/*.db

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f2572124-20b1-4af5-ac48-95a413c5b0fd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

LinkIdCard and LinkItem convert their copy handlers to async/await with try/catch, write full https://linkid.qzz.io/... URLs to the clipboard, and show success or error toasts. LinkIdCard adds aria-label/title and tweaks QR markup; LinkItem updates icon imports and external-link JSX wiring.

Changes

Clipboard Error Handling with User Feedback

Layer / File(s) Summary
LinkItem imports and JSX wiring
app/dashboard/LinkItem.tsx
Reformatted lucide-react imports; external link now rendered via Button asChild wrapping an <a>; save/edit/delete flows unchanged.
Async clipboard handlers with success/error toasts
app/dashboard/LinkIdCard.tsx, app/dashboard/LinkItem.tsx
copyProfile and copy converted to async functions that await navigator.clipboard.writeText(...) inside try/catch; they copy https://linkid.qzz.io/... URLs and show distinct success or error toast messages while preserving copied-state timing.
LinkIdCard QR and accessibility updates
app/dashboard/LinkIdCard.tsx
QR wrapper markup adjusted; copy button gains aria-label and title attributes; Open anchor includes rel="noopener noreferrer"; icon swap and onClick wiring remain the same.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibble keys and mend the flow,
A tidy copy, then a glow.
If clipboard trips, a little chime—
A toast that says, "Try once more time."
Hoppity hops, the link's in tow.

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding visual feedback when a profile link is copied, which aligns with the core objective.
Linked Issues check ✅ Passed All acceptance criteria from issue #94 are met: correct profile URL copied, toast confirmation appears immediately, auto-dismisses after ~2 seconds, follows existing UI styling, and no errors introduced.
Out of Scope Changes check ✅ Passed All changes in LinkIdCard.tsx and LinkItem.tsx are directly scoped to implementing toast notifications and clipboard functionality for profile link copying as required by issue #94.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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 `@app/dashboard/LinkIdCard.tsx`:
- Line 18: The clipboard copy currently writes a scheme-less URL; update the
navigator.clipboard.writeText call in LinkIdCard.tsx (the place where you build
the profile link) to copy a fully-qualified URL by prepending the scheme (e.g.,
"https://") so it writes "https://linkid.qzz.io/${username}" instead of
"linkid.qzz.io/${username}".

In `@app/dashboard/LinkItem.tsx`:
- Around line 41-43: The copy action currently writes a scheme-less path via
navigator.clipboard.writeText(`linkid.qzz.io/${username}/${link.platform}`); —
change it to write a full URL by prepending the scheme (e.g. use
`https://linkid.qzz.io/${username}/${link.platform}`) so pasted output is
clickable; update the code in LinkItem.tsx where navigator.clipboard.writeText
is called and ensure the template uses the existing username and link.platform
variables unchanged.
- Around line 113-126: The JSX in the LinkItem component nests a <Button> inside
an <a>, which is invalid; change to render the <Button> with asChild and place
the <a> as the child so the anchor becomes the actual interactive element.
Specifically, in the block using link.url / link.label / link.platform and the
ExternalLink icon, replace the outer <a> wrapping the <Button> with <Button
asChild> and move href, target, rel, aria-label (and any link-specific props)
onto the inner <a> so the anchor receives those attributes while the Button
styles/behavior are preserved; keep title and the ExternalLink element as
before. Ensure you update the JSX in the LinkItem component (the fragment using
Button, ExternalLink, and link.url/link.label/link.platform) accordingly.
🪄 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: 301077c8-8442-4f69-a09b-a0fd4c4cf8cd

📥 Commits

Reviewing files that changed from the base of the PR and between 2ce750f and b96e334.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • app/dashboard/LinkIdCard.tsx
  • app/dashboard/LinkItem.tsx

Comment thread app/dashboard/LinkIdCard.tsx Outdated
Comment thread app/dashboard/LinkItem.tsx
Comment thread app/dashboard/LinkItem.tsx Outdated
@aditya2206-afk

Copy link
Copy Markdown
Author

Thanks for the review ✅

Updated the copy actions to use fully-qualified URLs (https://) and refactored nested interactive elements using the asChild pattern for improved accessibility.

Please let me know if any further changes are needed.

@aparna24bce11388

Copy link
Copy Markdown

All issues fixed. Ready for review. Please approve workflow and merge.

@aditya2206-afk

Copy link
Copy Markdown
Author

Thanks for pointing that out ✅

Removed duplicate URL argument and corrected the nested button structure. Everything should now follow proper accessibility and clipboard usage.

Please let me know if anything else needs refinement.

@vercel

vercel Bot commented May 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
linkid Ready Ready Preview, Comment May 16, 2026 7:12am

@aditya2206-afk

Copy link
Copy Markdown
Author

@vishnukothakapu (or @aparna24bce11388 if they are the primary maintainer)

Hi, it looks like the Copilot PR Review / request-review check is failing due to a permission error (Resource not accessible by integration (HTTP 403)). This seems to be a repository-level configuration issue rather than a problem with the code in this PR.

Could you please take a look at this? If it's a non-blocking check, or if you can adjust the workflow permissions, the PR should be ready for merge.

Thanks for your time and guidance!

@aditya2206-afk

Copy link
Copy Markdown
Author

✅ All checks (except Copilot permission issue) have passed.
✅ Vercel deployment is successful.

Kindly review and merge the PR when possible. Thank you!

@vishnukothakapu

Copy link
Copy Markdown
Owner

Hi @aditya2206-afk, the Copilot review error is from our workflow side, not from your PR. Your PR looks good and the required checks have passed successfully.

Please wait for the mentor review. Once the mentor review is completed, the PR will be merged.

@vishnukothakapu

Copy link
Copy Markdown
Owner

Hi @aditya2206-afk, could you please resolve the merge conflicts as well?

@aditya2206-afk

Copy link
Copy Markdown
Author

✅ Merge conflicts resolved successfully.

Kindly review and merge the PR when possible. Thank you!

@aditya2206-afk

Copy link
Copy Markdown
Author

✅ All checks are passing and conflicts resolved.

Kindly merge when possible. Thank you!

@vishnukothakapu

Copy link
Copy Markdown
Owner

✅ All checks are passing and conflicts resolved.

Kindly merge when possible. Thank you!

Hi @aditya2206-afk, Please wait for the mentor review. Once the mentor review is completed, the PR will be merged.

@vedhapprakashni

Copy link
Copy Markdown
Collaborator

hey @aditya2206-afk. pls review ur pr again:

1.the last commit deleted the package-lock.json file
2. dev.db must not be commited and must be added in the gitignore

@vedhapprakashni

Copy link
Copy Markdown
Collaborator

@aditya2206-afk any updates?

@vedhapprakashni

Copy link
Copy Markdown
Collaborator

hi @aditya2206-afk. pls update your progress and resolve conflicts

@vishnukothakapu

Copy link
Copy Markdown
Owner

Hi @aditya2206-afk ,
There is currently a merge conflict in app/dashboard/LinkItem.tsx that needs to be resolved before the PR can be merged.
Please resolve the conflicts, push the updated changes.

@vedhapprakashni

Copy link
Copy Markdown
Collaborator

hey @aditya2206-afk. Pls resolve conflicts

@Karanjot786

Copy link
Copy Markdown

Hey @aditya2206-afk! Saw your work on GSSoC 2026.

We are building TermUI, a TypeScript terminal UI framework with React-style hooks and JSX, rendered entirely in the terminal.

We have 99 unassigned GSSoC issues open, including new widgets, hooks, and CLI tooling. Your TypeScript background transfers directly.

Karanjot, TermUI maintainer

@vedhapprakashni

Copy link
Copy Markdown
Collaborator

hey @aditya2206-afk. pls resolve conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Add Visual Feedback When Profile Link Is Copied

5 participants