Project not found.

Review: feat: render project page note content on project show page (re-review)

review-1343-2026-06-06-r2 Review

review ready

Verdict: APPROVED

Re-review of board item #1343 after refinement. Previous review: review-1343-2026-06-06 (NEEDS_REFINEMENT). All blocking findings resolved.

Previous Findings Status

  • [x] [BODY] N+1 eager-load note -- FIXED. Context section now explicitly states: "The controller's show action currently does Project.includes(:notes, :repos) but does NOT include :page_note." New AC #10 added: "No N+1 queries -- page_note and its blocks are eager-loaded."
  • [x] [SCOPE] story note story-paldocs-project-pages -- CREATED. Note exists in pal-e-docs (note_type: doc, project: paldocs). Title: "User Story: Project Pages".
  • [x] [SCOPE] arch note arch-rails-views -- CREATED. Note exists in pal-e-docs (note_type: doc, project: paldocs). Title: "Architecture: Rails Views".

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage -- Standalone
  • [x] Repo -- ldraney/paldocs
  • [x] User Story
  • [x] Context (updated with eager-load note)
  • [x] File Targets
  • [x] Acceptance Criteria (10 items, including new eager-load AC)
  • [x] Test Expectations
  • [x] Constraints
  • [x] Checklist
  • [x] Related
All required sections for Feature type are present and complete.

Traceability

  • [x] story:project-pages label -- present on board item
  • [x] story note verified -- story-paldocs-project-pages exists in pal-e-docs
  • [x] arch:rails-views label -- present on board item
  • [x] arch note verified -- arch-rails-views exists in pal-e-docs
  • [x] Forgejo issue -- ldraney/paldocs#12, state: open
Minor note: The project-paldocs user-stories section still reads "No user-story notes created yet" -- the story note exists but the project page text was not updated to reference it. This is a project-page maintenance item, not a ticket scope blocker.

File Targets

  • [x] app/controllers/projects_controller.rb -- verified: exists (14 lines). Show action loads @project with includes(:notes, :repos). Context correctly identifies the missing :page_note eager-load. Agent has clear instructions.
  • [x] app/views/projects/show.html.erb -- verified: exists (64 lines). Currently renders notes list and repos. No block content rendered. Clear insertion point above the notes section.
  • [x] app/views/blocks/_block.html.erb -- new partial to create. Directory app/views/blocks/ does not exist yet (expected for new partial).
  • [x] app/assets/stylesheets/application.css -- verified: exists (677 lines). Single stylesheet with Gruvbox design tokens. Issue correctly targets this file for block content styling. Follows existing component pattern (comment headers with partial/stimulus references).
All file targets verified. "Do not touch" files confirmed correct: app/models/block.rb (exists, has belongs_to :note), app/models/project.rb (exists, has belongs_to :page_note), no db/ changes needed.

Repo Placement

OK. Issue filed on ldraney/paldocs, all file targets within paldocs. Single-repo change.

Dependencies

  • Item #1220 (done) -- "Project pages -- browse projects, view notes/repos/board link" -- predecessor that created the project show page. Complete.
  • Item #1344 (backlog) -- "feat: add Postgres trigger to bump projects.updated_at" -- shares story:project-pages but is independent (DB trigger). Not blocking.
  • Item #1342 (backlog) -- "feat: group kanban cards by phase within columns" -- shares arch:rails-views but is a different feature. Not blocking.
  • Item #1345 (in_progress) -- "spike: audit infra/pipeline gaps" -- unrelated. Not blocking.
  • No blocking dependencies. None needed.

Acceptance Criteria

10 acceptance criteria, all testable by an agent:
  • AC 1-7: Block-type rendering (heading, paragraph, list, table, code, mermaid) -- each verifiable by reading the generated partial and checking rendered output.
  • AC 8: Null safety for projects without page_note -- verifiable by visiting any project without a page_note.
  • AC 9: Existing sections remain below -- verifiable by inspecting view structure.
  • AC 10: No N+1 queries -- verifiable by checking controller includes and confirming eager-load.
Test commands are real: bin/rails test, manual URL visits. No missing criteria.

Blast Radius

  • New _block.html.erb partial is only rendered from project show page. No downstream consumers.
  • First block-rendering code in the Rails app. Future note show pages could reuse this partial.
  • This feature introduces the first html_safe usage in views -- currently zero instances exist. Constraints section appropriately warns about sanitization.
  • No risk to existing layout: new content section inserts above existing notes/repos sections.

Decomposition Assessment

4 file targets (2 existing, 2 new) in 1 repo. 10 acceptance criteria. The block partial covers multiple sub-types but follows a single case/when pattern in one file. Estimated agent work: 3-5 minutes. Within the 5-minute threshold. No decomposition needed.

Recommendation

No action needed. All previous findings resolved. Ticket is ready for implementation.