UI/UX: - Bill detail page tab UI (Analysis / Timeline / Votes / Notes) - Topic tag pills on bill detail and listing pages — filtered to known topics, clickable, properly labelled via shared lib/topics.ts - Notes panel always-open in Notes tab; sign-in prompt for guests - Collapsible sidebar with icon-only mode and localStorage persistence - Bills page defaults to has-text filter enabled - Follow mode dropdown transparency fix - Favicon (Landmark icon, blue background) Security: - Fernet encryption for ntfy passwords at rest (app/core/crypto.py) - Separate ENCRYPTION_SECRET_KEY env var; falls back to JWT derivation - ntfy_password no longer returned in GET response — replaced with ntfy_password_set: bool; NotificationSettingsUpdate type for writes - JWT_SECRET_KEY fail-fast on startup if using default placeholder - get_optional_user catches (JWTError, ValueError) only, not Exception Bug fixes & code quality: - Dashboard N+1 topic query replaced with single OR query - notification_utils.py topic follower N+1 replaced with batch query - Note query in bill detail page gated on token (enabled: !!token) - search.py max_length=500 guard against oversized queries - CollectionCreate.validate_name wired up with @field_validator - LLM_RATE_LIMIT_RPM default raised from 10 to 50 Authored by: Jack Levy
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { Tags } from "lucide-react";
|
|
import { FollowButton } from "@/components/shared/FollowButton";
|
|
import { TOPICS } from "@/lib/topics";
|
|
|
|
export default function TopicsPage() {
|
|
return (
|
|
<div className="space-y-6">
|
|
<div>
|
|
<h1 className="text-2xl font-bold">Topics</h1>
|
|
<p className="text-muted-foreground text-sm mt-1">
|
|
Follow topics to see related bills in your feed
|
|
</p>
|
|
</div>
|
|
|
|
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
|
{TOPICS.map(({ tag, label, desc }) => (
|
|
<div key={tag} className="bg-card border border-border rounded-lg p-4 flex items-start justify-between gap-3">
|
|
<div>
|
|
<div className="flex items-center gap-2 mb-1">
|
|
<Tags className="w-3.5 h-3.5 text-muted-foreground" />
|
|
<Link
|
|
href={`/bills?topic=${tag}`}
|
|
className="font-medium text-sm hover:text-primary transition-colors"
|
|
>
|
|
{label}
|
|
</Link>
|
|
</div>
|
|
<p className="text-xs text-muted-foreground">{desc}</p>
|
|
</div>
|
|
<FollowButton type="topic" value={tag} />
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|