You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mikebridge (via GitHub)" <gi...@apache.org> on 2026/10/10 17:17:43 UTC

[PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

mikebridge opened a new pull request, #45173:
URL: https://github.com/apache/superset/pull/45173

   ### SUMMARY
   
   Improve provider-defined semantic-layer connection forms:
   
   - Render nullable passwords as one optional password input, preserving null/omitted/empty values and the real authentication-method choice.
   - Support a provider's private-key PEM hint with a multiline editor, BEGIN/END placeholder and inline boundary guidance.
   - Show field help below aligned, full-width inputs. Loading suggestions do not disable manual entry.
   - For the Snowflake extension, wait for complete-looking credentials and the existing 500 ms debounce before discovery. Preserve masked secrets on Save without sending those masks to discovery.
   - Use fixed safe messages at configuration refresh, edit-load and save boundaries; keep non-connection operation errors neutral.
   
   The small Snowflake-specific refresh predicate is deliberate: generic dependency presence is insufficient, while schema-level PEM validation would reject saved-secret masks. It is not cryptographic validation and does not change provider validation, save semantics or API types. A general provider-readiness framework is outside this fix.
   
   Companion provider schema/help branch (draft PR follows): https://github.com/preset-io/superset-shell/tree/sc-125738-snowflake-form-ux
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: optional key passwords show `anyOf-0`/`anyOf-1`, the key is a single-line password field, and discovery can start on partial credentials.
   
   After: one optional password input, multiline private key with visible shape/help, vertical labels and aligned controls; incomplete credentials do not start discovery.
   
   RTL evidence covers the actual JSON Forms renderers, masked Save, debounce/cancellation, incomplete/encrypted PEM, ordinary default display and typing while loading. Desktop (1440 px) and narrow (480 px) before/after component screenshots are saved in the implementation handoff; they are offline Chromium renders of the actual component DOM/CSS, not a live Snowflake session.
   
   ### TESTING INSTRUCTIONS
   
   1. With a Snowflake semantic-layer extension installed, open a new connection form. Check that account/username help is visible and the private-key password is a single optional input.
   2. Paste an incomplete key; confirm matching BEGIN/END guidance and no discovery request. Complete account, username and key; after a pause, confirm discovery runs. An encrypted key also needs its passphrase.
   3. Leave the suggestion request pending or fail it; confirm manual fields stay typeable. Errors must not display provider exception text or supplied secrets.
   4. Edit a saved connection without replacing its masked key and save; the existing secret must be preserved. Check dependent selections after changing credentials.
   
   Local: all four semantic-layer frontend suites pass (73 tests); staged pre-commit passes, including frontend type checking; translation template matches extraction. Companion provider suite: 398 tests pass. Independent Claude final-tree review completed before publication. No live Snowflake was used.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: existing `SEMANTIC_LAYERS`
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   Draft for human review; no migration or deployment-order requirement. Hosts without the optional PEM hint support continue to use their existing control. AI-assisted implementation and independent review; checks executed locally as described above.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on code in PR #45173:
URL: https://github.com/apache/superset/pull/45173#discussion_r4249780295


##########
superset-frontend/src/features/semanticLayers/jsonFormsHelpers.tsx:
##########
@@ -227,18 +290,20 @@ export function DynamicFieldControl(props: ControlProps) {
   );
 
   if (enumValues && enumValues.length > 0) {
-    const tooltip = (props.uischema?.options as Record<string, unknown>)
-      ?.tooltip as string | undefined;
     const placeholder = (props.uischema?.options as Record<string, unknown>)
       ?.placeholderText as string | undefined;
     return (
-      <FormItem label={props.label} tooltip={tooltip}>
+      <FormItem
+        label={props.label}
+        extra={props.schema.description}
+        required={props.required}
+      >
         <Select
           ariaLabel={props.label || undefined}
           value={(props.data as string | number | undefined) ?? undefined}
           onChange={value => props.handleChange(props.path, value)}
           options={options}
-          disabled={!props.enabled || refreshing}
+          disabled={!props.enabled}

Review Comment:
   Good catch—the debounce only cancelled pending timers; it did not fence requests already in flight. Fixed in dc25bc9eb2554bf30302eacbcd96f61ce42cb91b with a separate schema-request generation that invalidates older responses as soon as dependencies change, including during debounce, and ignores their schema/error/loading updates. Fields remain editable; requests are not network-aborted. Nine red-first regression cases and all 73 focused frontend tests pass. Implemented with Codex and independently reviewed by Claude.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #45173:
URL: https://github.com/apache/superset/pull/45173#issuecomment-6102765271

   ## CodeAnt PR Risk: Medium Risk
   
   - The PR needs attention before merging because dynamic metadata refreshes may race.
   - Dynamic enum controls remain interactive during refresh, so an older request may replace newer schema choices; guard responses against stale dependencies.
   
   **Assessed commit:** `b1ae3ca21f2b`


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #45173:
URL: https://github.com/apache/superset/pull/45173#discussion_r4254514214


##########
superset-frontend/src/features/semanticLayers/jsonFormsHelpers.tsx:
##########
@@ -248,7 +313,7 @@ export function DynamicFieldControl(props: ControlProps) {
   }
 
   if (!refreshing) {
-    return TextControl(props);
+    return <SchemaTextControl {...props} />;

Review Comment:
   Typing into a dynamic text field that another dynamic field depends on sets `refreshing` on the first keystroke; adding the spinner suffix remounts the antd input, so focus drops to `<body>` and only the first character lands. Keeping a suffix mounted avoids the remount:
   
   ```suggestion
       // Keep a suffix mounted: toggling the spinner would remount the input and drop focus.
       const options = {
         ...props.uischema.options,
         inputProps: { suffix: <span /> },
       };
       return (
         <SchemaTextControl {...props} uischema={{ ...props.uischema, options }} />
       );
   ```



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on code in PR #45173:
URL: https://github.com/apache/superset/pull/45173#discussion_r4253216179


##########
superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx:
##########
@@ -321,13 +349,11 @@ export default function SemanticLayerModal({
         addSuccessToast(t('Semantic layer created'));
       }
       onHide();
-    } catch (error) {
-      const clientError = await getClientErrorObject(error);
+    } catch {

Review Comment:
   Good catch—fixed in dead2b64462e34804cdbeffccfd4dd4f8849c9eb. Save preserves getClientErrorObject(error).error and uses the create/update fallback only when empty. Duplicate-name, missing-field and masked-field reasons have red-first coverage using actual 422 response decoding; both empty-message fallbacks are covered too. All 80 focused tests and hooks pass. Implemented with Codex and independently reviewed by Claude.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #45173:
URL: https://github.com/apache/superset/pull/45173#issuecomment-6100372678

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45173?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `95.12195%` with `4 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 65.33%. Comparing base ([`b9e8188`](https://app.codecov.io/gh/apache/superset/commit/b9e8188ad606f61317403c3be5ef9450dbe0e381?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8c7886d`](https://app.codecov.io/gh/apache/superset/commit/8c7886d75f85fe02e2ef5b626f192c514ef15c60?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/45173?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...src/features/semanticLayers/SemanticLayerModal.tsx](https://app.codecov.io/gh/apache/superset/pull/45173?src=pr&el=tree&filepath=superset-frontend%2Fsrc%2Ffeatures%2FsemanticLayers%2FSemanticLayerModal.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZlYXR1cmVzL3NlbWFudGljTGF5ZXJzL1NlbWFudGljTGF5ZXJNb2RhbC50c3g=) | 84.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/45173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (b9e8188) and HEAD (8c7886d). Click for more details.
   > 
   > <details><summary>HEAD has 4 uploads less than BASE</summary>
   >
   >| Flag | BASE (b9e8188) | HEAD (8c7886d) |
   >|------|------|------|
   >|python|7|3|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #45173       +/-   ##
   ===========================================
   - Coverage   82.85%   65.33%   -17.52%     
   ===========================================
     Files        3017     3017               
     Lines      192923   192976       +53     
     Branches    44976    45012       +36     
   ===========================================
   - Hits       159841   126090    -33751     
   - Misses      30042    64090    +34048     
   + Partials     3040     2796      -244     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `35.30% <ø> (ø)` | |
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.67% <95.12%> (+0.06%)` | :arrow_up: |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.13% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.58% <ø> (-32.92%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.46% <ø> (ø)` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/45173/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/45173?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #45173:
URL: https://github.com/apache/superset/pull/45173


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on PR #45173:
URL: https://github.com/apache/superset/pull/45173#issuecomment-6129279038

   Checked the queued-debounce concern at dc25bc9eb2554bf30302eacbcd96f61ce42cb91b: it is already handled. SemanticLayerModal.tsx:332 explicitly clears the pending timer in handleBack; line 322 invalidates requests already in flight, and lifecycle cleanup also clears the timer. A focused probe queued a refresh, clicked Back, selected another provider and advanced time: no old-provider request fired. Removing only line 332 made the probe fail (three requests instead of two); restoring it passed all 30 cases, including the probe. No code change was needed; the unchanged modal suite passes all 29 committed tests. Investigated with Codex; the existing exact-tree fix was independently reviewed by Claude.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #45173:
URL: https://github.com/apache/superset/pull/45173#issuecomment-6100167037

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 8c7886d75f85fe02e2ef5b626f192c514ef15c60 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6aca73379dae370008f2713e |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-45173--superset-docs-preview.netlify.app](https://deploy-preview-45173--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQ1MTczLS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.FSI9RipTscp6EYRsPeuIz7T8bdJa5RADsvUdgY-Aq_Q)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpLDkAwEADQu8xak7YTBjdwjNFPJPSTIoi4u-7e4r2QSwr5gBGggblwNEv1boTSLWEv9pguv_HqhE8liPOuzbq8pWeyNXZsmBBpsOyQpJS916TQwfcD) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-45173--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on PR #45173:
URL: https://github.com/apache/superset/pull/45173#issuecomment-6102111348

   The snowflake-specific code should be outside this repo


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #45173:
URL: https://github.com/apache/superset/pull/45173#discussion_r4253153134


##########
superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx:
##########
@@ -321,13 +349,11 @@ export default function SemanticLayerModal({
         addSuccessToast(t('Semantic layer created'));
       }
       onHide();
-    } catch (error) {
-      const clientError = await getClientErrorObject(error);
+    } catch {

Review Comment:
   This drops the 422 reasons the user needs in order to act: `Name already exists: …`, `Invalid configuration: auth.private_key: missing`, and the update guard that rejects an edit reusing a masked secret ("Provide the real value for any masked field"). The backend already sanitizes these: `validate_configuration` keeps only loc/type and maps provider exceptions to fixed text. Without the reason, a user who edits the host and leaves the token masked can't tell what to fix. Could Save keep `getClientErrorObject(error).error` and fall back to the generic string only when it's empty?



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on code in PR #45173:
URL: https://github.com/apache/superset/pull/45173#discussion_r4254681800


##########
superset-frontend/src/features/semanticLayers/jsonFormsHelpers.tsx:
##########
@@ -248,7 +313,7 @@ export function DynamicFieldControl(props: ControlProps) {
   }
 
   if (!refreshing) {
-    return TextControl(props);
+    return <SchemaTextControl {...props} />;

Review Comment:
   Good catch — fixed in d9b70c6d610a7a577e8d173d2b03119ecd4a4894 by keeping the idle suffix mounted. The real-renderer regression reproduces the dropped second character and focus on body before the fix, then preserves both characters, input identity and focus across refresh start/completion; all 81 semantic-layer tests and changed-file hooks pass.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layer): improve credential entry and connection feedback [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #45173:
URL: https://github.com/apache/superset/pull/45173#discussion_r4239397918


##########
superset-frontend/src/features/semanticLayers/jsonFormsHelpers.tsx:
##########
@@ -227,18 +290,20 @@ export function DynamicFieldControl(props: ControlProps) {
   );
 
   if (enumValues && enumValues.length > 0) {
-    const tooltip = (props.uischema?.options as Record<string, unknown>)
-      ?.tooltip as string | undefined;
     const placeholder = (props.uischema?.options as Record<string, unknown>)
       ?.placeholderText as string | undefined;
     return (
-      <FormItem label={props.label} tooltip={tooltip}>
+      <FormItem
+        label={props.label}
+        extra={props.schema.description}
+        required={props.required}
+      >
         <Select
           ariaLabel={props.label || undefined}
           value={(props.data as string | number | undefined) ?? undefined}
           onChange={value => props.handleChange(props.path, value)}
           options={options}
-          disabled={!props.enabled || refreshing}
+          disabled={!props.enabled}

Review Comment:
   **Suggestion:** Dynamic enum controls stay interactive during refresh, so changing dependencies can start overlapping requests and an older response can overwrite the newer schema with stale choices.
   
   **Assessment:** 🟠 `Major` · 🔁 `Occurrence: Sometimes` · 🏷️ `Race condition`
   
   [![Use CodeAnt Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=62cf0fb48a0a46fd866b64bef05e7b6b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=62cf0fb48a0a46fd866b64bef05e7b6b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/features/semanticLayers/jsonFormsHelpers.tsx
   **Line:** 306:306
   **Comment:**
   	*Race Condition: Dynamic enum controls stay interactive during refresh, so changing dependencies can start overlapping requests and an older response can overwrite the newer schema with stale choices.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45173&comment_hash=fa773361618b9c0f033c203a3c75742187a00542aa850d9eb7477bb079f165e3&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45173&comment_hash=fa773361618b9c0f033c203a3c75742187a00542aa850d9eb7477bb079f165e3&reaction=dislike'>👎</a>



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org