Skip to content

JD-match: useJdMatch hook + App rewiring (async state machine) #203

Description

@s-annam

Part of the WebLLM-native JD-matching redesign (anchor: #156, milestone M6 · JD Matching v2).

Goal

Move JD-match interaction state out of App.tsx into a hook, supporting the async semantic path.

Scope

  • New src/hooks/useJdMatch.ts — async state machine mirroring useResumeRewrite (idle → loading → running → ready → error) plus a synchronous keyword fast-resolve branch when WebGPU is absent or the user hasn't opted in.
  • Replace the synchronous useMemo JD pipeline in App.tsx:82-90 with the hook.
  • Reuse useModelSelection, detectWebGpu, loadEngine progress callback.

Constraints

  • App.tsx stays thin (CLAUDE.md: cross-cutting interaction state belongs in src/hooks/).
  • Keyword behavior unchanged when path resolves to keyword.

Done when

App.tsx consumes useJdMatch; keyword users see no change; semantic users get the loading/running/ready states.

Activity

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

    featureNew functionality

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions