Replace first/last name with single Name field on profile edit #226

Closed
opened 2026-06-15 12:20:29 +00:00 by ldraney · 0 comments
Owner

Type

Feature

Lineage

Standalone — discovered during profile form review post-#217 merge.

Repo

ldraney/landscaping-assistant

User Story

As a landscaping client
I want to enter a single name instead of separate first/last name
So that I can use whatever name I want as a property reference label

Context

The profile edit form asks for separate "First Name" and "Last Name" fields. For a landscaping business, the name is just a reference label to identify whose property is being worked on — not a formal identity record. Clients should be able to enter whatever name they want (nickname, business name, full name, etc.). A single "Name" field is simpler and more appropriate.

File Targets

Files the agent should modify or create:

  • app/views/profile/edit.html.erb -- merge two name inputs into one
  • app/controllers/profile_controller.rb -- change param from first_name/last_name to name, update validation
  • spec/requests/profile_spec.rb -- update all param references

Files the agent should NOT touch:

  • app/services/keycloak_admin_service.rb -- still writes to firstName, no change needed
  • app/controllers/sessions_controller.rb -- reads given_name on login, unaffected

Feature Flag

none — simple form field change, no new workflow or external integration.

Acceptance Criteria

  • Profile edit form shows single "Name" field instead of First Name + Last Name
  • Value stores in Keycloak's firstName field (no schema change needed)
  • Blank name rejected with "Name is required" validation
  • Session display name updates from the new field

Test Expectations

  • Unit test: profile spec validates single name param accepted
  • Unit test: blank name validation returns correct error message
  • Run command: bundle exec rspec spec/requests/profile_spec.rb

Constraints

  • Must store in Keycloak's existing firstName field — no Keycloak schema changes
  • No migration needed (no local DB column for name)

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • landscaping-assistant -- project this affects
### Type Feature ### Lineage Standalone — discovered during profile form review post-#217 merge. ### Repo `ldraney/landscaping-assistant` ### User Story As a landscaping client I want to enter a single name instead of separate first/last name So that I can use whatever name I want as a property reference label ### Context The profile edit form asks for separate "First Name" and "Last Name" fields. For a landscaping business, the name is just a reference label to identify whose property is being worked on — not a formal identity record. Clients should be able to enter whatever name they want (nickname, business name, full name, etc.). A single "Name" field is simpler and more appropriate. ### File Targets Files the agent should modify or create: - `app/views/profile/edit.html.erb` -- merge two name inputs into one - `app/controllers/profile_controller.rb` -- change param from first_name/last_name to name, update validation - `spec/requests/profile_spec.rb` -- update all param references Files the agent should NOT touch: - `app/services/keycloak_admin_service.rb` -- still writes to firstName, no change needed - `app/controllers/sessions_controller.rb` -- reads given_name on login, unaffected ### Feature Flag none — simple form field change, no new workflow or external integration. ### Acceptance Criteria - [ ] Profile edit form shows single "Name" field instead of First Name + Last Name - [ ] Value stores in Keycloak's firstName field (no schema change needed) - [ ] Blank name rejected with "Name is required" validation - [ ] Session display name updates from the new field ### Test Expectations - [ ] Unit test: profile spec validates single name param accepted - [ ] Unit test: blank name validation returns correct error message - Run command: `bundle exec rspec spec/requests/profile_spec.rb` ### Constraints - Must store in Keycloak's existing firstName field — no Keycloak schema changes - No migration needed (no local DB column for name) ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `landscaping-assistant` -- project this affects
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/landscaping-assistant#226
No description provided.