Skip to content

Restore guidance for mistagged Word headings - #777

Merged
mikec-ai merged 1 commit into
mainfrom
codex/issue-776-import-diagnostics
Jul 28, 2026
Merged

Restore guidance for mistagged Word headings#777
mikec-ai merged 1 commit into
mainfrom
codex/issue-776-import-diagnostics

Conversation

@mikec-ai

Copy link
Copy Markdown
Collaborator

Closes #776.

What changed

  • Restores specific, actionable guidance when paragraph-length content is accidentally styled as a Word heading.
  • Identifies the affected heading content without exposing unrelated validation details.
  • Applies the same handling across Builder, Compare, and Composer import paths.
  • Makes Builder re-import atomic so a failed import cannot remove or partially replace the existing NOFO.
  • Keeps unexpected validation failures on the existing generic, safe error pages.

Why

The standardized import error work in #748 caused a known mistagged-heading error to fall through to generic IMPORT-CREATE-INVALID guidance. Editors could no longer tell which paragraph had the incorrect Word style or how to repair the document.

Validation

  • Added a real .docx fixture containing an ordinary paragraph accidentally styled as a heading.
  • Exercised new Builder import, Builder re-import, new Compare import, Compare import into an existing document, and Composer import.
  • Verified each route returns IMPORT-HEADING-TOO-LONG with the affected content rather than its generic fallback.
  • Verified a failed Builder re-import leaves the original sections and subsections unchanged.
  • Rendered and visually inspected the Word fixture.
  • Full test suite: 1,581 tests passing.

@mikec-ai
mikec-ai requested a review from benbrasso July 28, 2026 19:35

@benbrasso benbrasso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved to merge

@mikec-ai
mikec-ai merged commit 9210d91 into main Jul 28, 2026
2 checks passed
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.

Import error no longer identifies accidentally mistagged heading content

3 participants