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
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
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
src/components/report-issue.tsx) and server action (src/lib/actions/report-issue.ts) already exist but were uncommitted.GITHUB_PERSONAL_ACCESS_TOKENwas never registered insrc/env.mjs.useStateform instead of repo idiom (RHF + Zod + sonner).Changes
<ReportIssue variant="icon" />insrc/app/[lang]/layout.tsxas a fixed bottom-start floating button (logicalstart-4flips with RTL, on the opposite end from<Toaster>).GITHUB_PERSONAL_ACCESS_TOKEN(optional) andGITHUB_REPO(defaulted todatabayt/marketing) tosrc/env.mjsserver schema +runtimeEnv.common.reportIssue.*keys toen.json+ar.json. Component reads viauseTranslations()instead of inline fallback map.<Form>+<Textarea>. Server action returns{ error?, success? }(matches auth action convention) instead of throwing. Replace inline status text withsonnertoasts..env.examplewith all required keys (no values). Update.gitignoreto allow!.env.examplepast the.env*exclusion.<ReportIssue variant="text" />link as a discoverable affordance alongside the floating icon.Test plan
pnpm devboots clean./en,/ar,/en/login,/ar/login,/en/wizardall render 200 with the Bug icon visible bottom-end (start in logical).databayt/marketing(after PAT is set in Vercel env).Out of scope (follow-up phases)
userScalable:falseremoval), responsiveness pass.Plan file:
~/.claude/plans/resume-the-development-in-staged-pike.md