Skip to content

Comments

refactor: extract public share email to shared constant#56

Draft
Copilot wants to merge 2 commits intofeature/invitefrom
copilot/sub-pr-54-again
Draft

refactor: extract public share email to shared constant#56
Copilot wants to merge 2 commits intofeature/invitefrom
copilot/sub-pr-54-again

Conversation

Copy link

Copilot AI commented Nov 22, 2025

📝 Description

Addresses feedback from PR #54 to eliminate magic string duplication of 'public@share.com' across the codebase.


✅ Changes Made

🔧 Refactoring

  • Created src/lib/constants.ts with PUBLIC_SHARE_EMAIL constant
  • Replaced 4 hardcoded instances across stake invitation flows:
    • src/app/stakes/invite/[id]/page.tsx
    • src/app/api/stakes/route.ts
    • src/app/api/stakes/[id]/share/route.ts (2 occurrences)

📋 Example Usage

Before:

await prisma.stakeInvitation.create({
  data: {
    inviteeEmail: 'public@share.com', // Placeholder for public shares
    // ...
  }
});

After:

import { PUBLIC_SHARE_EMAIL } from "@/lib/constants";

await prisma.stakeInvitation.create({
  data: {
    inviteeEmail: PUBLIC_SHARE_EMAIL,
    // ...
  }
});

⚡ Additional Notes

  • Centralizes public share email definition for easier maintenance
  • Eliminates risk of typos across stake invitation system

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Nov 22, 2025

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

Project Deployment Preview Comments Updated (UTC)
smart-todo Error Error Nov 22, 2025 11:51pm
smart-todo-wum3 Error Error Nov 22, 2025 11:51pm

Co-authored-by: chemist-god <117123746+chemist-god@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 22, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/smart-todo/smart-todo/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.17.1&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-11-22T23:40:37Z&#34;,&#34;project_hash&#34;:&#34;85c6752e&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/smart-todo/smart-todo/node_modules/.bin/prisma&#34;,&#34;cli_path_hash&#34;:&#34;e76bd0cf&#34;, (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/smart-todo/smart-todo/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.17.1&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-11-22T23:41:57Z&#34;,&#34;project_hash&#34;:&#34;85c6752e&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/smart-todo/smart-todo/node_modules/.bin/prisma&#34;,&#34;cli_path_hash&#34;:&#34;e76bd0cf&#34;, (dns block)
  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/smart-todo/smart-todo/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Address feedback on register API route implementation refactor: extract public share email to shared constant Nov 22, 2025
Copilot AI requested a review from chemist-god November 22, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants