Skip to content

fix(web-app-ai-quick-draft-creator): reposition and differentiate draft creation error - #534

Merged
LukasHirt merged 1 commit into
mainfrom
fix-ai-quick-draft-creator-error-placement
Jul 27, 2026
Merged

fix(web-app-ai-quick-draft-creator): reposition and differentiate draft creation error#534
LukasHirt merged 1 commit into
mainfrom
fix-ai-quick-draft-creator-error-placement

Conversation

@LukasHirt

Copy link
Copy Markdown
Collaborator

Summary

  • Moves the draft-creation error banner in DraftCreatorModal.vue from above the description textarea to just above the action buttons, next to the "Create draft" action that can actually fail.
  • Replaces the unstyled oc-text-error utility class with a scoped style using var(--oc-color-danger, #c00), matching the convention already used in sibling packages (web-app-ai-sensitive-data-scanner's .scan-results-error, web-app-ai-smart-file-tagger-qa's .tag-suggestion-error, web-app-ai-multi-doc-synthesizer's .synthesis-error).
  • Keeps role="alert" for accessibility and does not change any error messages or the error-setting logic in useDraftCreator.ts.
  • Adds tests/unit/components/DraftCreatorModal.spec.ts covering: no banner when there's no error, banner text/role when there is one, correct DOM ordering (after the description/format fields, before the actions), and the existing create-draft happy path.

Before

Error text ("signal timed out") rendered as the very first element in the modal, above the "Describe the document you need" label, in the same plain body-text styling as the rest of the content.

After

Error text renders directly above the Cancel/Create draft buttons, styled in the design system's danger color so it's clearly distinguishable from body copy.

Closes #528

Test plan

  • pnpm --filter web-app-ai-quick-draft-creator check:types
  • pnpm --filter web-app-ai-quick-draft-creator lint
  • pnpm --filter web-app-ai-quick-draft-creator test:unit (16 passed, including 5 new)

…ft creation error

The error banner previously rendered above the description textarea
using the same styling as regular body text, making failures like
"signal timed out" easy to miss. Move it below the description and
output-format fields, right above the action buttons where the
failing action lives, and style it with the design system's danger
color token to match the convention used in sibling AI extensions
(e.g. web-app-ai-sensitive-data-scanner, web-app-ai-smart-file-tagger-qa).

Closes #528

Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt
LukasHirt requested a review from a team as a code owner July 27, 2026 11:39
@kw-security

kw-security commented Jul 27, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@LukasHirt LukasHirt self-assigned this Jul 27, 2026
@LukasHirt
LukasHirt merged commit 1b39490 into main Jul 27, 2026
60 of 62 checks passed
@LukasHirt
LukasHirt deleted the fix-ai-quick-draft-creator-error-placement branch July 27, 2026 12:12
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.

quick-draft-creator: error is misplaced and not differentiated

3 participants