Review: render note content inline on project detail page (re-review)

review-1385-2026-06-07-r2 Review

review approved

Verdict: APPROVED

Re-review of board item #1385. Prior review review-1385-2026-06-07 found 1 issue (missing arch-rails-views note). That issue has been resolved.

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage -- Standalone, references 482e8e7
  • [x] Repo -- ldraney/paldocs
  • [x] User Story -- As a superadmin, I want to read note content directly on the project page
  • [x] Context -- Explains page_note pattern extension, html_content from pal-e-docs
  • [x] File Targets -- 3 targets + 1 exclusion
  • [x] Feature Flag -- none (UI enhancement, appropriate)
  • [x] Acceptance Criteria -- 5 criteria
  • [x] Test Expectations -- integration + unit + run command
  • [x] Constraints -- Turbo/Stimulus, sanitize, collapsed-by-default
  • [x] Checklist -- standard 3-item
  • [x] Related -- project-paldocs, issue #12

Traceability

  • [x] story:project-pages label -- present on board item #1385
  • [x] story note verified -- story-paldocs-project-pages listed in project-paldocs user-stories section
  • [x] arch:rails-views label -- present on board item #1385
  • [x] arch note verified -- arch-rails-views exists in pal-e-docs (note_type: doc, project: paldocs, title: "Architecture: Rails View Conventions"). Contains sections: ERB Templates, Sanitized HTML Rendering, Project Page Structure.
  • [x] Forgejo issue -- ldraney/paldocs#24, state: open

File Targets

  • [x] app/views/projects/show.html.erb -- verified: exists (77 lines). Currently renders notes as title+slug links grouped by type (lines 36-54). No expand/collapse mechanism exists yet.
  • [x] app/assets/stylesheets/ -- verified: directory exists with application.css (20k). No inline-note-content styles exist yet.
  • [x] app/controllers/projects_controller.rb -- verified: exists (14 lines). Already includes :notes in eager loading (line 7). html_content is a text column on the notes table, loads automatically with Note records -- no additional includes needed.
  • [x] app/views/blocks/ (exclusion) -- verified: directory exists with _block.html.erb. Exclusion is correct -- blocks partial is for structured block rendering of page_note only.

Repo Placement

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

Dependencies

  • Board item #1343 (issue #12, "render project page note content on project show page") -- done. Prerequisite page_note rendering work. Completed. No blocker.
  • Board item #1344 (issue #13, "add Postgres trigger to bump projects.updated_at") -- in_progress. Not a direct dependency (sorting, not rendering). Same story but no blocking relationship.
  • Board item #1386 (issue #25, "collapsible accordion sections sorted by most recently modified") -- backlog. Sibling feature in same story. Accordion/expand UI from #25 may overlap with expand/collapse in this ticket. Not a blocker, but agents should be aware of potential UI pattern convergence.

Acceptance Criteria

5 criteria -- all verifiable by an agent:
  • AC1: Expand note to show html_content -- testable via integration test
  • AC2: Collapsed shows title + slug -- testable (current behavior)
  • AC3: Expanded renders HTML safely (sanitized) -- testable, sanitize helper already used in blocks partial (lines 23, 33)
  • AC4: No-content placeholder -- testable with nil html_content
  • AC5: External pal-e-docs link still available -- testable
Test commands are valid (bundle exec rspec spec/). Existing Stimulus controllers (kanban_controller.js) confirm Hotwire patterns are established.

Blast Radius

  • html_content is a text column that can contain arbitrary HTML from pal-e-docs. Ticket correctly requires sanitization. Existing sanitize pattern in app/views/blocks/_block.html.erb (lines 23, 33) provides the reference pattern with allowed_tags and allowed_attributes.
  • No other views currently render html_content directly -- this is net-new rendering surface.
  • Turbo Frames / Stimulus: the app already uses Hotwire (turbo-rails + stimulus imported in application.js, kanban_controller.js exists). Adding a new Stimulus controller for expand/collapse is consistent with the existing architecture.

Decomposition Assessment

3 file targets in 1 repo. 5 acceptance criteria. Estimated agent work: ~3-4 minutes. No decomposition needed.

Recommendation

No action needed. Prior issue resolved.