Dataface Tasks

Fix favicon and dashboard route 404s found in QA exploration

IDCLOUD_SUITE-FIX_FAVICON_AND_DASHBOARD_ROUTE_404S_FOUND_IN_QA_EXPLORATION
Statuscompleted
Priorityp1
Milestonem1-ft-analytics-analyst-pilot
Ownerui-design-frontend-dev
Completed bydave
Completed2026-03-22

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.ico and got a 404
  • direct navigation to legacy dashboard URLs like /{org}/{project}/{dashboard_slug}/ returned Django's debug 404, 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.ico request. 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.ico via 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

  1. Add a concrete favicon asset plus /favicon.ico handling in the cloud app.
  2. Add a legacy dashboard redirect view/route that preserves query strings and forwards to the canonical dashboard_view.
  3. Add focused cloud route smoke tests for both behaviors.
  4. Run a QA verification pass against the local cloud URL and confirm the 404s are gone.

Implementation Progress

  • Added apps/cloud/static/favicon.svg and updated apps/cloud/templates/base.html to use the static favicon for both icon and shortcut icon.
  • Added a /favicon.ico route in apps/cloud/urls.py backed by a request-time redirect view so browser fallback probes resolve cleanly without import-time static URL resolution.
  • Added dashboard_legacy_redirect in apps/cloud/apps/dashboards/views.py and wired it into apps/cloud/urls.py after 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 charts and branches no longer get rewritten.
  • Added focused smoke coverage in tests/cloud/test_cloud_route_smoke.py for:
  • legacy dashboard URL redirect behavior
  • favicon route redirect behavior
  • project route non-shadowing for charts/ and branches/
  • 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-serve and verified http://127.0.0.1:8100 was healthy.
  • Ran the patched qa-explore wrapper 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/ and branches/. 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 to 404 when the slug is not a real dashboard.
  • Review also flagged import-time static("favicon.svg") resolution in urls.py. I moved favicon handling into a request-time redirect view so the static URL is resolved lazily.
  • [x] Review cleared