Phase 2: Contact form with email delivery #3

Open
opened 2026-05-09 02:46:30 +00:00 by forgejo_admin · 1 comment
Contributor

Type

Feature

Lineage

Decomposed from #1 — Phase 2 of 4. Depends on #2 (scaffold).

Repo

forgejo_admin/pal-enterprises

User Story

As a visitor, I want to submit a contact form to inquire about services or request an account, so that I can reach Lucas without needing a login.

Context

Add a contact form at /contact that collects name, email, message type (services inquiry / IT support / account request / other), and message body. Submissions are delivered via Action Mailer — no database storage. The form uses Turbo for a smooth submit experience.

File Targets

Files to create:

  • app/controllers/contacts_controller.rb — new + create actions
  • app/views/contacts/new.html.erb — contact form with Tailwind styling
  • app/views/contacts/thank_you.html.erb — confirmation page
  • app/mailers/contact_mailer.rb — delivers submission to admin
  • app/views/contact_mailer/new_inquiry.html.erb — email template
  • config/routes.rb — add /contact routes

Files to modify:

  • app/views/pages/home.html.erb — add "Contact" link
  • app/views/layouts/application.html.erb — add Contact to nav

Acceptance Criteria

  • Contact form at /contact renders with all fields
  • Form validates presence of name, email, and message
  • Successful submission delivers email to admin
  • Turbo-powered submit shows confirmation without full page reload
  • Invalid submission re-renders form with errors
  • Landing page links to contact form

Test Expectations

  • Unit test: ContactsController validates required fields
  • Unit test: ContactMailer generates correct email
  • Run command: bin/rails test

Constraints

  • No database model — contact form is stateless
  • Use Action Mailer with SMTP config (can use letter_opener in dev)
  • Message type field uses a select dropdown, not free text

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • pal-enterprises — project
### Type Feature ### Lineage Decomposed from #1 — Phase 2 of 4. Depends on #2 (scaffold). ### Repo `forgejo_admin/pal-enterprises` ### User Story As a visitor, I want to submit a contact form to inquire about services or request an account, so that I can reach Lucas without needing a login. ### Context Add a contact form at `/contact` that collects name, email, message type (services inquiry / IT support / account request / other), and message body. Submissions are delivered via Action Mailer — no database storage. The form uses Turbo for a smooth submit experience. ### File Targets Files to create: - `app/controllers/contacts_controller.rb` — new + create actions - `app/views/contacts/new.html.erb` — contact form with Tailwind styling - `app/views/contacts/thank_you.html.erb` — confirmation page - `app/mailers/contact_mailer.rb` — delivers submission to admin - `app/views/contact_mailer/new_inquiry.html.erb` — email template - `config/routes.rb` — add `/contact` routes Files to modify: - `app/views/pages/home.html.erb` — add "Contact" link - `app/views/layouts/application.html.erb` — add Contact to nav ### Acceptance Criteria - [ ] Contact form at `/contact` renders with all fields - [ ] Form validates presence of name, email, and message - [ ] Successful submission delivers email to admin - [ ] Turbo-powered submit shows confirmation without full page reload - [ ] Invalid submission re-renders form with errors - [ ] Landing page links to contact form ### Test Expectations - [ ] Unit test: ContactsController validates required fields - [ ] Unit test: ContactMailer generates correct email - Run command: `bin/rails test` ### Constraints - No database model — contact form is stateless - Use Action Mailer with SMTP config (can use letter_opener in dev) - Message type field uses a select dropdown, not free text ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `pal-enterprises` — project
Author
Contributor

Scope Review: NEEDS_REFINEMENT

Review note: review-1179-2026-05-09

Significant scope drift between board title, issue spec, and codebase state. Multiple contradictions need resolution before an agent can execute cleanly.

  • Board title vs issue mismatch: Board says "business name, logo, calendar redirect" but issue spec has "name, email, message type, message body" -- none of the board's extra fields appear in the spec.
  • Repo field wrong: Issue says forgejo_admin/pal-enterprises but actual repo is ldraney/pal-enterprises.
  • File targets stale: 3 files listed as "to create" already exist; existing implementation uses a DB-backed Lead model, contradicting the "no database model" constraint.
  • Missing arch note: No arch-rails-app note exists in pal-e-docs -- needs creation.
  • Tailwind ordering risk: Views use Tailwind classes but board item #1188 plans to remove Tailwind. Ordering dependency undocumented.
  • Turbo AC not implemented: AC requires "Turbo-powered submit" but no Turbo frames/streams exist in the contact form.
## Scope Review: NEEDS_REFINEMENT Review note: `review-1179-2026-05-09` Significant scope drift between board title, issue spec, and codebase state. Multiple contradictions need resolution before an agent can execute cleanly. - **Board title vs issue mismatch**: Board says "business name, logo, calendar redirect" but issue spec has "name, email, message type, message body" -- none of the board's extra fields appear in the spec. - **Repo field wrong**: Issue says `forgejo_admin/pal-enterprises` but actual repo is `ldraney/pal-enterprises`. - **File targets stale**: 3 files listed as "to create" already exist; existing implementation uses a DB-backed `Lead` model, contradicting the "no database model" constraint. - **Missing arch note**: No `arch-rails-app` note exists in pal-e-docs -- needs creation. - **Tailwind ordering risk**: Views use Tailwind classes but board item #1188 plans to remove Tailwind. Ordering dependency undocumented. - **Turbo AC not implemented**: AC requires "Turbo-powered submit" but no Turbo frames/streams exist in the contact form.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/pal-enterprises#3
No description provided.