Skip to content

docx-grader: DocxGrader component (AI-Assisted) - #387

Open
bh0fer wants to merge 6 commits into
feature/docx-grader-checksfrom
feature/docx-grader-component
Open

bh0fer wants to merge 6 commits into
feature/docx-grader-checksfrom
feature/docx-grader-component

Conversation

@bh0fer

@bh0fer bh0fer commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Part 2 of 3 for #385. Stacked on #386: review and merge that one first. The base switches to main afterwards.

Behavior

  • New component @hfr/docx-grader/components/DocxGrader. It takes a docx-spec imported from YAML (import spec from './x.docx-spec.yaml', via the existing yaml-loader).
  • Students drop or pick a .docx. It is graded in the browser only: nothing is uploaded and nothing is stored, so results live in component state.
  • Results read like a test run: "x von y Formatierungen erfüllt" with a progress bar, then checks grouped by category. Each failed check lists its failures (one line per paragraph), plus the teacher's hint and a docs link from the spec.
  • Spec errors from hand edits show in a warning above the upload area, and broken checks are skipped. A file that is not a docx shows an error message.
  • When a second file is uploaded while the first is still being graded, the newer results win.
  • The upload works with the keyboard (visually hidden input, focus outline) and results are announced in an aria-live region.
  • README: a live demo with the ex01 sample from the issue, plus download links for the original and the raw document. Until PR 3, the raw file is the teacher's own.

Validation

  • yarn test --run packages/hfr/docx-grader: 32 tests pass, including new ones for the non-docx error and the combined per-paragraph message.
  • yarn typecheck, prettier and yarn build pass.
  • Headless Chromium against the production build: uploading the raw sample gives "4 von 19 Formatierungen erfüllt" and the original gives "19 von 19", with no page errors. I checked the screenshots locally but could not attach them from the CLI.
  • Design review with the design-reviewer skill on this branch; all findings fixed.

🤖 Generated with Claude Code

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for teaching-dev ready!

Name Link
🔨 Latest commit 0d95125
🔍 Latest deploy log https://app.netlify.com/projects/teaching-dev/deploys/6afe1cc567d02b885f472a8a
😎 Deploy Preview https://deploy-preview-387--teaching-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

lebalz and others added 3 commits November 18, 2026 22:31
Grades an uploaded docx in the browser against a docx-spec and lists
the results like a test run (#385).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bh0fer
bh0fer force-pushed the feature/docx-grader-component branch from 322c816 to 7dab669 Compare November 18, 2026 21:34
@bh0fer
bh0fer requested a review from a team November 18, 2026 21:34

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants