Skip to content

Clarify import review counts and untouched field validation - #74

Open
beanbean9339 wants to merge 2 commits into
mainfrom
fix/issue-55-validation-clarity
Open

beanbean9339 wants to merge 2 commits into
mainfrom
fix/issue-55-validation-clarity

Conversation

@beanbean9339

Copy link
Copy Markdown
Collaborator

Closes #55

Changes

  • Label review findings, import warnings/errors, field-review counts, and health-scan check counts by what they actually measure.
  • Keep required-field markers visible while deferring error styling/messages on untouched fields, including after import. Reset touched state when a new import succeeds; show all field errors when the user attempts an invalid export.
  • Preserve the existing metadata validation and export blocking logic.
  • Add SSR rendering tests for required, touched, and export-attempt states and tests for review headline categories.

Validation

  • npm run test (106 passed)
  • npm run build (passed)

Independent branch based on main; does not change PR #64.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Metadata review totals include whole-file findings but are labeled as field counts, leaving the count-clarity requirement unresolved.

1 open issue
What changed in this PR

This PR addresses #55 by clarifying OpenCite’s import review labels and deferring field-error display until interaction or an invalid export attempt.

Changes:

  • Distinguishes import messages, review findings, and health-check counts.
  • Resets validation-display state after successful imports while preserving export validation.
  • Adds rendering tests for validation visibility and tests for review headlines.
File Description
tests/​validation/​validationDisplay.test.js Tests untouched, touched, and export-attempt error display.
tests/​services/​importReviewHeadline.test.js Tests category-specific review headlines.
src/​services/​importReviewHeadline.js Selects review headlines and counts by category.
src/​components/​MetadataForm.jsx Gates field errors on interaction or export attempts.
src/​App.jsx Updates review labels and manages validation-display state.

Review effort: Balanced

Comment thread src/App.jsx Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Author reordering and removal do not remap touched-state keys, causing validation errors to disappear when an edited author's row index changes.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Remap author touched state when reordering or removing authors

src/​components/​MetadataForm.jsx:32

After a successful import, editing the second author's ORCID to an invalid value and moving that author up hides the error: the error moves to index 0, but the touched key remains authors.1.orcid. Removing an earlier author has the same effect because reorderAuthor and removeAuthor in src/App.jsx update row indexes without remapping touched state. Remap per-author touched keys in both handlers so error visibility follows the edited author.

1 resolved since last review

Review effort: Balanced

@beanbean9339 beanbean9339 added design UX or presentation needs attention enhancement New feature or request labels Nov 8, 2026

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

design UX or presentation needs attention enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve warning headings and validation status clarity

2 participants