Skip to content

Polish trade page and inquiry form copy (#122) - #123

Merged
spizeck merged 1 commit into
mainfrom
copy/issue-122-trade-page
Sep 24, 2026
Merged

spizeck merged 1 commit into
mainfrom
copy/issue-122-trade-page

Conversation

@spizeck

@spizeck spizeck commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Rewrites the customer-facing copy across the /trade journey — page intro, "What to expect" bullets, form heading, labels, submit button, success state, and the API error strings the form displays verbatim — so it reads like Deep Dive Brewing rather than generic B2B filler. No functional, schema, analytics, or backend changes.

Closes #122

Changes

app/(pages)/trade/page.tsx

  • Meta/OG/Twitter descriptions: "Stock Deep Dive Brewing Co beer…" → "Carry island-brewed Deep Dive beer at your bar, restaurant, hotel, or shop. We supply trade accounts on Saba, SXM, and nearby islands." (same established geographic scope)
  • Intro: "Interested in carrying Deep Dive Brewing Co at your bar, restaurant, hotel, or retail location? We partner with accounts across Saba, SXM, and the surrounding islands." → "We brew on Saba and work with bars, restaurants, hotels, shops, and distributors across Saba, SXM, and nearby islands. Tell us about your business and we'll take it from there."
  • Bullets: "keg and can formats" → "kegs and cans"; "Reliable supply from our Saba brewery." → "Steady supply from our brewery on Saba."; "shipping coordination" → "coordinated shipping"; "tap handle assets" → "tap handles"
  • Form section heading: "Get in Touch" → "Send an inquiry"
  • H1 "Trade & Wholesale", "What to expect" heading, and the direct-email footer are unchanged.

components/trade-inquiry-form.tsx

  • Labels to sentence case (matching the tour inquiry dialog convention): "Business Name" → "Business name", "Contact Name" → "Your name", "Venue Type" → "Business type" (options include Retail/Distributor/Other — not all are venues)
  • Optional fields marked: "Phone / WhatsApp (optional)", "Message (optional)"; select placeholder "Select type..." → "Choose one..."
  • Button: "Submit Inquiry" → "Send inquiry" (submitting state "Sending..." unchanged)
  • Success: "Thank you for your inquiry. / We'll be in touch soon." → "Thanks for reaching out. / Your inquiry is in our inbox. The Deep Dive team will follow up." — confirms receipt + states the next step without any response-time promise
  • Client fallback: "Submit failed" → "Something went wrong. Please try again."

lib/trade-leads-common.ts + app/api/trade-inquiry/route.ts — error strings the form displays verbatim:

  • "Missing required fields: businessName, contactName, email, venueType." → "Please fill in all required fields." (no more camelCase API keys shown to customers)
  • "Field exceeds maximum length: X." → "Please shorten the {label} field." via a human-readable field-label map
  • "Failed to submit inquiry." → "Something went wrong on our end. Please try again."
  • Please enter a valid email address. (Trade inquiry API accepts malformed email addresses #117), the 429 message, and all behavior/ordering are unchanged.

Tests: updated for intentional wording changes only — tests/lib/trade-leads.test.ts (new error strings, still asserting status/submit-call invariants), smoke-tests/{smoke,accessibility,analytics}.spec.ts (new labels/button name; the success test now asserts the actual success copy instead of a weak /inquiry/i match).

Docs: docs/admin/trade-inquiries.md field table updated to the new displayed labels.

Verification

  • npx tsc --noEmit — clean
  • npm run lint — clean (one pre-existing jsx-ast-utils notice, also on main)
  • npm test — 350 pass
  • npm run test:rules — 29 pass
  • npm run build — succeeds
  • npx playwright test — 117 pass
  • npm run check:md-links — all resolve
  • npm run check:react-versions — match
  • npm audit --omit=dev — 0 vulnerabilities
  • Visual review on the production build at 1280px and 375px — initial form, success state (mocked ok: true), and a 400 validation error all render cleanly; no wrapping/overflow issues; cookie banner dismissed for shots.
  • No em dashes in any touched customer-facing string.

Risk / deployment notes

  • No secrets, credentials, or private data were committed.
  • No new business claims: geography stays at the established "Saba, SXM, and nearby islands"; the existing keg/can, delivery, and marketing-support claims are reworded, not expanded. No pricing, minimums, response-time, or ordering-process claims added.
  • Field names, submitted values (venueType options unchanged), analytics events (trade_form_start/success/error), honeypot, rate limiting, and accessibility semantics (labels, required, role="status") are all unchanged.
  • Note for reviewers: the two API error messages are also the API's machine-readable-ish surface; they're now customer-friendly strings rather than camelCase field names — intentional per Improve trade page and inquiry form copy #122's "no technical details to customers" requirement.

Generated with Devin

Summary by Sourcery

Polish the trade and wholesale inquiry experience with consistent, customer-friendly copy across the page, form, API responses, tests, and documentation.

Enhancements:

  • Refresh the trade page and inquiry form with clearer, more brand-aligned customer-facing copy.
  • Replace technical API validation and submission errors with customer-friendly messages while preserving existing behavior.

Documentation:

  • Update the trade inquiry administration documentation to match the revised form labels.

Tests:

  • Update unit and smoke tests to reflect the revised labels, controls, success state, and error messages.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @spizeck, this account has used its review budget of 1,500,000 diff characters for the last 7 days.

You can request another review in 11 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
deepdivebrewing-web Ready Ready Preview Sep 24, 2026 12:47am UTC

Request Review

@sourcery-ai

sourcery-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Reviewer's Guide

This copy-only PR polishes the /trade page and inquiry form, including SEO text, labels, actions, success state, and verbatim API errors, while retaining the existing schema, submission behavior, analytics, accessibility semantics, and business claims; tests and admin documentation are updated accordingly.

Flow diagram for the polished trade inquiry experience

flowchart TD
    TradePage[Trade page] --> Intro[Updated brewery and trade-account copy]
    Intro --> InquirySection[Send an inquiry section]
    InquirySection --> Form[Trade inquiry form]
    Form -->|valid submission| Success[Receipt confirmation and follow-up message]
    Form -->|validation or server error| FriendlyError[Customer-friendly error message]
    Form -.-> Invariants[Existing fields, analytics, accessibility, and submission behavior]
Loading

File-Level Changes

Change Details Files
Refresh the trade page’s customer-facing positioning and wholesale messaging.
  • Rewrite SEO metadata and introductory copy around island-brewed beer and established service geography.
  • Polish expectation bullets without adding new business claims.
  • Rename the form section heading to “Send an inquiry.”
app/(pages)/trade/page.tsx
Update trade inquiry form copy while preserving its behavior and accessibility structure.
  • Convert labels to sentence case and clarify optional fields and business-type selection.
  • Rename the submit action and replace success and client fallback messages with customer-friendly copy.
  • Keep field names, values, required state, analytics, honeypot, and submission flow unchanged.
components/trade-inquiry-form.tsx
Replace technical API validation and persistence errors with customer-facing messages.
  • Use a generic required-fields message instead of exposing API keys.
  • Map oversized fields to human-readable labels in validation responses.
  • Standardize server failure wording while preserving status codes and validation ordering.
lib/trade-leads-common.ts
app/api/trade-inquiry/route.ts
Align automated coverage and internal documentation with the revised displayed copy.
  • Update unit and Playwright assertions for labels, button text, error responses, and the success state.
  • Document the new displayed field labels for administrators.
tests/lib/trade-leads.test.ts
smoke-tests/smoke.spec.ts
smoke-tests/accessibility.spec.ts
smoke-tests/analytics.spec.ts
docs/admin/trade-inquiries.md

Assessment against linked issues

Issue Objective Addressed Explanation
#122 Review and improve the customer-facing copy across the complete /trade page and inquiry form so it uses a concise, approachable Deep Dive Brewing voice instead of generic B2B wording. ✅
#122 Make the inquiry journey clearer by improving the primary CTA, required/optional field wording, validation and error messages, and post-submit confirmation without changing form fields, accessibility semantics, analytics, or backend behavior. ✅
#122 Preserve established business facts and ensure the revised copy remains suitable for desktop and mobile layouts, contains no em dashes, and has corresponding documentation and test updates where wording changed. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

The /trade journey read like generic B2B copy. Rewrites the page intro,
"What to expect" bullets, form section heading, field labels (sentence case
to match the tour inquiry dialog; "Your name", "Business type"), submit
button, and success message in the brewery's voice. Optional fields are now
marked, and the server-side validation errors shown verbatim in the form no
longer leak camelCase API field names.

No behavioral, schema, analytics, or backend changes; venueType values and
server-side validation semantics are untouched.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

@spizeck
spizeck merged commit 2c00e97 into main Sep 24, 2026
4 checks passed
@spizeck
spizeck deleted the copy/issue-122-trade-page branch September 24, 2026 01:01

This branch was successfully deployed

1 active deployment
Preview — 150e6c4c Deployed Sep 24, 2026 by vercel[bot]
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.

Improve trade page and inquiry form copy

1 participant