Skip to content

Code complexity review #54

Closed
Closed

Description

@IanMayo

We have some quite large modules.

I suspect we also have some quite complex blocks of logic.

Do a code review, to consider hot-spots where:

  • UI and business logic are too tightly intertwined
  • Business logic is several layers deep
  • Child components could be refactored out
  • UI elements could be refactored to Lit components
  • Files are very large (over 400 lines)

Produce a report of recommendations

Activity

  1. IanMayo commented on Sep 5, 2026

    @IanMayo
    ContributorAuthor

    This was delivered. Closing.

    The review produced CODE_REVIEW_REFACTORING_HOTSPOTS.md, which listed 18 hot-spots against the four criteria in this issue. That report became spec 012-code-review, implemented across PRs #92, #93 and #94 and merged in June 2026.

    Outcome against the original asks:

    • UI and business logic intertwined — password hashing moved out of qd-login into services/auth/instructor-auth.ts; answer persistence moved into enhancers/quiz-answer-persistence.ts.
    • Child components refactored out — qd-instructor was split into qd-instructor-unlock, -scores, -export and -manage under src/components/qd-instructor/.
    • UI elements refactored to Lit components — the hand-built instructor modal became qd-instructor-login; student answer overlays became qd-student-answers and qd-student-entries.
    • Files over 400 lines — qd-login.ts was the worst at 791 lines and is now well under that.

    The original report is archived at docs/history/CODE_REVIEW_REFACTORING_HOTSPOTS.md with a banner explaining that its file paths describe the pre-refactor tree. A follow-up audit of the current codebase is in docs/PROJECT_STATE.md.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions