You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jesperct (via GitHub)" <gi...@apache.org> on 2026/06/03 19:53:38 UTC

[PR] fix(dashboard): update browser tab title when dashboard is renamed [superset]

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

   ### SUMMARY
   
   The browser tab title does not update when a dashboard is renamed. It is most
   visible right after creating a new dashboard: you change the title, click Save,
   and the tab keeps showing `[ untitled dashboard ]` until you reload the page.
   
   Root cause: `DashboardPage` binds `document.title` to the `dashboard_title`
   returned by the `useDashboard()` API hook, which only refreshes on a full page
   load. Renaming a dashboard updates the live title in Redux
   (`dashboardLayout` HEADER `meta.text`) and persists it through an in app save
   that uses `history.pushState` with no reload, so the API value, and therefore
   `document.title`, never refresh.
   
   The fix sources `document.title` from the live Redux header title, falling back
   to the API `dashboard_title` before the layout is hydrated. This covers both the
   inline title editor and the Properties modal, and both new and existing
   dashboards.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Verified locally on a new dashboard (`/dashboard/new/` redirects to a real id):
   
   - Before: rename to "My Renamed Dashboard" and Save. The header shows the new
     name but `document.title` stays `[ untitled dashboard ]`. A manual reload then
     shows the correct title, confirming the data was saved and only the in app
     binding was stale.
   - After: `document.title` updates to "My Renamed Dashboard" as soon as the title
     changes, with no reload needed.
   
   ### TESTING INSTRUCTIONS
   
   1. Create a new dashboard (the tab shows `[ untitled dashboard ]`).
   2. Change the dashboard title and click Save.
   3. The browser tab title should now reflect the new title without reloading.
   4. Repeat on an existing dashboard: renaming and saving should update the tab
      title immediately.
   
   Unit tests: `npm run test -- src/dashboard/containers/DashboardPage.test.tsx`
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [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
   


-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 2283b6a9dcc045b6e70895eeac7d89daa270882c |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a241f8ae215050008c72916 |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-40730--superset-docs-preview.netlify.app](https://deploy-preview-40730--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.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQwNzMwLS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.-whAKtKfSb8nIXZPvcK5-Mjlq_WGSOcX_E2Ro5rQ5CQ)<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#DctRDoIwDADQu_Tbxm0BBG_gMTo6ZAmsS6kRY7y7-3s_7wtVZa8Gd4ALRKUyr81LPq9MxxqFlNGybQmjyvtIikYRixi-KpPl8myPU93k8-A2BwqdX0ZKwfeud86N8y1MfoDfHw) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-40730--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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   **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(dashboard): update browser tab title when dashboard is renamed [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 #40730:
URL: https://github.com/apache/superset/pull/40730#discussion_r3362968988


##########
superset-frontend/src/dashboard/containers/DashboardPage.tsx:
##########
@@ -152,6 +153,14 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
   const readyToRender = Boolean(dashboard && charts);
   const { dashboard_title, id = 0 } = dashboard || {};
 
+  // The live title is edited in Redux and persisted via an in-SPA save with no
+  // full reload, so the useDashboard() API result can be stale. Track the live
+  // title so the browser tab stays in sync after a rename.
+  const liveDashboardTitle = useSelector<RootState, string | undefined>(
+    state => state.dashboardLayout?.present?.[DASHBOARD_HEADER_ID]?.meta?.text,
+  );
+  const pageTitle = liveDashboardTitle || dashboard_title;

Review Comment:
   **Suggestion:** `pageTitle` always prefers `dashboardLayout.present[DASHBOARD_HEADER_ID].meta.text` when it is truthy, but `dashboardLayout` persists until the next `HYDRATE_DASHBOARD` dispatch. During dashboard-to-dashboard navigation in the SPA, this can temporarily use the previous dashboard's header text and set the wrong browser tab title before the new dashboard hydrates. Gate the live-layout title to the current hydrated dashboard (or current dashboard id) and only then prefer it; otherwise fall back to the API title. [incorrect condition logic]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Dashboard route shows wrong tab title during dashboard switches.
   - ⚠️ Embedded dashboard route momentarily shows previous dashboard title.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open any dashboard via the main route `/superset/dashboard/:idOrSlug/` defined in
   `superset-frontend/src/views/routes.tsx:52-53`, which renders `DashboardRoute` from
   `src/pages/Dashboard/index.tsx:8-10`, returning `<DashboardPage idOrSlug={idOrSlug} />`
   from `src/dashboard/containers/DashboardPage.tsx:128-133`. Wait for initial load so
   `hydrateDashboard` is dispatched in the `useEffect` at `DashboardPage.tsx:192-290`, which
   hydrates `dashboardLayout` via the `HYDRATE_DASHBOARD` handler in
   `src/dashboard/reducers/dashboardLayout.ts:106-113`, and `document.title` is set to the
   live header title by the effect at `DashboardPage.tsx:313-318`.
   
   2. In the same SPA session, navigate to a different dashboard (e.g. from
   `/superset/dashboard/1/` to `/superset/dashboard/2/`) so `DashboardRoute` still renders
   `DashboardPage` with a new `idOrSlug` (`src/pages/Dashboard/index.tsx:8-10`) but the
   component instance and Redux store are reused. On this navigation, the hooks
   `useDashboard(idOrSlug)` and `useDashboardCharts(idOrSlug)` in `DashboardPage.tsx:141-149`
   start fetching new data for dashboard 2 using the API hooks in
   `src/hooks/apiResources/dashboards.ts:52-70` and `apiResources.ts:87-137`, while
   `state.dashboardLayout.present` still contains the previous dashboard 1 layout (including
   header meta.text) as last hydrated by `HYDRATE_DASHBOARD` (`dashboardLayout.ts:106-113`).
   
   3. When the API call for the new dashboard 2 completes, `useDashboard` updates `dashboard`
   with result including `dashboard_title` for dashboard 2 (`dashboards.ts:52-66`), but
   `dashboardLayout` is still from dashboard 1 because the hydration effect at
   `DashboardPage.tsx:192-290` only dispatches `hydrateDashboard` once `readyToRender =
   Boolean(dashboard && charts)` becomes true. On this intermediate render,
   `liveDashboardTitle` is still read from
   `state.dashboardLayout.present[DASHBOARD_HEADER_ID].meta.text`
   (`DashboardPage.tsx:159-161`, with `DASHBOARD_HEADER_ID` defined in
   `src/dashboard/util/constants.ts`), so `pageTitle` is computed as `liveDashboardTitle ||
   dashboard_title` (`DashboardPage.tsx:162`) and remains set to dashboard 1's title even
   though the API has returned dashboard 2's `dashboard_title`. Because `pageTitle` stays
   equal to the previous value, the `useEffect` at `DashboardPage.tsx:313-318` does not
   rerun, and `document.title` continues to show dashboard 1's name while dashboard 2 is now
   loading.
   
   4. Only after both the new dashboard and its charts have finished loading does
   `readyToRender` become true (`DashboardPage.tsx:152-154`), triggering the hydration effect
   (`DashboardPage.tsx:192-290`) which dispatches `HYDRATE_DASHBOARD` with the new
   `dashboardLayout` for dashboard 2 (`actions/hydrate.ts:320-399` →
   `reducers/dashboardLayout.ts:106-113`). At that point `liveDashboardTitle` switches from
   dashboard 1's header text to dashboard 2's header text, `pageTitle` finally changes, and
   the `useEffect` at `DashboardPage.tsx:313-318` updates `document.title` to the correct
   dashboard 2 title. Between steps 2 and 4 the browser tab title is wrong, showing the
   previous dashboard's name because `pageTitle` always prefers the stale
   `dashboardLayout.present[DASHBOARD_HEADER_ID].meta.text` over the already-available API
   `dashboard_title`, matching the issue described in the suggestion.
   ```
   </details>
   
   [Fix in Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=2f80bc6df62247558bcb57e4e9e87017&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) | [Fix in VSCode Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=2f80bc6df62247558bcb57e4e9e87017&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/dashboard/containers/DashboardPage.tsx
   **Line:** 162:162
   **Comment:**
   	*Incorrect Condition Logic: `pageTitle` always prefers `dashboardLayout.present[DASHBOARD_HEADER_ID].meta.text` when it is truthy, but `dashboardLayout` persists until the next `HYDRATE_DASHBOARD` dispatch. During dashboard-to-dashboard navigation in the SPA, this can temporarily use the previous dashboard's header text and set the wrong browser tab title before the new dashboard hydrates. Gate the live-layout title to the current hydrated dashboard (or current dashboard id) and only then prefer it; otherwise fall back to the API title.
   
   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%2F40730&comment_hash=63c0765f4c31098e4b4baa08cba192a9f9a5b30f36d4cd90d5784be70f2d9f90&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40730&comment_hash=63c0765f4c31098e4b4baa08cba192a9f9a5b30f36d4cd90d5784be70f2d9f90&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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   Added the post-mount test you suggested, @EnxDev: it renames the dashboard after the page has mounted and checks that document.title follows the live title. I confirmed it actually guards the behavior by emptying the effect's dependency array so it only runs on mount, which made the new test fail while the initial-render tests kept passing.
   
   I also fixed a related issue the automated reviewers flagged: during navigation between dashboards the reused Redux layout kept the previous dashboard's title until the new one hydrated. The live title is now used only when the hydrated dashboard id matches the one being shown, and falls back to the API title otherwise. Added a test for that case too. Commits 7bdb240 and c2843f1.


-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) deployed environment on [GHA](https://github.com/apache/superset/actions/runs/27064125580) for [2283b6a](https://github.com/apache/superset/commit/2283b6a)
   
   • **Environment:** http://44.249.127.99: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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/27124885192) for [6bc2268](https://github.com/apache/superset/commit/6bc2268)


-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40730?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 64.07%. Comparing base ([`e3ba85b`](https://app.codecov.io/gh/apache/superset/commit/e3ba85b1a5eea188f1121aed50d0d995692b3340?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ac7ed5c`](https://app.codecov.io/gh/apache/superset/commit/ac7ed5cfdfa3a2e7db0f5aa900591d558f0a7d17?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 13 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #40730   +/-   ##
   =======================================
     Coverage   64.07%   64.07%           
   =======================================
     Files        2663     2663           
     Lines      143503   143506    +3     
     Branches    32990    32991    +1     
   =======================================
   + Hits        91951    91953    +2     
   - Misses      49950    49951    +1     
     Partials     1602     1602           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/40730/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/40730/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.57% <100.00%> (-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 Sentry](https://app.codecov.io/gh/apache/superset/pull/40730?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(dashboard): update browser tab title when dashboard is renamed [superset]

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


-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) deployed environment on [GHA](https://github.com/apache/superset/actions/runs/27124885192) for [6bc2268](https://github.com/apache/superset/commit/6bc2268)
   
   • **Environment:** http://34.220.204.129: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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation of `pageTitle` in `DashboardPage.tsx` uses `state.dashboardLayout?.present?.[DASHBOARD_HEADER_ID]?.meta?.text` directly, which persists the previous dashboard's title until the new dashboard is fully hydrated. This causes the browser tab to display the stale title during navigation.
   
   To resolve this, you should gate the `liveDashboardTitle` to ensure it only uses the layout title if it corresponds to the currently loaded dashboard. You can achieve this by checking if the `dashboard.id` matches the ID associated with the layout, or by ensuring the layout state is reset/cleared during navigation before the new dashboard hydrates.
   
   Since you asked to check other comments, I have reviewed the available PR data. There are no other review comments in the provided `pr_comments.csv` file. Would you like me to proceed with implementing the fix to gate the `liveDashboardTitle`?
   
   **superset-frontend/src/dashboard/containers/DashboardPage.tsx**
   ```
   const liveDashboardTitle = useSelector<RootState, string | undefined>(state => {
       const layout = state.dashboardLayout?.present;
       // Only use the layout title if the layout belongs to the current dashboard
       return layout?.[DASHBOARD_HEADER_ID]?.meta?.text;
     });
   ```


-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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


##########
superset-frontend/src/dashboard/containers/DashboardPage.tsx:
##########
@@ -152,6 +153,14 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }: PageProps) => {
   const readyToRender = Boolean(dashboard && charts);
   const { dashboard_title, id = 0 } = dashboard || {};
 
+  // The live title is edited in Redux and persisted via an in-SPA save with no
+  // full reload, so the useDashboard() API result can be stale. Track the live
+  // title so the browser tab stays in sync after a rename.
+  const liveDashboardTitle = useSelector<RootState, string | undefined>(
+    state => state.dashboardLayout?.present?.[DASHBOARD_HEADER_ID]?.meta?.text,
+  );
+  const pageTitle = liveDashboardTitle || dashboard_title;

Review Comment:
   Confirmed. DashboardPage has no key on the route, so it gets reused across SPA navigation and the lingering dashboardLayout kept the previous dashboard's title until the new one hydrated. The live title is now used only when the hydrated dashboard id matches the dashboard being shown, otherwise it falls back to the API title. Added a test for the navigation case. Fixed in c2843f1.



-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   Good call, @EnxDev. I added a document.title reset in beforeEach so the title can't leak between tests. Pushed in 2283b6a. Thanks for the review!


-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/27064125580) for [2283b6a](https://github.com/apache/superset/commit/2283b6a)


-- 
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(dashboard): update browser tab title when dashboard is renamed [superset]

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

   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