Skip to content

feat: marketing production readiness — Phase 1 (report-issue site-wide) #47

@abdout

Description

@abdout

Goal

Wire the existing <ReportIssue /> component to be present on every page of the marketing site, with proper env validation, i18n, and form/toast conventions matching the rest of the repo.

Why

  • Component (src/components/report-issue.tsx) and server action (src/lib/actions/report-issue.ts) already exist but were uncommitted.
  • Today only the marketing footer mounts it — auth, wizard, chatbot, standalone routes have no report button.
  • The action throws at runtime because GITHUB_PERSONAL_ACCESS_TOKEN was never registered in src/env.mjs.
  • Component used inline fallback strings instead of the dictionary; raw useState form instead of repo idiom (RHF + Zod + sonner).

Changes

  • Mount <ReportIssue variant="icon" /> in src/app/[lang]/layout.tsx as a fixed bottom-start floating button (logical start-4 flips with RTL, on the opposite end from <Toaster>).
  • Add GITHUB_PERSONAL_ACCESS_TOKEN (optional) and GITHUB_REPO (defaulted to databayt/marketing) to src/env.mjs server schema + runtimeEnv.
  • Add common.reportIssue.* keys to en.json + ar.json. Component reads via useTranslations() instead of inline fallback map.
  • Refactor component to React Hook Form + Zod + shadcn <Form> + <Textarea>. Server action returns { error?, success? } (matches auth action convention) instead of throwing. Replace inline status text with sonner toasts.
  • Create .env.example with all required keys (no values). Update .gitignore to allow !.env.example past the .env* exclusion.
  • Keep the existing footer <ReportIssue variant="text" /> link as a discoverable affordance alongside the floating icon.

Test plan

  • pnpm dev boots clean.
  • /en, /ar, /en/login, /ar/login, /en/wizard all render 200 with the Bug icon visible bottom-end (start in logical).
  • Submitting the form creates a real GitHub issue in databayt/marketing (after PAT is set in Vercel env).
  • Toaster shows success in correct corner (RTL flips).

Out of scope (follow-up phases)

  • Phase 2: i18n sweep (chatbot, auth forms, expert-modal, wizard step labels, alt strings).
  • Phase 3: RTL physical → logical Tailwind utilities across UI primitives.
  • Phase 4: Viewport zoom (userScalable:false removal), responsiveness pass.
  • Phase 5: Re-enable TS errors, strip console pollution, restore real auth in header.
  • Phase 6: sitemap/robots, locale-aware not-found, dashboard route fix.

Plan file: ~/.claude/plans/resume-the-development-in-staged-pike.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions