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/08/24 16:06:51 UTC
[PR] fix(archived-list): use the semantic-layers-aware label for the dataset type [superset]
mikebridge opened a new pull request, #43465:
URL: https://github.com/apache/superset/pull/43465
### SUMMARY
On the **Recently Archived** (soft-delete recovery) view, the archived-object type was labeled **"Dataset"** — in the type-filter dropdown and the Type column — even on workspaces where the `SEMANTIC_LAYERS` feature flag renames the concept to **"Datasource"** everywhere else (the top nav reads "Datasources" while the archived row says "Dataset"). QA-reported cosmetic inconsistency (sc-117448).
Root cause: the view's `TYPE_LABELS` map was a module-level constant with `dataset: t('Dataset')` hardcoded, bypassing the app's flag-aware naming module. The map now holds label **getters** (`Record<ArchivedType, () => string>`) and the dataset entry delegates to the existing shared helper (`datasetLabel` from `src/features/semanticLayers/label.ts`), so the flag is read at render time and any future rename stays consistent automatically.
Only display text changes: the `ArchivedType` identifiers, filter values, and API requests are byte-identical under both flag states (asserted in the tests — selecting the renamed option still drives the dataset endpoints). With the flag off, every string renders exactly as before.
Docs: the Recently Archived page's Type-selector sentence now notes the flag-aware name.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before (from the ticket, flag ON — nav says "Datasources", archived type says "Dataset"): see [sc-117448's screenshot](https://media.app.shortcut.com/api/attachments/files/clubhouse-assets/5d8baaab-e1a8-4512-a9c7-12979c8cd1c9/6a7f4a52-cc80-49f1-bbff-c59edf98cead/Screenshot%202026-08-14%20at%2013.37.54.png). After: the same two spots read "Datasource"; with the flag off, "Dataset" (unchanged). Text-only change; RTL tests pin both states.
### TESTING INSTRUCTIONS
1. Enable `SOFT_DELETE` and `SEMANTIC_LAYERS` (top nav shows **Datasources**); archive a dataset.
2. Settings → **Recently Archived**: the Type selector offers **Datasource** (with Chart/Dashboard) and the Type column reads **Datasource**; selecting it lists the archived datasets exactly as the "Dataset" option did.
3. Disable `SEMANTIC_LAYERS`: both spots read **Dataset**, unchanged from before this PR.
4. `npm run test -- src/pages/ArchivedList` — 23 tests including the two new flag-state tests (the flag-on assertion fails against the previous hardcoded map).
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [x] Required feature flags: `SEMANTIC_LAYERS` for the renamed label (`SOFT_DELETE` to reach the view); flag-off rendering unchanged
- [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
🤖 Authored with the assistance of Claude (AI), directed and reviewed by @mikebridge.
--
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(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on code in PR #43465:
URL: https://github.com/apache/superset/pull/43465#discussion_r3847846306
##########
superset-frontend/src/pages/ArchivedList/index.tsx:
##########
@@ -166,7 +169,7 @@ function ArchivedListBody({
refreshData,
} = useListViewResource<ArchivedItem>(
config.resource,
- TYPE_LABELS[type],
+ TYPE_LABELS[type](),
Review Comment:
Not a defect here — the premise is inverted. `useListViewResource` expects a **singular** label and pluralizes it itself:
```ts
// superset-frontend/src/views/CRUD/hooks.ts
t('An error occurred while fetching %ss: %s', resourceLabel, errMsg)
```
The trailing `s` in `%ss` is the pluralization. So the argument must be singular, which is what this diff passes:
- `datasetLabel()` is documented and implemented as *"Capitalized singular: `Dataset` / `Datasource`"* (`src/features/semanticLayers/label.ts:39`). The plural form is a separate export, `datasetsLabel()`, on line 45 — deliberately not used here.
- On master today the same argument is `t('Dataset')`, also singular. This diff swaps a singular string for a singular getter, so the contract is unchanged and there is no behaviour change to regress.
The predicted `Datasourcess` would require `datasetLabel()` to return a plural; it doesn't. Rendered output is `Datasets` with the flag off and `Datasources` with it on — both correct.
One real point underneath this, though, and thanks for prompting the look: `%ss` builds the plural by concatenation rather than via a translated plural form, so any locale that doesn't pluralize with a trailing "s" gets the wrong string. That's pre-existing in `useListViewResource` and affects every caller (`ChartList`, `DashboardList`, and the rest), so it isn't in scope for this PR — worth its own issue if anyone wants to pick it up.
Resolving.
_(Comment by Claude (AI), on behalf of @mikebridge.)_
--
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(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43465:
URL: https://github.com/apache/superset/pull/43465#issuecomment-5398026686
<!-- Bito Reply -->
The review comment correctly identifies an issue: the `useListViewResource` hook expects a plural resource label for error messages, but the current implementation passes the singular `datasetLabel()`, which causes incorrect pluralization (e.g., "Datasourcess").
To resolve this, you should pass a dedicated plural label to the hook for error handling while continuing to use the singular label for UI display. You can update the `ArchivedListBody` component to accept or derive the appropriate plural form based on the current type.
Would you like me to fetch all other comments on this PR to validate and implement fixes for them as well?
**superset-frontend/src/pages/ArchivedList/index.tsx**
```
refreshData,
} = useListViewResource<ArchivedItem>(
config.resource,
type === 'dataset' ? t('Datasets') : TYPE_LABELS[type](),
addDangerToast,
true,
[],
```
--
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(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43465:
URL: https://github.com/apache/superset/pull/43465#issuecomment-5398400396
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43465?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 78.86%. Comparing base ([`8fa48d7`](https://app.codecov.io/gh/apache/superset/commit/8fa48d73f6938d98623c1471406a64a218fd9a4b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c024fca`](https://app.codecov.io/gh/apache/superset/commit/c024fca6c8bcc97d20ffd180e93de4ab0ded383d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 9 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #43465 +/- ##
=======================================
Coverage 78.85% 78.86%
=======================================
Files 2876 2876
Lines 164601 164603 +2
Branches 38015 38015
=======================================
+ Hits 129799 129806 +7
+ Misses 32355 32350 -5
Partials 2447 2447
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/43465/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/43465/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.21% <100.00%> (+<0.01%)` | :arrow_up: |
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/43465?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(archived-list): use the semantic-layers-aware label for the dataset type [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 #43465:
URL: https://github.com/apache/superset/pull/43465#discussion_r3847849660
##########
superset-frontend/src/pages/ArchivedList/index.tsx:
##########
@@ -166,7 +169,7 @@ function ArchivedListBody({
refreshData,
} = useListViewResource<ArchivedItem>(
config.resource,
- TYPE_LABELS[type],
+ TYPE_LABELS[type](),
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Treat useListViewResource's resourceLabel argument as singular; do not flag singular labels as an API mismatch because the hook pluralizes the label itself.
**Applied to:**
- `superset-frontend/src/pages/ArchivedList/index.tsx`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI Settings](https://app.codeant.ai/org/settings/learnings)*
--
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(archived-list): use the semantic-layers-aware label for the dataset type [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 #43465:
URL: https://github.com/apache/superset/pull/43465#discussion_r3845307630
##########
superset-frontend/src/pages/ArchivedList/index.tsx:
##########
@@ -166,7 +169,7 @@ function ArchivedListBody({
refreshData,
} = useListViewResource<ArchivedItem>(
config.resource,
- TYPE_LABELS[type],
+ TYPE_LABELS[type](),
Review Comment:
**Suggestion:** The list hook treats its second argument as a plural resource label and constructs list errors by appending a literal `s`. Passing the singular, feature-dependent `datasetLabel()` causes dataset fetch errors to bypass the shared plural translation (`Datasets`/`Datasources`) and can produce incorrect or untranslated messages, especially for non-English locales. Pass the appropriate plural label separately for list errors while retaining the singular label for row and info copy. [api mismatch]
<details>
<summary><b>Severity Level:</b> Minor 🧹</summary>
```mdx
- ❌ Dataset list failures display the malformed “Datasourcess” label.
- ⚠️ Archived-list fetch errors have incorrect plural localization.
- ⚠️ Users receive misleading error-toast wording during API failures.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=eeb103afd8004a7ea6f2aed338ceaa1f&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=eeb103afd8004a7ea6f2aed338ceaa1f&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/pages/ArchivedList/index.tsx
**Line:** 172:172
**Comment:**
*Api Mismatch: The list hook treats its second argument as a plural resource label and constructs list errors by appending a literal `s`. Passing the singular, feature-dependent `datasetLabel()` causes dataset fetch errors to bypass the shared plural translation (`Datasets`/`Datasources`) and can produce incorrect or untranslated messages, especially for non-English locales. Pass the appropriate plural label separately for list errors while retaining the singular label for row and info copy.
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%2F43465&comment_hash=cf7afa9b1d950ea811df86f7b41c2ae2cdf0b24ca8a9de7399983cacdd9470c3&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43465&comment_hash=cf7afa9b1d950ea811df86f7b41c2ae2cdf0b24ca8a9de7399983cacdd9470c3&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
Re: [PR] fix(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #43465:
URL: https://github.com/apache/superset/pull/43465
--
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(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43465:
URL: https://github.com/apache/superset/pull/43465#issuecomment-5400194551
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 an incremental AI Review.
- `/review full` - 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(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43465:
URL: https://github.com/apache/superset/pull/43465#issuecomment-5404031854
**Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it
--
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(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #43465:
URL: https://github.com/apache/superset/pull/43465#issuecomment-5397955817
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 52087756f032aa41e0220a6cc87a9d487f0bf361 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a8c6c1cd37ea80008f01b5c |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-43465--superset-docs-preview.netlify.app](https://deploy-preview-43465--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><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#DctNCoAgEEDhu8w6QalUukHHGGcmDCzFfiCiu-fuLb73Qql5KydMAB2EijvF1gcpY9wweIWV4noLK8YTj3xVEpUwSGqcpaT8zNwGi54sGeLeCXqttV-0CSPB9wM) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-43465--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(archived-list): use the semantic-layers-aware label for the dataset type [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43465:
URL: https://github.com/apache/superset/pull/43465#issuecomment-5397937266
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