Review: feat: collapsible accordion sections sorted by most recently modified (re-review)

review-1386-2026-06-07-r2 Review

review ready

Verdict: READY

Re-review of board item #1386. All 4 issues from prior review (review-1386-2026-06-07) have been addressed.

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage
  • [x] Repo
  • [x] User Story
  • [x] Context
  • [x] File Targets (including "Files NOT to touch")
  • [x] Feature Flag (none -- appropriate for UI-only change)
  • [x] Acceptance Criteria (7 items)
  • [x] Test Expectations
  • [x] Constraints
  • [x] Checklist
  • [x] Related

Traceability

  • [x] story:project-pages label -- present on board item
  • [x] story note verified -- story-paldocs-project-pages exists in pal-e-docs (title: "User Story: Project Pages", project: paldocs). Includes accordion-specific story: "As a superadmin, I want sections collapsed by default showing only recent items so I can find what's active"
  • [x] story listed on project page -- found in project-paldocs user-stories section
  • [x] arch:rails-hotwire label -- present on board item
  • [x] arch note verified -- arch-rails-hotwire exists in pal-e-docs (title: "Architecture: Rails Hotwire/Stimulus Patterns", project: paldocs). Documents Stimulus controllers, Turbo Frames, and progressive enhancement pattern (details/summary baseline)
  • [x] arch note listed on project page -- found in project-paldocs architecture section
  • [x] Forgejo issue -- ldraney/paldocs#25, state: open

File Targets

  • [x] app/views/projects/show.html.erb -- verified: exists, currently renders flat note-group lists (lines 36-54) that will be replaced with accordion components
  • [x] app/controllers/projects_controller.rb -- verified: exists, line 8 currently sorts by title (sort_by(&:title)), needs change to updated_at: :desc
  • [x] app/assets/stylesheets/ -- verified: directory exists with application.css containing existing .note-group styles (line 438+)
  • [x] app/javascript/controllers/ -- verified: directory exists with existing controllers (kanban_controller.js). Importmap configured with pin_all_from so new controllers auto-register

Repo Placement

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

Dependencies

  • #1344 (issue #13, Postgres trigger for projects.updated_at) -- currently in_progress on the board. Issue correctly documents this is NOT a blocker: accordion sorting uses notes.updated_at (note-level freshness, already populated) not projects.updated_at (project-level freshness). Independent work streams.
  • #1343 (render project page note content) -- done. The page note rendering in show.html.erb lines 25-34 coexists with the notes-by-type section and is unaffected by accordion changes.
  • No undocumented dependencies found.

Acceptance Criteria

All 7 ACs are verifiable by an agent:
  • AC 1-3 (accordion structure, collapsed default, header+count) -- verifiable via integration test checking rendered HTML for <details>/<summary> elements
  • AC 4 (updated_at sort) -- verifiable via integration test checking note order in rendered output
  • AC 5-6 (top 5 + "show all" link) -- verifiable via integration test with fixture data
  • AC 7 (Turbo persistence via data-turbo-permanent) -- implementation hint now specified. No existing system test infrastructure (spec dir has only helper files), so verifiable by checking the attribute is present in rendered HTML
Test command bundle exec rspec spec/ is valid for the project.

Blast Radius

Low. The note-group/note-list pattern only appears in projects/show.html.erb. No other views render notes by type. The projects/index.html.erb lists projects only, not notes. Existing CSS classes (.note-group, .note-list, etc.) will be refactored but are scoped to the project detail page.

Decomposition Assessment

4 file targets in 1 repo. 7 acceptance criteria (above the 5 threshold) but all describe facets of a single cohesive accordion feature on one page. Estimated agent work: ~3-4 minutes (controller sort change, view template refactor to details/summary, CSS additions, optional Stimulus controller). No decomposition needed -- this is one coherent unit.

Prior Review Issues -- Resolution Status

  • [x] Issue 1: story-paldocs-project-pages note now exists with user stories including the accordion story
  • [x] Issue 2: arch-rails-hotwire note created with Stimulus/Turbo patterns and progressive enhancement guidance
  • [x] Issue 3: AC 7 updated with explicit data-turbo-permanent implementation hint
  • [x] Issue 4: Related section clarifies #13 is not a blocker (note-level vs project-level updated_at)

Recommendations

No action needed.