zjncs opened a new pull request, #5703:
URL: https://github.com/apache/rocketmq-dashboard/pull/5703

   ### What
   
   `ErrorBlock` — the inline run failure of the AI transcript — had no test. 
This adds `ErrorBlock.test.tsx` with 4 tests pinning the contract its own 
documentation calls out.
   
   ### Why
   
   The component doc explains why the `code` must stay visible: 
`llm.provider.error_max_turns`, `llm.stream.unexpected_content_type` and 
`ai.run.busy` are the strings an operator has to search for, and the provider 
messages that accompany them are frequently vague. Nothing guarded that, nor 
the hint-as-description rule, nor the semantic error treatment.
   
   ### What is pinned
   
   - the error **code stays visible** next to the message as a tag;
   - the server **hint becomes the alert description** when present;
   - **no hint means no description** element at all;
   - the block uses the **semantic error treatment** (`Alert type="error"`), 
not a neutral banner — an error IS a semantic state, which is exactly what the 
project rule reserves `Alert` for.
   
   ### Verification
   
   - New tests on unmodified code: **4/4 green** (`npx vitest run`).
   - Discriminating mutations on `ErrorBlock`, vitest result verified red each 
time:
     1. the code tag dropped from the message row — the code-visibility test 
reddens;
     2. the hint never rendered — the hint test reddens;
     3. the alert downgraded from error to info semantics — the semantics test 
reddens.
   - Restored: 4/4 green. Test-only change; no product code touched.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to