Commit4da1a3c
feat(admin): group the /admin link dump into labeled sections, dedupe
feat(admin): group the /admin link dump into labeled sections, dedupe
The /admin landing page rendered ~25 admin links in one flat grid with
`is-primary` highlighting applied semi-randomly and no hierarchy, plus a
second "System Health" grid that DUPLICATED Env health and Security.
It read as a wall of links — the "admin needs a real redesign" problem.
Regrouped into 6 labeled sections reusing the existing .admin-action
card + .admin-h3 header styles (so it's an IA fix, not a restyle —
can't look worse, just organized):
- Operations & health (Operations, Health, Env health, Platform
monitor, Deploys, Self-host, AI background tasks)
- Users & access (Manage users/repos, Security, GDPR deletions)
- Sign-in & SSO (Google, GitHub, Enterprise SSO)
- AI & automation (Autopilot, AI cost breakdown, Connect Claude)
- Growth & billing (User growth, Stripe sync, Email digests)
- Platform config (Site flags, Integrations, Advancement)
- Maintenance (Reseed demo)
Command Center stays a featured full-width card on top. Removed the
duplicate Env health + Security entries.
Data-driven (groups array .map'd) so adding/moving an admin page is a
one-line edit instead of hand-writing another card. typecheck 0 errors,
admin tests 12/12.
Note: this is the information-architecture pass. The visual "clean
Vercel look" polish is a separate pass pending the browser screenshot
tool (currently glitching) so it can be verified visually, not shipped
blind.1 file changed+86−1204da1a3c87486eb589ae7ca7567dda9bad6fa91e7
1 changed file+86−120
Modifiedsrc/routes/admin.tsx+86−120View fileUnifiedSplit
@@ -2832,131 +2832,97 @@ admin.get("/admin", async (c) => {
28322832 </div>
28332833 </div>
28342834
2835 <div class="admin-actions">
2836 <a href="/admin/command" class="admin-action is-primary" style="grid-column:1/-1;background:var(--accent-gradient);color:#fff;border-color:transparent" title="Unified live ops view — gates, deploys, AI, auth anomalies, audit events">
2837 <span class="admin-action-icon">⚡</span>
2838 Command Center — live ops view
2839 </a>
2840 <a href="/admin/ops" class="admin-action is-primary">
2841 <span class="admin-action-icon">{Icons.ops}</span>
2842 Operations
2843 </a>
2844 <a href="/admin/integrations" class="admin-action is-primary">
2845 <span class="admin-action-icon">{Icons.key}</span>
2846 Integrations
2847 </a>
2848 <a href="/admin/health" class="admin-action is-primary">
2849 <span class="admin-action-icon">{Icons.pulse}</span>
2850 Health (traffic lights)
2851 </a>
2852 <a href="/admin/deploys" class="admin-action is-primary">
2853 <span class="admin-action-icon">{Icons.ops}</span>
2854 Deploys
2855 </a>
2856 <a href="/admin/env-health" class="admin-action">
2857 <span class="admin-action-icon">{Icons.pulse}</span>
2858 Env health
2859 </a>
2860 <a href="/admin/self-host" class="admin-action">
2861 <span class="admin-action-icon">{Icons.ops}</span>
2862 Self-host status
2863 </a>
2864 <a href="/admin/status" class="admin-action">
2865 <span class="admin-action-icon">{Icons.pulse}</span>
2866 Platform monitor
2867 </a>
2868 <a href="/admin/users" class="admin-action">
2869 <span class="admin-action-icon">{Icons.users}</span>
2870 Manage users
2871 </a>
2872 <a href="/admin/repos" class="admin-action">
2873 <span class="admin-action-icon">{Icons.repo}</span>
2874 Manage repos
2875 </a>
2876 <a href="/admin/flags" class="admin-action">
2877 <span class="admin-action-icon">{Icons.flag}</span>
2878 Site flags
2879 </a>
2880 <a href="/admin/digests" class="admin-action">
2881 <span class="admin-action-icon">{Icons.mail}</span>
2882 Email digests
2883 </a>
2884 <a href="/admin/google-oauth" class="admin-action">
2885 <span class="admin-action-icon">{Icons.google}</span>
2886 Sign in with Google
2887 </a>
2888 <a href="/admin/github-oauth" class="admin-action">
2889 <span class="admin-action-icon">{Icons.github}</span>
2890 Sign in with GitHub
2891 </a>
2892 <a href="/admin/sso" class="admin-action">
2893 <span class="admin-action-icon">{Icons.sso}</span>
2894 Enterprise SSO
2895 </a>
2896 <a href="/admin/ai-costs" class="admin-action is-primary">
2897 <span class="admin-action-icon">{Icons.dollarSign}</span>
2898 AI cost breakdown
2899 </a>
2900 <a href="/admin/growth" class="admin-action is-primary">
2901 <span class="admin-action-icon">{Icons.trendingUp}</span>
2902 User growth
2903 </a>
2904 <a href="/admin/autopilot" class="admin-action" title="CI healer, patch generator, proactive monitor, AI build tasks">
2905 <span class="admin-action-icon">{Icons.bot}</span>
2906 Autopilot
2907 </a>
2908 <a href="/admin/diagnose" class="admin-action" title="Live status of the AI CI healer, patch generator, and proactive monitor">
2909 <span class="admin-action-icon">{Icons.bot}</span>
2910 AI background tasks
2911 </a>
2912 <a href="/connect/claude" class="admin-action is-primary">
2913 <span class="admin-action-icon">{Icons.bot}</span>
2914 Connect Claude
2915 </a>
2916 <a href="/admin/deletions" class="admin-action">
2917 <span class="admin-action-icon">{Icons.flag}</span>
2918 GDPR Deletions
2919 </a>
2920 <a href="/admin/stripe" class="admin-action">
2921 <span class="admin-action-icon">{Icons.key}</span>
2922 Stripe Sync
2923 </a>
2924 <form
2925 method="post"
2926 action="/admin/demo/reseed"
2927 class="admin-action-form"
2928 >
2929 <button
2930 class="admin-action"
2931 type="submit"
2932 title="Idempotently (re)create demo user + 3 sample repos"
2933 >
2934 <span class="admin-action-icon">{Icons.refresh}</span>
2935 Reseed demo
2936 </button>
2937 </form>
2938 </div>
2835 {/* Featured: live ops view */}
2836 <a href="/admin/command" class="admin-action is-primary" style="grid-column:1/-1;display:flex;background:var(--accent-gradient);color:#fff;border-color:transparent;margin-bottom:var(--space-5)" title="Unified live ops view — gates, deploys, AI, auth anomalies, audit events">
2837 <span class="admin-action-icon">⚡</span>
2838 Command Center — live ops view
2839 </a>
2840
2841 {/* Grouped admin surface — one labeled section per concern, deduped.
2842 Was a flat ~25-link dump plus a duplicate "System Health" grid. */}
2843 {[
2844 {
2845 title: "Operations & health",
2846 items: [
2847 { href: "/admin/ops", icon: Icons.ops, label: "Operations" },
2848 { href: "/admin/health", icon: Icons.pulse, label: "Health (traffic lights)" },
2849 { href: "/admin/env-health", icon: Icons.pulse, label: "Env health" },
2850 { href: "/admin/status", icon: Icons.pulse, label: "Platform monitor" },
2851 { href: "/admin/deploys", icon: Icons.ops, label: "Deploys" },
2852 { href: "/admin/self-host", icon: Icons.ops, label: "Self-host status" },
2853 { href: "/admin/diagnose", icon: Icons.bot, label: "AI background tasks" },
2854 ],
2855 },
2856 {
2857 title: "Users & access",
2858 items: [
2859 { href: "/admin/users", icon: Icons.users, label: "Manage users" },
2860 { href: "/admin/repos", icon: Icons.repo, label: "Manage repos" },
2861 { href: "/admin/security", icon: Icons.starShield, label: "Security" },
2862 { href: "/admin/deletions", icon: Icons.flag, label: "GDPR deletions" },
2863 ],
2864 },
2865 {
2866 title: "Sign-in & SSO",
2867 items: [
2868 { href: "/admin/google-oauth", icon: Icons.google, label: "Sign in with Google" },
2869 { href: "/admin/github-oauth", icon: Icons.github, label: "Sign in with GitHub" },
2870 { href: "/admin/sso", icon: Icons.sso, label: "Enterprise SSO" },
2871 ],
2872 },
2873 {
2874 title: "AI & automation",
2875 items: [
2876 { href: "/admin/autopilot", icon: Icons.bot, label: "Autopilot" },
2877 { href: "/admin/ai-costs", icon: Icons.dollarSign, label: "AI cost breakdown" },
2878 { href: "/connect/claude", icon: Icons.bot, label: "Connect Claude" },
2879 ],
2880 },
2881 {
2882 title: "Growth & billing",
2883 items: [
2884 { href: "/admin/growth", icon: Icons.trendingUp, label: "User growth" },
2885 { href: "/admin/stripe", icon: Icons.key, label: "Stripe sync" },
2886 { href: "/admin/digests", icon: Icons.mail, label: "Email digests" },
2887 ],
2888 },
2889 {
2890 title: "Platform config",
2891 items: [
2892 { href: "/admin/flags", icon: Icons.flag, label: "Site flags" },
2893 { href: "/admin/integrations", icon: Icons.key, label: "Integrations" },
2894 { href: "/admin/advancement", icon: Icons.trendingUp, label: "Advancement" },
2895 ],
2896 },
2897 ].map((group) => (
2898 <>
2899 <div class="admin-h3">
2900 <h3>{group.title}</h3>
2901 </div>
2902 <div class="admin-actions" style="margin-bottom:var(--space-5)">
2903 {group.items.map((it) => (
2904 <a href={it.href} class="admin-action">
2905 <span class="admin-action-icon">{it.icon}</span>
2906 {it.label}
2907 </a>
2908 ))}
2909 </div>
2910 </>
2911 ))}
29392912
2913 {/* Maintenance — destructive/idempotent one-offs */}
29402914 <div class="admin-h3">
2941 <h3>System Health</h3>
2942 <span class="admin-h3-meta">Ops & security pages</span>
2915 <h3>Maintenance</h3>
29432916 </div>
29442917 <div class="admin-actions" style="margin-bottom:var(--space-5)">
2945 <a href="/admin/env-health" class="admin-action is-primary" title="Check which features are enabled via env vars">
2946 <span class="admin-action-icon">{Icons.pulse}</span>
2947 Env health
2948 </a>
2949 <a href="/admin/advancement" class="admin-action" title="Platform advancement tracker">
2950 <span class="admin-action-icon">{Icons.trendingUp}</span>
2951 Advancement
2952 </a>
2953 <a href="/admin/security" class="admin-action" title="Security overview">
2954 <span class="admin-action-icon">{Icons.starShield}</span>
2955 Security
2956 </a>
2918 <form method="post" action="/admin/demo/reseed" class="admin-action-form">
2919 <button class="admin-action" type="submit" title="Idempotently (re)create demo user + 3 sample repos">
2920 <span class="admin-action-icon">{Icons.refresh}</span>
2921 Reseed demo
2922 </button>
2923 </form>
29572924 </div>
2958
2959 <div class="admin-automation-tile">
2925<div class="admin-automation-tile">
29602926 <div class="admin-automation-heading">
29612927 <span class="admin-automation-heading-icon" aria-hidden="true">{Icons.bot}</span>
29622928 <span class="admin-automation-heading-label">Automation Activity</span>
29632929