Review: Projects tab: project request and management

review-1821-2026-07-17 Review

review needs-refinement

Verdict: NEEDS_REFINEMENT

Board item #1821 — Forgejo issue ldraney/intelligentstaffingsystems#51. Feature type, sprint:B, 5 points.

Template Completeness

  • [x] Type — Feature
  • [x] Lineage
  • [x] Repo
  • [x] User Story
  • [x] Context
  • [x] File Targets
  • [x] Feature Flag — None (acceptable; no feature-flags doc in repo)
  • [x] Acceptance Criteria
  • [x] Test Expectations
  • [x] Constraints
  • [x] Checklist
  • [x] Related

Traceability

  • [x] story:projects label present
  • [ ] story note MISSING — project-iss user-stories section has no "projects" key. Existing keys: project-setup, landing-page, registration, auth, dashboard, navigation, catalog, messaging, profile, admin, ios-app, domains, ui-ux. [SCOPE] Create user story entry "projects" on project-iss user-stories section.
  • [x] arch:rails label present
  • [ ] arch note MISSING — search for arch-rails returned no results. Note: arch:rails is shared across ~15 board items as a general-purpose label for the Rails app. [SCOPE] Create architecture note arch-rails for the Rails application component, or decide whether this is an intentional general-purpose label that doesn't need a backing note.
  • [x] Forgejo issue — ldraney/intelligentstaffingsystems#51, state: open

File Targets

  • [ ] app/controllers/projects_controller.rb — ISSUE: Listed as "create" but already EXISTS as a stub from #49 (commit bf5f912). Contains an empty index action. Should say "modify/extend" not "create."
  • [ ] app/views/projects/index.html.erb — ISSUE: Listed as "create" but already EXISTS as a stub from #49. Contains empty-state placeholder. Should say "modify" not "create."
  • [x] app/views/projects/new.html.erb — verified does not exist, correctly listed as create
  • [x] app/views/projects/_project_card.html.erb — verified does not exist, correctly listed as create
  • [x] app/models/project_request.rb — verified does not exist, correctly listed as create
  • [x] app/assets/stylesheets/projects.css — verified does not exist, correctly listed as create
  • [x] db/migrate/XXX_create_project_requests.rb — no project-related migrations exist, correctly listed as create
  • [ ] config/routes.rb — MISSING from file targets. Currently has resources :projects, only: %i[index]. Needs :new, :create actions added.
  • [ ] test/controllers/projects_controller_test.rb — MISSING from file targets. Already EXISTS as stub tests from #49 (6 tests for index access and empty state). Needs extension for new/create actions. Mentioned in Test Expectations but not File Targets.
  • [ ] test/models/project_request_test.rb — MISSING from file targets. Does not exist. Mentioned in Test Expectations but not File Targets.

Repo Placement

OK — issue filed on ldraney/intelligentstaffingsystems, all work targets that repo. No cross-repo impact.

Dependencies

  • #49 (tab bar restructure) — in validation column. Created the stub controller, view, routes, and tests that this ticket extends. Already merged to main (commit bf5f912). Not a blocker.
  • #56 (CRM, Sprint C) — forward dependency. Issue body says "admin sees requests from the CRM tab, not from here." The CRM ticket will consume ProjectRequest records. Not a blocker for this ticket, but documents a downstream consumer.
  • No other dependencies found on the board. No blockers.

Acceptance Criteria

8 criteria total. Most are testable by an agent. One issue:
  • AC #6: "Project cards display for users with active projects: name, status, description" — The ticket only defines a ProjectRequest model, not a Project model. No status field or lifecycle is defined on the model. It is unclear what makes a request become an "active project" or what status values exist. The agent cannot implement this AC without clarification on the data model. This needs a status field defined (e.g., submitted, active, completed) or clarification that all submitted requests show as cards.
  • Other AC are clear and testable.

Blast Radius

  • Navigation helper (app/helpers/navigation_helper.rb:17) — already references :projects tab with path /projects for lead/client/admin roles. No changes needed here.
  • Tab bar tests (test/controllers/tab_bar_test.rb) — already verify projects tab link. Additive changes to the controller should not break existing tests.
  • Existing stub tests (test/controllers/projects_controller_test.rb) — 6 tests verify index access and empty state. Extending the controller is additive.
  • No similar pattern bugs found elsewhere. The Lead model has has_many :messages but no has_many :project_requests yet — this needs to be added.

Decomposition Assessment

Two of three 5-minute rule criteria exceeded:
  • >3 file targets across >2 repos — NO (1 repo) — does not trigger
  • >5 acceptance criteria — YES (8 AC) — triggers
  • Estimated agent work >5 minutes — YES (~10 minutes: model + migration + controller expansion + 3 views + CSS + routes + 2 test files) — triggers
NEEDS DECOMPOSITION — route to skill-decompose-ticket. Suggested natural split:
  • Sub-ticket 1: ProjectRequest model layer — model, migration, model tests, has_many on Lead. (~3 files, 2 AC)
  • Sub-ticket 2: Controller + views + routes — controller expansion, routes update, index.html.erb update, new.html.erb, project card partial, projects.css, controller test expansion. (~7 files, 6 AC)

Recommendation

  • [SCOPE] Create user story entry "projects" on project-iss user-stories section.
  • [SCOPE] Create architecture note arch-rails for the Rails application component (shared across ~15 board items).
  • [BODY] Fix file targets: app/controllers/projects_controller.rb and app/views/projects/index.html.erb already exist as stubs from #49 — change "create" to "modify."
  • [BODY] Add missing file target: config/routes.rb — add :new, :create to projects resource.
  • [BODY] Add missing file targets: test/controllers/projects_controller_test.rb (exists, extend) and test/models/project_request_test.rb (create).
  • [BODY] Add has_many :project_requests to Lead model in file targets.
  • [BODY] Clarify AC #6: define a status field on ProjectRequest (e.g., submitted/active/completed) or clarify that all requests display as cards.
  • [DECOMPOSE] 8 AC, ~10 file targets, estimated ~10 minutes — route to skill-decompose-ticket. Natural split: model layer sub-ticket + UI layer sub-ticket.