Fix favicon and dashboard route 404s found in QA exploration
Problem
Investigate and fix the remaining favicon.ico 404 and the dashboard route-level 404 surfaced by qa-explore so console diagnostics are clean on the explored cloud flows.
Context
- QA exploration surfaced two remaining console/network issues on the cloud app:
- browsers still probed
/favicon.icoand got a404 - direct navigation to legacy dashboard URLs like
/{org}/{project}/{dashboard_slug}/returned Django's debug404, because the canonical route now requires/d/{dashboard_slug}/ - The malformed dashboard path in the QA transcript was not emitted by the current UI templates; it came from a direct navigation attempt. That still warrants a compatibility fix so stale links and guessed URLs resolve cleanly instead of failing.
- The cloud base template already defined an inline SVG favicon, but browsers still made a fallback
/favicon.icorequest. The practical fix is to provide an explicit favicon asset and route-level handling.
Possible Solutions
- Add an explicit static favicon asset, reference it from the base template, and serve
/favicon.icovia a redirect to that static asset. - Recommended: small change, eliminates the console noise, and gives browsers a concrete fallback target.
- Add a project-level legacy dashboard redirect from
/{org}/{project}/{dashboard_slug}/to/{org}/{project}/d/{dashboard_slug}/. - Recommended: preserves compatibility for stale links and QA/tooling guesses without changing the canonical URL structure.
- Ignore the legacy path because the current UI does not generate it.
- Rejected: the QA flow still hit it, and a clean redirect is low-risk.
Plan
- Add a concrete favicon asset plus
/favicon.icohandling in the cloud app. - Add a legacy dashboard redirect view/route that preserves query strings and forwards to the canonical
dashboard_view. - Add focused cloud route smoke tests for both behaviors.
- Run a QA verification pass against the local cloud URL and confirm the 404s are gone.
Implementation Progress
- Added
apps/cloud/static/favicon.svgand updatedapps/cloud/templates/base.htmlto use the static favicon for bothiconandshortcut icon. - Added a
/favicon.icoroute inapps/cloud/urls.pybacked by a request-time redirect view so browser fallback probes resolve cleanly without import-time static URL resolution. - Added
dashboard_legacy_redirectinapps/cloud/apps/dashboards/views.pyand wired it intoapps/cloud/urls.pyafter the canonical project routes, preserving query strings while redirecting old-style dashboard URLs to/{org}/{project}/d/{dashboard_slug}/. - Tightened the legacy redirect so it only fires for real dashboards; reserved slugs like
chartsandbranchesno longer get rewritten. - Added focused smoke coverage in
tests/cloud/test_cloud_route_smoke.pyfor: - legacy dashboard URL redirect behavior
- favicon route redirect behavior
- project route non-shadowing for
charts/andbranches/ - Focused validation passed:
uv run pytest tests/cloud/test_cloud_route_smoke.py -q(8 passed).
QA Exploration
- Restarted the task worktree stack with
just worktree-restart-serveand verifiedhttp://127.0.0.1:8100was healthy. - Ran the patched
qa-explorewrapper from the active tooling task against this task worktree URL with focus on: - favicon resolution
- legacy dashboard URL redirect behavior
- The verification artifact bundle is in
/Users/dave.fowler/Fivetran/fix-qa-explore-delegated-run-stall-before-summary-handoff/.qa-explorer/runs/404-fix-verification. - The recovered QA summary reported:
- no captured console errors
- no failed requests in the saved diagnostics
- The saved Playwright session confirmed the legacy route now redirects:
GET /piedpiper/platform-analytics/adoption/ => 302-
followed by
GET /piedpiper/platform-analytics/d/adoption/ => 200 -
[x] QA exploration completed (or N/A for non-UI tasks)
Review Feedback
- Review flagged that the first legacy catch-all route could shadow
charts/andbranches/. I moved the catch-all to the end of the project route list, added explicit smoke coverage for sibling routes, and tightened the redirect view to404when the slug is not a real dashboard. - Review also flagged import-time
static("favicon.svg")resolution inurls.py. I moved favicon handling into a request-time redirect view so the static URL is resolved lazily. - [x] Review cleared