browse: correct no-search-results state (0.73.0)

- searching (or tag-filtering) with no matches wrongly showed the 'No agents
  here yet — be the first' onboarding, implying the whole marketplace was
  empty even when agents exist
- now distinguishes: a query/tag with no matches shows 'No mercenaries match
  <term>' + a Clear search button; the be-the-first onboarding only shows when
  the roster is genuinely empty (no query, no tag)
- verified live: 'zzznomatch' shows the no-match state, Clear restores results
This commit is contained in:
artheru 2026-06-10 10:41:03 +08:00
parent 0f9d553deb
commit d9d652dfd5
5 changed files with 18 additions and 4 deletions

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0e0a14" />
<meta name="description" content="amerc is the agent mercenary tavern — hire, run, publish, and remotely deliver AI agents across software boundaries. No infrastructure, just skills." />
<meta name="version" content="0.72.0-skiplink" />
<meta name="version" content="0.73.0-search" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/app-192.png" type="image/png" sizes="192x192" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />

View File

@ -1,6 +1,6 @@
{
"name": "amerc-site",
"version": "0.72.0-skiplink",
"version": "0.73.0-search",
"private": true,
"type": "module",
"scripts": {

View File

@ -73,7 +73,15 @@ export function AgentBrowse({ auth, setRoute }) {
<span className="ap-add-cta">Open My Booth </span>
</button>
)}
{loaded && !classes.length && (
{loaded && !classes.length && (q || tag) && (
<div className="ap-empty-search">
<span className="ap-empty-search-ico" aria-hidden="true">🔍</span>
<h3>No mercenaries match {q ? `${q}` : `#${tag}`}.</h3>
<p>Try a different term or clear the filter.</p>
<button className="px-action" onClick={() => { setQ(''); setTag(''); }}>Clear search</button>
</div>
)}
{loaded && !classes.length && !q && !tag && (
<div className="ap-empty-start">
<h3>No agents here yet be the first.</h3>
<ol>

View File

@ -7,7 +7,7 @@ import Account from './Account.jsx';
import TavernGame from './TavernGame.jsx';
import { api } from './api.js';
const RELEASE = '0.72.0-skiplink';
const RELEASE = '0.73.0-search';
const NAV = [
{ id: 'home', label: 'Tavern' },

View File

@ -1474,3 +1474,9 @@ button {
font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 9px;
box-shadow: 0 6px 18px rgba(0,0,0,0.4); text-decoration: none; transform: translateY(-160%); transition: transform .16s ease-out; }
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 2px solid #fff; outline-offset: 2px; }
/* browse: no-search-results state (0.73) */
.ap-empty-search { grid-column: 1 / -1; text-align: center; padding: 44px 20px; color: #b6a7d4; }
.ap-empty-search-ico { font-size: 34px; display: block; margin-bottom: 10px; opacity: 0.85; }
.ap-empty-search h3 { color: #fff; font-size: 18px; margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; }
.ap-empty-search p { margin: 0 0 16px; font-size: 13px; }