feat: Removed yellow semantic-search-unavailable banner from search res…

- "frontend/src/pages/SearchResults.tsx"
- "frontend/src/App.css"
- "frontend/src/components/AppFooter.tsx"
- "frontend/package.json"

GSD-Task: S02/T02
This commit is contained in:
jlightner 2026-03-31 05:14:58 +00:00
parent 127919565a
commit deb060cfa3
7 changed files with 102 additions and 28 deletions

View file

@ -30,7 +30,7 @@
- Estimate: 20m
- Files: backend/models.py, backend/routers/creators.py, alembic/versions/
- Verify: cd backend && python -c "from models import Creator; print('hidden' in [c.key for c in Creator.__table__.columns])" && alembic check 2>&1 | head -5
- [ ] **T02: Remove fallback banner, clean up footer, and bump version** — Three independent frontend cleanups:
- [x] **T02: Removed yellow semantic-search-unavailable banner from search results, simplified footer to hide commit info in dev builds, and bumped version to 0.8.0** — Three independent frontend cleanups:
1. Remove the yellow 'semantic search unavailable' fallback banner from SearchResults
2. Clean up the footer to hide commit info when value is 'dev' (already partially done — verify and simplify)
3. Bump package.json version to 0.8.0

View file

@ -0,0 +1,16 @@
{
"schemaVersion": 1,
"taskId": "T01",
"unitId": "M008/S02/T01",
"timestamp": 1774933997939,
"passed": true,
"discoverySource": "task-plan",
"checks": [
{
"command": "cd backend",
"exitCode": 0,
"durationMs": 7,
"verdict": "pass"
}
]
}

View file

@ -0,0 +1,83 @@
---
id: T02
parent: S02
milestone: M008
provides: []
requires: []
affects: []
key_files: ["frontend/src/pages/SearchResults.tsx", "frontend/src/App.css", "frontend/src/components/AppFooter.tsx", "frontend/package.json"]
key_decisions: ["Removed fallbackUsed state entirely since TS strict mode flags unused variables — keeping dead state would break builds"]
patterns_established: []
drill_down_paths: []
observability_surfaces: []
duration: ""
verification_result: "All grep checks pass (no banner references remain), version confirmed as 0.8.0, npm run build succeeds with zero errors. Slice-level Creator model check also passes."
completed_at: 2026-03-31T05:14:46.779Z
blocker_discovered: false
---
# T02: Removed yellow semantic-search-unavailable banner from search results, simplified footer to hide commit info in dev builds, and bumped version to 0.8.0
> Removed yellow semantic-search-unavailable banner from search results, simplified footer to hide commit info in dev builds, and bumped version to 0.8.0
## What Happened
---
id: T02
parent: S02
milestone: M008
key_files:
- frontend/src/pages/SearchResults.tsx
- frontend/src/App.css
- frontend/src/components/AppFooter.tsx
- frontend/package.json
key_decisions:
- Removed fallbackUsed state entirely since TS strict mode flags unused variables — keeping dead state would break builds
duration: ""
verification_result: passed
completed_at: 2026-03-31T05:14:46.780Z
blocker_discovered: false
---
# T02: Removed yellow semantic-search-unavailable banner from search results, simplified footer to hide commit info in dev builds, and bumped version to 0.8.0
**Removed yellow semantic-search-unavailable banner from search results, simplified footer to hide commit info in dev builds, and bumped version to 0.8.0**
## What Happened
Three independent frontend cleanups: (1) removed fallback banner JSX and CSS rule plus the now-unused fallbackUsed state variable, (2) simplified AppFooter to conditionally hide commit section when __GIT_COMMIT__ is 'dev' instead of showing plain 'dev' text, (3) bumped package.json version to 0.8.0. Build passes with zero errors.
## Verification
All grep checks pass (no banner references remain), version confirmed as 0.8.0, npm run build succeeds with zero errors. Slice-level Creator model check also passes.
## Verification Evidence
| # | Command | Exit Code | Verdict | Duration |
|---|---------|-----------|---------|----------|
| 1 | `grep -q 'search-fallback-banner' frontend/src/pages/SearchResults.tsx` | 1 | ✅ pass (not found) | 100ms |
| 2 | `grep -q 'search-fallback-banner' frontend/src/App.css` | 1 | ✅ pass (not found) | 100ms |
| 3 | `grep -q '"0.8.0"' frontend/package.json` | 0 | ✅ pass | 100ms |
| 4 | `cd frontend && npm run build` | 0 | ✅ pass | 2600ms |
## Deviations
Removed fallbackUsed state variable entirely — TS strict mode flagged it as unused after banner JSX removal, causing build failure. Plan said to keep it.
## Known Issues
None.
## Files Created/Modified
- `frontend/src/pages/SearchResults.tsx`
- `frontend/src/App.css`
- `frontend/src/components/AppFooter.tsx`
- `frontend/package.json`
## Deviations
Removed fallbackUsed state variable entirely — TS strict mode flagged it as unused after banner JSX removal, causing build failure. Plan said to keep it.
## Known Issues
None.

View file

@ -1,7 +1,7 @@
{
"name": "chrysopedia-web",
"private": true,
"version": "0.1.0",
"version": "0.8.0",
"type": "module",
"scripts": {
"dev": "vite",

View file

@ -1116,16 +1116,6 @@ a.app-footer__repo:hover {
max-width: 64rem;
}
.search-fallback-banner {
padding: 0.5rem 0.75rem;
background: var(--color-banner-amber-bg);
border: 1px solid var(--color-banner-amber-border);
border-radius: 0.375rem;
font-size: 0.8125rem;
color: var(--color-banner-amber-text);
margin-bottom: 1rem;
}
.search-group {
margin-bottom: 1.5rem;
}

View file

@ -15,7 +15,7 @@ export default function AppFooter() {
<span className="app-footer__date">
Built {__BUILD_DATE__.slice(0, 10)}
</span>
{commitUrl ? (
{commitUrl && (
<>
<span className="app-footer__sep">·</span>
<a
@ -27,11 +27,6 @@ export default function AppFooter() {
{__GIT_COMMIT__}
</a>
</>
) : (
<>
<span className="app-footer__sep">·</span>
<span className="app-footer__commit">{__GIT_COMMIT__}</span>
</>
)}
<span className="app-footer__sep">·</span>
<a

View file

@ -16,7 +16,6 @@ export default function SearchResults() {
const q = searchParams.get("q") ?? "";
const [results, setResults] = useState<SearchResultItem[]>([]);
const [fallbackUsed, setFallbackUsed] = useState(false);
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
const [localQuery, setLocalQuery] = useState(q);
@ -25,7 +24,6 @@ export default function SearchResults() {
const doSearch = useCallback(async (query: string) => {
if (!query.trim()) {
setResults([]);
setFallbackUsed(false);
return;
}
@ -34,7 +32,6 @@ export default function SearchResults() {
try {
const res = await searchApi(query.trim());
setResults(res.items);
setFallbackUsed(res.fallback_used);
} catch (err) {
setError(err instanceof Error ? err.message : "Search failed");
setResults([]);
@ -97,13 +94,6 @@ export default function SearchResults() {
{loading && <div className="loading">Searching</div>}
{error && <div className="loading error-text">Error: {error}</div>}
{/* Fallback banner */}
{!loading && fallbackUsed && results.length > 0 && (
<div className="search-fallback-banner">
Showing keyword results semantic search unavailable
</div>
)}
{/* No results */}
{!loading && !error && q && results.length === 0 && (
<div className="empty-state">