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

[PR] fix(label): restore spacing between icon and label text [superset]

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

   ## Summary
   
   - Route onboarding and User Settings credential saves through one canonical `agentic_tools[tool][field]` patch helper.
   - Teach `check-auth` that Claude `setup-token` values are `CLAUDE_CODE_OAUTH_TOKEN` OAuth credentials, not Anthropic Console API keys.
   - Validate credentials stored in User Settings β†’ Env Vars by reusing the same user/tool env resolver used for executor session environments.
   - Validate Claude subscription tokens through the Claude SDK with an explicit per-probe env, avoiding daemon-global `process.env` mutation.
   - Include `CLAUDE_CODE_OAUTH_TOKEN` env-var setups in onboarding/banner key detection.
   - Clarify the short `claude setup-token` instructions with terminal/Claude Code install context and a Claude Code install-docs link.
   - Add regression tests for shared storage shape, Claude subscription-token auth checks, user env-var auth checks, and banner detection.
   
   ## Root cause
   
   The onboarding wizard already saved Claude subscription tokens to the same canonical per-user storage path as User Settings: `agentic_tools['claude-code'].CLAUDE_CODE_OAUTH_TOKEN`. The broken part was auth verification: `check-auth` only resolved/validated `ANTHROPIC_API_KEY` for Claude Code, so a `claude setup-token` value could be tested as the wrong credential type or ignored when stored.
   
   There was also a gap for non-recommended-but-working setups where users put `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` in User Settings β†’ Env Vars. Executors can receive those env vars, but auth verification and banners were not fully aligned with that effective runtime env.
   
   ## Canonical path after this change
   
   Onboarding and User Settings now save Claude subscription tokens through the same helper and storage shape: `agentic_tools['claude-code'].CLAUDE_CODE_OAUTH_TOKEN`. `check-auth` resolves credentials in the same order sessions effectively use them: canonical per-tool credentials first, then user env vars for the tool, then native Claude auth fallback.
   
   ## Verification
   
   - `pnpm i`
   - `pnpm --filter @agor/daemon test -- src/services/check-auth.test.ts`
   - `pnpm --filter agor-ui test -- src/components/OnboardingBanners/OnboardingBanners.test.tsx src/utils/agenticToolCredentials.test.ts src/components/OnboardingWizard/OnboardingWizard.test.tsx src/components/SettingsModal/UserSettingsModal.test.tsx`
   - `pnpm --filter agor-ui typecheck`
   - `pnpm check` β€” typecheck/lint/shortid phases passed; stopped at existing `check:multitenancy-boundaries` baseline violations unrelated to this PR.
   


-- 
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(label): restore spacing between icon and label text [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42141:
URL: https://github.com/apache/superset/pull/42141#issuecomment-5005784553

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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(label): restore spacing between icon and label text [superset]

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

   πŸŽͺ [Showtime](https://github.com/mistercrunch/superset-showtime) deployed environment on [GHA](https://github.com/apache/superset/actions/runs/29615147314) for [d56b9ed](https://github.com/apache/superset/commit/d56b9ed)
   
   β€’ **Environment:** http://54.244.194.136:8080 (admin/admin)
   β€’ **Lifetime:** 48h auto-cleanup
   β€’ **Updates:** New commits create fresh environments automatically


-- 
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(label): restore spacing between icon and label text [superset]

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


-- 
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(label): restore spacing between icon and label text [superset]

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

   πŸŽͺ [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/29615147314) for [d56b9ed](https://github.com/apache/superset/commit/d56b9ed)


-- 
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(label): restore spacing between icon and label text [superset]

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

   Before/after from the Explore pills (cached label and timer), for the record:
   
   Before:
   
   ![before](https://raw.githubusercontent.com/rusackas/superset/assets/label-icon-spacing/before.png)
   
   After:
   
   ![after](https://raw.githubusercontent.com/rusackas/superset/assets/label-icon-spacing/after.png)
   
   Thanks @sadpandajoe!


-- 
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(label): restore spacing between icon and label text [superset]

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

   ### <span aria-hidden="true">βœ…</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">πŸ”¨</span> Latest commit | d56b9ed98d8dacd15690c2aa69088509b5b5259b |
   |<span aria-hidden="true">πŸ”</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a5a6b70c8eadf0009e5af3b |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-42141--superset-docs-preview.netlify.app](https://deploy-preview-42141--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.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQyMTQxLS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.mphq_UZ1--4zz0lc0b7BYVKEoBeDU_Ps05mhBPfBsOI)<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#DcpZCoAgEADQu8x3ghDacoOOMeNSQungAkV09_x7H-8FzuniCivAAJQxmqPbh1vYjL4KbnSGcghqtaYoCqMJce_XOj7Ts9m-NSrUNEkzO7ReSrk4hX4k-H4) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-42141--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(label): restore spacing between icon and label text [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42141:
URL: https://github.com/apache/superset/pull/42141#issuecomment-5007378960

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </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(label): restore spacing between icon and label text [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42141?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 65.12%. Comparing base ([`9ccd365`](https://app.codecov.io/gh/apache/superset/commit/9ccd365652ae7a4e628b265d373cece7996450f6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`de89ed2`](https://app.codecov.io/gh/apache/superset/commit/de89ed2060abc0212974ea0dcffbd76549ceb7ed?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #42141      +/-   ##
   ==========================================
   - Coverage   65.12%   65.12%   -0.01%     
   ==========================================
     Files        2753     2753              
     Lines      154594   154594              
     Branches    35472    35472              
   ==========================================
   - Hits       100681   100675       -6     
   - Misses      51997    52003       +6     
     Partials     1916     1916              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42141/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ” | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/42141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.73% <ΓΈ> (-0.01%)` | :arrow_down: |
   
   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/42141?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(label): restore spacing between icon and label text [superset]

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


##########
superset-frontend/packages/superset-ui-core/src/components/Label/Label.test.tsx:
##########
@@ -55,6 +55,18 @@ test('preserves a custom icon color (antd v6 Tag icon-style regression)', () =>
   });
 });
 
+// Regression: wrapping the icon in a span (see above) stops antd's
+// `> .anticon + span` rule from matching, which had spaced the icon from the
+// label text. Label restores that gap on the content span next to the icon.
+test('keeps a gap between the icon and the label text (#42139)', () => {
+  const { getByText } = render(
+    <Label icon={<Icons.CheckCircleOutlined iconColor="#aabbcc" />}>
+      labeled
+    </Label>,
+  );
+  expect(getByText('labeled')).toHaveStyle({ marginInlineStart: '8px' });

Review Comment:
   This assertion hard-codes `8px`, but the implementation intentionally derives the spacing from `theme.sizeUnit * 2`. If `sizeUnit` changes, the component would still be correct but the test would fail unnecessarily; consider deriving the expected value from the theme as well.



##########
superset-frontend/packages/superset-ui-core/src/components/Label/index.tsx:
##########
@@ -76,6 +76,15 @@ export const Label = forwardRef<HTMLSpanElement, LabelProps>((props, ref) => {
       onClick={onClick}
       role={onClick ? 'button' : undefined}
       style={style}
+      /*
+       * Ant Design v6's Tag renders the label text in a content span and spaces
+       * it from the icon via the `> .anticon + span` rule. That rule only matches
+       * when the icon is a direct `.anticon` child, which the wrapper span below
+       * breaks, so the gap is restored explicitly on the content span. antd only
+       * renders the content span when an icon is present, so this is a no-op for
+       * icon-less labels.
+       */
+      styles={{ content: { marginInlineStart: theme.sizeUnit * 2 } }}

Review Comment:
   `styles` is applied unconditionally, but the intent (and the original `.anticon + span` behavior) is to add leading spacing only when an icon is present. Making this conditional avoids introducing a left margin on icon-less labels if Ant Design changes its internal markup (or if the content slot is still rendered without an icon).



-- 
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(label): restore spacing between icon and label text [superset]

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


##########
superset-frontend/packages/superset-ui-core/src/components/Label/index.tsx:
##########
@@ -76,6 +76,15 @@ export const Label = forwardRef<HTMLSpanElement, LabelProps>((props, ref) => {
       onClick={onClick}
       role={onClick ? 'button' : undefined}
       style={style}
+      /*
+       * Ant Design v6's Tag renders the label text in a content span and spaces
+       * it from the icon via the `> .anticon + span` rule. That rule only matches
+       * when the icon is a direct `.anticon` child, which the wrapper span below
+       * breaks, so the gap is restored explicitly on the content span. antd only
+       * renders the content span when an icon is present, so this is a no-op for
+       * icon-less labels.
+       */
+      styles={{ content: { marginInlineStart: theme.sizeUnit * 2 } }}

Review Comment:
   Addressed in d56b9ed98d β€” the `styles` prop is now gated on `icon`:
   
   ```tsx
   styles={icon ? { content: { marginInlineStart: theme.sizeUnit * 2 } } : undefined}
   ```
   
   so icon-less labels can never pick up the margin regardless of how antd renders the content slot. Also added a negative regression test asserting an icon-less label has no `marginInlineStart`.



##########
superset-frontend/packages/superset-ui-core/src/components/Label/Label.test.tsx:
##########
@@ -55,6 +55,18 @@ test('preserves a custom icon color (antd v6 Tag icon-style regression)', () =>
   });
 });
 
+// Regression: wrapping the icon in a span (see above) stops antd's
+// `> .anticon + span` rule from matching, which had spaced the icon from the
+// label text. Label restores that gap on the content span next to the icon.
+test('keeps a gap between the icon and the label text (#42139)', () => {
+  const { getByText } = render(
+    <Label icon={<Icons.CheckCircleOutlined iconColor="#aabbcc" />}>
+      labeled
+    </Label>,
+  );
+  expect(getByText('labeled')).toHaveStyle({ marginInlineStart: '8px' });

Review Comment:
   Kept the concrete `8px` here intentionally. Deriving the expected value from `theme.sizeUnit * 2` would re-use the implementation's own formula, making the assertion tautological β€” it would pass even if that expression were wrong, defeating the point of a regression test. `sizeUnit` is a stable design token; if it ever changed we would *want* this test to flag that the label spacing shifted rather than silently track it. The `8px` is documented by the `#42139` comment directly above the test.



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