Add Person page with profile, property, and platform sections #145

Merged
ldraney merged 1 commit from 137-person-icon into main 2026-06-07 03:15:27 +00:00
Owner

Summary

Routes the Person nav icon (slot 3) to /person instead of root_path. The Person page shows My Profile (all users), a crew join request placeholder (all users), My Property (client only), and a Platform link (super_admin only).

Changes

  • app/controllers/person_controller.rb -- new controller with index action, no role restriction (all authenticated users)
  • app/views/person/index.html.erb -- Person landing page with role-conditional sections (My Profile, Join a Crew, My Property, Platform)
  • config/routes.rb -- added resources :person, only: [:index]
  • app/views/layouts/application.html.erb -- updated Person icon link from root_path to person_index_path, simplified is-active logic to controller_name == 'person'
  • app/assets/stylesheets/application.css -- Person component styles (profile grid, role badges, section headings, placeholder form) following design token conventions
  • spec/requests/person_spec.rb -- 23 request specs covering all 5 roles, dev mode, unauthenticated redirect, My Property visibility (client only), Platform visibility (super_admin only)

Test Plan

  • bundle exec rspec -- 196 examples, 0 failures (173 existing + 23 new)
  • All 5 roles can access /person and see My Profile
  • Client role sees My Property section; other roles do not
  • Super_admin sees Platform section with Feature Flags link; other roles do not
  • Unauthenticated users redirect to Keycloak when configured
  • Dev mode (no Keycloak) shows all sections with fallback values
  • Platform sub-nav (gear icon, lines 69-74) unchanged

Review Checklist

  • No changes to Platform sub-nav (lines 69-74 of layout)
  • No changes to feature_flags_controller or its views
  • No feature flags added
  • CSS follows design token conventions (no Tailwind, no inline styles, no !important, no #id selectors)
  • current_user treated as session hash, not ActiveRecord
  • Dev mode graceful degradation (page renders without Keycloak)
  • Forgejo issue: #137

Closes #137

  • #107 / PR #136 -- created 5-slot nav with Person placeholder
  • #130 / PR #144 -- Platform feature flags UI (already under Person)
  • #123 -- Client request UI (My Property detail, future scope)
## Summary Routes the Person nav icon (slot 3) to `/person` instead of `root_path`. The Person page shows My Profile (all users), a crew join request placeholder (all users), My Property (client only), and a Platform link (super_admin only). ## Changes - `app/controllers/person_controller.rb` -- new controller with index action, no role restriction (all authenticated users) - `app/views/person/index.html.erb` -- Person landing page with role-conditional sections (My Profile, Join a Crew, My Property, Platform) - `config/routes.rb` -- added `resources :person, only: [:index]` - `app/views/layouts/application.html.erb` -- updated Person icon link from `root_path` to `person_index_path`, simplified `is-active` logic to `controller_name == 'person'` - `app/assets/stylesheets/application.css` -- Person component styles (profile grid, role badges, section headings, placeholder form) following design token conventions - `spec/requests/person_spec.rb` -- 23 request specs covering all 5 roles, dev mode, unauthenticated redirect, My Property visibility (client only), Platform visibility (super_admin only) ## Test Plan - `bundle exec rspec` -- 196 examples, 0 failures (173 existing + 23 new) - All 5 roles can access `/person` and see My Profile - Client role sees My Property section; other roles do not - Super_admin sees Platform section with Feature Flags link; other roles do not - Unauthenticated users redirect to Keycloak when configured - Dev mode (no Keycloak) shows all sections with fallback values - Platform sub-nav (gear icon, lines 69-74) unchanged ## Review Checklist - [x] No changes to Platform sub-nav (lines 69-74 of layout) - [x] No changes to feature_flags_controller or its views - [x] No feature flags added - [x] CSS follows design token conventions (no Tailwind, no inline styles, no `!important`, no `#id` selectors) - [x] `current_user` treated as session hash, not ActiveRecord - [x] Dev mode graceful degradation (page renders without Keycloak) ## Related Notes - Forgejo issue: #137 Closes #137 ## Related - #107 / PR #136 -- created 5-slot nav with Person placeholder - #130 / PR #144 -- Platform feature flags UI (already under Person) - #123 -- Client request UI (My Property detail, future scope)
Add Person page with profile, property, and platform sections
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
CI / scan_ruby (pull_request) Has been cancelled
CI / scan_js (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
4c96f69a28
Route the Person nav icon (slot 3) to /person instead of root_path.
The Person page shows My Profile (all users), a crew join request
placeholder (all users), My Property (client only), and a Platform
link (super_admin only). Adds 23 request specs covering all 5 roles.

Closes #137

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ldraney deleted branch 137-person-icon 2026-06-07 03:15:27 +00:00
Sign in to join this conversation.
No reviewers
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!145
No description provided.