Skip to content

feat(dashboard): Show the archived sites when a team has no live sites (backport #7426) - #7437

Open
mergify[bot] wants to merge 3 commits into
masterfrom
mergify/bp/master/pr-7426
Open

feat(dashboard): Show the archived sites when a team has no live sites (backport #7426)#7437
mergify[bot] wants to merge 3 commits into
masterfrom
mergify/bp/master/pr-7426

Conversation

@mergify

@mergify mergify Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The problem

A team can archive all of its sites. The site list then shows only "No sites".
The user gets no information and no next step.

The archived sites stay in the account. But the status filter removes the
Archived status by default. So the list hides them.

The team in this example has three archived sites and no live site:

The site list shows No sites

The change

The site list changes to the archived view when the team has no live site:

  • The page applies the Archived status filter.
  • The page shows the archived sites.
  • The URL becomes /sites?status=Archived.
  • A banner says why the page shows the archived sites.

This is the same team, and the same URL:

The site list shows the archived sites and a banner

A team with no site

A team with no site at all keeps the default list. The page does not change to
the archived view. The user creates the first site from this page.

The site list shows No sites and the New Site button

The status in the URL

The page reads the status filter from the URL. A user can send
/sites?status=Archived as a link.

A status in the URL also stops the automatic change. The user asked for that
status.

Vue keeps this page when only the query changes. The back button is an example.
So the page watches the status in the URL, and applies the new status.

The check for live sites

The page uses the result of the count request that it makes already. It does not
make a new request. That request has no shared cache. So its result is always
the live sites of the current team.

The page makes the check one time on the first load. It makes the check again
after the user archives a site. It does not make the check for a different
filter. An empty result for a region or a tag does not move the user.

Tests

I used a local bench and the dashboard development server. I made two demo
teams: one team with three archived sites, and one team with no site.

Test Result
The team has live sites /sites, no banner, the live sites in the list
The team has archived sites only /sites?status=Archived, the banner, the archived sites in the list
The team has no site at all /sites, no banner, the default list and the New Site button
A link to /sites?status=Archived, and the team has live sites The Archived filter stays, and there is no banner
The sidebar Sites link, from /sites?status=Archived The URL and the filter go back to the live statuses
The user drops the last live site from the list The page changes to the archived view, with no reload

This is an automatic backport of pull request #7426 done by [Mergify](https://mergify.com).

Shariq Khatri and others added 3 commits September 10, 2026 09:36
A team that drops all of its sites gets an empty site list. The list gives
the user no information and no next step. Show the archived sites instead,
and add an info banner that says why.

The page reads the status filter from the URL, so /sites?status=Archived is
a link that a user can share. The check uses the result of the existing
count request, not a new request, because that request has no shared cache
and always returns the live sites of the current team.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit f7cf425)
…tion

Two problems from the review of #7426.

Vue keeps the site list when only the query changes. A link to /sites from
the sidebar left the Archived filter and the archived rows on the page. Watch
the status in the URL and apply it.

The fallback ran one time for each mount. A user who archived the last live
site from this page went back to the empty list. Reload the count after the
archive and arm the check again. The check stays off for a filter change, so
an empty result for a region or a tag does not move the user.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 55b9472)
The fallback must not move an account that has no site at all. That account
must stay on the default list, where it can create the first site. The guard
does this already. Record the reason, so a later change keeps it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 5f72d1f)
@mergify

mergify Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@ea7f217). Learn more about missing BASE report.
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #7437   +/-   ##
=========================================
  Coverage          ?   86.91%           
=========================================
  Files             ?      137           
  Lines             ?    26328           
  Branches          ?     1703           
=========================================
  Hits              ?    22884           
  Misses            ?     3405           
  Partials          ?       39           
Flag Coverage Δ
dashboard 86.91% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants