aglinxinyuan opened a new issue, #7786:
URL: https://github.com/apache/texera/issues/7786

   ### Describe the bug
   
   **The Hugging Face model field never shows validation errors.** Its template 
gates the message on the wrong property:
   
   ```html
   *ngIf="props.showError && formControl.errors"
   ```
   
   `showError` is a getter on `@ngx-formly`'s `FieldType` 
(`templates/field.type.d.ts:25`), a sibling of `get props()` — it is **not** a 
`props` field. The only other `showError` declarations in formly are predicate 
*functions* (`FormlyFormOptions.showError`, `FormlyConfig.extras.showError`). 
So `props.showError` is permanently `undefined` and 
`<formly-validation-message>` can never render.
   
   It typechecks only because formly's props type carries an index signature, 
which is why this has gone unnoticed.
   
   The two working siblings in the same codebase use the bare getter: 
`frontend/src/app/common/formly/object.type.ts:23` and `multischema.type.ts:24`.
   
   Two smaller defects in the same area:
   
   **Duplicated template references in `console-frame.component.html`.** 
`#checkedTemplate` is declared at both line 36 and line 53, 
`#unCheckedTemplate` at both 41 and 58, and both `nz-switch`es reference the 
same two names. First declaration wins, so the second pair is unreachable — and 
both bodies are byte-identical, so it is pure duplication.
   
   **A redundant guard in `dataset-detail.component.html`.** Line 585's 
`userHasWriteAccess() &&` is dominated by the enclosing `nz-collapse` (line 
452), which is already gated on `userDatasetAccessLevel === "WRITE"` — exactly 
what that method returns (`dataset-detail.component.ts:560-562`). Since both 
read the same field they cannot disagree, even at runtime.
   
   ### How to reproduce?
   
   Put the Hugging Face model field into an error state. `component.showError` 
is `true`, and no validation message renders.
   
   ### Version/Branch
   
   main
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [ ] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [x] Other
   


-- 
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