Skip to content

Split up SiteSettingsSection.tsx and CommentSection.tsx #84

Description

@lopatnov

Found by architect during the 2026-08-08 /maintain refactor-analysis pass. Both are below the 300-line auto-flag threshold but were independently flagged on a manual SOLID/duplication pass — routine ui-developer work, no deeper architectural issue behind either.

  • src/pressmark-web/src/components/admin/SiteSettingsSection.tsx (285 lines) — roughly 8 repetitions of an identical label + input + error <p> block with identical Tailwind classes. A local SettingsField presentational component would cut this file roughly in half. (Note: this project already has a shared form-field component per src/pressmark-web/src/components/ui/form-field.tsx — check whether it already fits this use case before introducing a new one.)
  • src/pressmark-web/src/components/feed/CommentSection.tsx (264 lines) — 10 useState calls plus five RPC handlers (load/post, admin removal, report flow, notification subscription) plus JSX all in one component. Not a page (so the page+hook rule doesn't formally require the split), but the same pattern applies cleanly: extract a useComments(feedItemId) hook + a presentational CommentRow component.

Neither is urgent (both work correctly today, no bug), filed so it doesn't get lost rather than as a "fix now" item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions