feat(dashboard): promote CCS Bar globally

This commit is contained in:
Tam Nhu Tran
2026-06-12 14:51:08 -04:00
parent 8e73ee0acc
commit b9356a7ce6
13 changed files with 306 additions and 182 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

+224
View File
@@ -0,0 +1,224 @@
<!doctype html>
<html lang="en" class="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>CCS Bar Promo Evidence</title>
<style>
:root {
--bg: #0d0d0d;
--fg: #e8e4df;
--card: #1a1714;
--border: #2d2923;
--muted: #8a837d;
--accent: #ef4444;
--good: #22c55e;
--code: #151210;
}
.light {
--bg: #f8f6f3;
--fg: #1a1714;
--card: #ffffff;
--border: #e5e0da;
--muted: #6b6560;
--accent: #dc2626;
--good: #15803d;
--code: #f3f0eb;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--bg);
color: var(--fg);
font-family:
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
main {
width: min(1180px, calc(100% - 32px));
margin: 0 auto;
padding: 32px 0 56px;
}
button {
border: 1px solid var(--border);
background: var(--card);
color: var(--fg);
border-radius: 8px;
padding: 8px 12px;
cursor: pointer;
}
.top {
display: flex;
align-items: start;
justify-content: space-between;
gap: 16px;
margin-bottom: 24px;
}
h1,
h2,
p {
margin: 0;
}
h1 {
font-size: clamp(28px, 4vw, 48px);
line-height: 1.04;
letter-spacing: 0;
}
.sub {
margin-top: 10px;
color: var(--muted);
max-width: 760px;
line-height: 1.55;
}
.cards {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
margin: 24px 0;
}
.card,
.shot,
.section {
background: var(--card);
border: 1px solid var(--border);
border-radius: 8px;
}
.card {
padding: 16px;
}
.card h2 {
font-size: 13px;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 8px;
}
.card p {
line-height: 1.45;
}
.section {
padding: 18px;
margin-top: 16px;
}
.section h2 {
font-size: 20px;
margin-bottom: 6px;
}
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-top: 14px;
}
.shot {
overflow: hidden;
}
.shot-header {
display: flex;
justify-content: space-between;
gap: 12px;
border-bottom: 1px solid var(--border);
padding: 10px 12px;
font-size: 13px;
}
.pill {
color: var(--accent);
font-weight: 800;
letter-spacing: 0;
}
img {
display: block;
width: 100%;
height: auto;
}
code {
background: var(--code);
border-radius: 6px;
padding: 2px 5px;
}
@media (max-width: 900px) {
main {
width: min(100% - 20px, 1180px);
padding-top: 20px;
}
.top,
.grid {
grid-template-columns: 1fr;
display: block;
}
.cards {
grid-template-columns: 1fr;
}
.shot + .shot {
margin-top: 14px;
}
}
</style>
</head>
<body>
<main>
<div class="top">
<div>
<h1>PR 1517 · CCS Bar README and dashboard promotion</h1>
<p class="sub">
Captures from local branch <code>kai/feat/ccs-bar-promo</code>. Dashboard capture uses
Vite at <code>127.0.0.1:5187</code>, light theme, 1440x900 viewport, local auth-check
stubbed open, and no private account data.
</p>
</div>
<button id="theme-toggle" type="button">● Dark</button>
</div>
<div class="cards">
<section class="card">
<h2>What Changed</h2>
<p>README now introduces CCS Bar, and dashboard chrome shows a compact global CCS Bar link.</p>
</section>
<section class="card">
<h2>Why It Matters</h2>
<p>Users can discover the native macOS quota and usage companion from every dashboard route.</p>
</section>
<section class="card">
<h2>Review Cue</h2>
<p>Red callout marks the new top-bar button next to ClaudeKit and Sponsor controls.</p>
</section>
</div>
<section class="section">
<h2>1. Global Dashboard Entry Point</h2>
<p class="sub">The compact CCS Bar button is visible in the persistent dashboard header.</p>
<div class="grid">
<article class="shot">
<div class="shot-header">
<span class="pill">IMPLEMENTED</span>
<span>Dashboard chrome</span>
</div>
<img
src="dashboard-header-ccs-bar-button.png"
alt="CCS dashboard header with red callout around the CCS Bar button"
/>
</article>
<article class="shot">
<div class="shot-header">
<span class="pill">CURRENT SNAPSHOT</span>
<span>Sanitized CCS Bar panel</span>
</div>
<img
src="ccs-bar-panel.webp"
alt="Sanitized CCS Bar macOS panel showing quota, spend, and account controls"
/>
</article>
</div>
</section>
</main>
<script>
const button = document.querySelector("#theme-toggle");
button.addEventListener("click", () => {
document.documentElement.classList.toggle("light");
button.textContent = document.documentElement.classList.contains("light")
? "● Dark"
: "○ Light";
});
</script>
</body>
</html>
+12
View File
@@ -116,6 +116,17 @@ Need the full setup path instead of the short version?
## See CCS In Action
### CCS Bar For macOS
![CCS Bar](assets/screenshots/ccs-bar-panel.webp)
CCS Bar puts live subscription quota, daily spend, and account controls in the
macOS menu bar. Install it with `ccs bar install`, launch it with `ccs bar`, and
tell us what would make it more useful: issues and ideas are welcome in
[GitHub Issues](https://github.com/kaitranntt/ccs/issues).
Deep dive: [CCS Bar](https://docs.ccs.kaitran.ca/features/dashboard/ccs-bar).
### Usage Analytics
![Analytics Dashboard](assets/screenshots/analytics.webp)
@@ -164,6 +175,7 @@ reference material.
| Install CCS cleanly on a new machine | [Installation](https://docs.ccs.kaitran.ca/getting-started/installation) |
| Go from install to a successful first run | [Your First CCS Session](https://docs.ccs.kaitran.ca/getting-started/first-session) |
| See the dashboard and workflow surfaces before setup | [Product Tour](https://docs.ccs.kaitran.ca/getting-started/product-tour) |
| Install the native macOS menu-bar companion | [CCS Bar](https://docs.ccs.kaitran.ca/features/dashboard/ccs-bar) |
| Compare OAuth providers, Claude accounts, and API profiles | [Provider Overview](https://docs.ccs.kaitran.ca/providers/concepts/overview) |
| Learn the dashboard structure and feature pages | [Dashboard Overview](https://docs.ccs.kaitran.ca/features/dashboard/overview) |
| Configure profiles, paths, and environment variables | [Configuration](https://docs.ccs.kaitran.ca/getting-started/configuration) |
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

+2
View File
@@ -10,6 +10,7 @@ import { ConnectionIndicator } from '@/components/shared/connection-indicator';
import { LocalhostDisclaimer } from '@/components/shared/localhost-disclaimer';
import { Skeleton } from '@/components/ui/skeleton';
import { ClaudeKitBadge } from '@/components/shared/claudekit-badge';
import { CcsBarButton } from '@/components/shared/ccs-bar-button';
import { SponsorButton } from '@/components/shared/sponsor-button';
import { ProjectSelectionDialog } from '@/components/shared/project-selection-dialog';
import { DeviceCodeDialog } from '@/components/shared/device-code-dialog';
@@ -44,6 +45,7 @@ export function Layout() {
<header className="flex h-14 items-center justify-between px-6 border-b shrink-0 bg-background shadow-sm z-20">
<div className="flex items-center gap-3">
<ClaudeKitBadge />
<CcsBarButton />
<SponsorButton />
</div>
<div className="flex items-center gap-2">
@@ -1,101 +0,0 @@
/**
* CCS Bar Feature Banner
* Dismissible announcement banner promoting the native macOS menu-bar app.
*
* Rendered only on macOS: the CTA is an install action (`ccs bar install`) that
* has no effect on other platforms, so showing it elsewhere would be misleading.
*/
/* eslint-disable react-hooks/set-state-in-effect */
import { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { X, MonitorDot, ExternalLink } from 'lucide-react';
import { Button } from '@/components/ui/button';
const BANNER_DISMISSED_KEY = 'ccs:ccs-bar-banner-dismissed';
// User-facing docs page for CCS Bar (flat Markdown in the ccs/cli docs tree).
const CCS_BAR_DOCS_URL = 'https://github.com/kaitranntt/ccs/blob/main/docs/ccs-bar.md';
// Lightweight, dependency-free macOS detection. Kept inline because no other
// component needs platform detection; a shared hook would be premature.
const isMacOS =
typeof navigator !== 'undefined' &&
/Mac|iPhone|iPad/i.test(navigator.userAgent || navigator.platform || '');
interface CcsBarBannerProps {
onInstallClick?: () => void;
}
export function CcsBarBanner({ onInstallClick }: CcsBarBannerProps) {
const { t } = useTranslation();
const [dismissed, setDismissed] = useState(true); // Start hidden to avoid flash
// Check localStorage on mount
useEffect(() => {
const isDismissed = localStorage.getItem(BANNER_DISMISSED_KEY) === 'true';
setDismissed(isDismissed);
}, []);
const handleDismiss = () => {
localStorage.setItem(BANNER_DISMISSED_KEY, 'true');
setDismissed(true);
};
if (!isMacOS) return null;
if (dismissed) return null;
return (
<div className="bg-gradient-to-r from-accent to-accent/90 text-white px-4 py-3 relative shrink-0">
<div className="flex items-center justify-between gap-4 max-w-screen-xl mx-auto">
<div className="flex items-center gap-3 flex-1 min-w-0">
<div className="p-1.5 bg-white/20 rounded-md shrink-0">
<MonitorDot className="w-4 h-4" />
</div>
<div className="flex-1 min-w-0">
<p className="font-medium text-sm">
{t('ccsBarBanner.new')}: {t('ccsBarBanner.title')}
</p>
<p className="text-xs text-white/80 truncate">
{t('ccsBarBanner.description')}{' '}
<code className="bg-white/15 rounded px-1 py-0.5 font-mono text-[11px]">
ccs bar install
</code>
</p>
</div>
</div>
<div className="flex items-center gap-2 shrink-0">
{onInstallClick && (
<Button
size="sm"
variant="secondary"
onClick={onInstallClick}
className="bg-white text-accent hover:bg-white/90 h-8"
>
{t('ccsBarBanner.install')}
</Button>
)}
<a
href={CCS_BAR_DOCS_URL}
target="_blank"
rel="noopener noreferrer"
className="text-xs text-white/80 hover:text-white hidden sm:flex items-center gap-1"
>
Learn more
<ExternalLink className="w-3 h-3" />
</a>
<Button
size="icon"
variant="ghost"
onClick={handleDismiss}
className="h-7 w-7 text-white/70 hover:text-white hover:bg-white/20"
>
<X className="w-4 h-4" />
<span className="sr-only">Dismiss</span>
</Button>
</div>
</div>
</div>
);
}
@@ -1,53 +0,0 @@
/**
* CCS Bar Promo Card
* Permanent promotional card for the native macOS menu-bar app, shown in the
* providers sidebar footer.
*
* Rendered only on macOS: the install CTA has no effect elsewhere.
*/
import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button';
import { MonitorDot } from 'lucide-react';
// Lightweight, dependency-free macOS detection (see ccs-bar-banner.tsx).
const isMacOS =
typeof navigator !== 'undefined' &&
/Mac|iPhone|iPad/i.test(navigator.userAgent || navigator.platform || '');
interface CcsBarPromoCardProps {
onInstallClick: () => void;
}
export function CcsBarPromoCard({ onInstallClick }: CcsBarPromoCardProps) {
const { t } = useTranslation();
if (!isMacOS) return null;
return (
<div className="p-3 border-t bg-gradient-to-r from-accent/5 to-accent/10 dark:from-accent/10 dark:to-accent/15">
<div className="flex items-center gap-2">
<div className="p-1.5 bg-accent/10 dark:bg-accent/20 rounded shrink-0">
<MonitorDot className="w-4 h-4 text-accent" />
</div>
<div className="flex-1 min-w-0">
<p className="text-xs font-medium text-accent dark:text-accent-foreground">
{t('ccsBarPromo.title')}
</p>
<p className="text-[10px] text-muted-foreground truncate">
{t('ccsBarPromo.description')}
</p>
</div>
<Button
size="sm"
variant="ghost"
onClick={onInstallClick}
className="h-7 px-2 text-accent hover:text-accent hover:bg-accent/10 dark:hover:bg-accent/20"
>
<MonitorDot className="w-3 h-3 mr-1" />
<span className="text-xs">{t('ccsBarPromo.install')}</span>
</Button>
</div>
</div>
);
}
-4
View File
@@ -21,9 +21,5 @@ export { OpenRouterPromoCard } from './openrouter-promo-card';
export { OpenRouterQuickStart } from './openrouter-quick-start';
export { AlibabaCodingPlanPromoCard } from './alibaba-coding-plan-promo-card';
// CCS Bar (native macOS menu-bar app) promo components
export { CcsBarBanner } from './ccs-bar-banner';
export { CcsBarPromoCard } from './ccs-bar-promo-card';
export { ModelTierMapping } from './model-tier-mapping';
export type { TierMapping } from './model-tier-mapping';
@@ -0,0 +1,42 @@
/**
* CCS Bar Button
*
* Compact navbar link for the native macOS menu-bar app docs.
*/
import { MonitorDot } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
const CCS_BAR_DOCS_URL = 'https://docs.ccs.kaitran.ca/features/dashboard/ccs-bar';
export function CcsBarButton() {
const { t } = useTranslation();
return (
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="outline"
size="sm"
asChild
className="h-8 gap-1.5 border-accent/40 bg-accent/5 px-2.5 text-accent hover:bg-accent hover:text-accent-foreground"
>
<a
href={CCS_BAR_DOCS_URL}
target="_blank"
rel="noopener noreferrer"
title={t('ccsBarButton.title')}
>
<MonitorDot className="w-4 h-4" />
<span className="hidden text-xs font-bold sm:inline">{t('ccsBarButton.label')}</span>
</a>
</Button>
</TooltipTrigger>
<TooltipContent side="bottom" align="start" className="max-w-64">
{t('ccsBarButton.tooltip')}
</TooltipContent>
</Tooltip>
);
}
+1
View File
@@ -3,6 +3,7 @@
*/
export { CcsLogo } from './ccs-logo';
export { CcsBarButton } from './ccs-bar-button';
export { ClaudeKitBadge } from './claudekit-badge';
export { CodeEditor } from './code-editor';
export { CommandBuilder } from './command-builder';
+25 -11
View File
@@ -1636,6 +1636,11 @@ const resources = {
githubLink: {
title: 'Report an issue on GitHub',
},
ccsBarButton: {
title: 'Open CCS Bar docs',
label: 'CCS Bar',
tooltip: 'Native macOS menu-bar quota, cost, and account controls',
},
globalEnvIndicator: {
injectedCount_one: '{{count}} global env var will be injected at runtime',
injectedCount_other: '{{count}} global env vars will be injected at runtime',
@@ -2489,17 +2494,6 @@ const resources = {
title: 'OpenRouter',
description: 'Access hundreds of models from one API endpoint.',
},
ccsBarBanner: {
new: 'NEW',
title: 'CCS Bar for macOS',
description: 'See live subscription quota and usage from your menu bar. Install with',
install: 'Install',
},
ccsBarPromo: {
title: 'CCS Bar (macOS)',
description: 'Live quota and usage in your menu bar.',
install: 'Install',
},
profileCard: {
profile: 'Profile',
openRouter: 'OpenRouter profile',
@@ -4286,6 +4280,11 @@ const resources = {
githubLink: {
title: '在 GitHub 上报告问题',
},
ccsBarButton: {
title: '打开 CCS Bar 文档',
label: 'CCS Bar',
tooltip: '原生 macOS 菜单栏配额、成本和账号控制',
},
globalEnvIndicator: {
injectedCount_one: '{{count}} 个全局环境变量将在运行时注入',
injectedCount_other: '{{count}} 个全局环境变量将在运行时注入',
@@ -6984,6 +6983,11 @@ const resources = {
githubLink: {
title: 'Báo cáo vấn đề trên GitHub',
},
ccsBarButton: {
title: 'Mở tài liệu CCS Bar',
label: 'CCS Bar',
tooltip: 'Điều khiển hạn mức, chi phí và tài khoản trên thanh menu macOS',
},
globalEnvIndicator: {
injectedCount_one: '{{count}} biến env toàn cục sẽ được áp dụng khi chạy',
injectedCount_other: '{{count}} biến env toàn cục sẽ được áp dụng khi chạy',
@@ -10665,6 +10669,11 @@ const resources = {
title: 'GitHub でこのプロジェクトをスポンサー',
sponsor: 'スポンサー',
},
ccsBarButton: {
title: 'CCS Bar ドキュメントを開く',
label: 'CCS Bar',
tooltip: 'macOS メニューバーでクォータ、コスト、アカウントを確認',
},
supportEntryCard: {
actionRequired: '対応が必要',
},
@@ -12431,6 +12440,11 @@ const resources = {
githubLink: {
title: 'GitHub에서 이슈 보고',
},
ccsBarButton: {
title: 'CCS Bar 문서 열기',
label: 'CCS Bar',
tooltip: 'macOS 메뉴 막대에서 할당량, 비용, 계정 제어 확인',
},
globalEnvIndicator: {
injectedCount_one: '런타임에 글로벌 환경 변수 {{count}}개가 주입됩니다',
injectedCount_other: '런타임에 글로벌 환경 변수 {{count}}개가 주입됩니다',
-13
View File
@@ -22,8 +22,6 @@ import { OpenRouterBanner } from '@/components/profiles/openrouter-banner';
import { OpenRouterQuickStart } from '@/components/profiles/openrouter-quick-start';
import { OpenRouterPromoCard } from '@/components/profiles/openrouter-promo-card';
import { AlibabaCodingPlanPromoCard } from '@/components/profiles/alibaba-coding-plan-promo-card';
import { CcsBarBanner } from '@/components/profiles/ccs-bar-banner';
import { CcsBarPromoCard } from '@/components/profiles/ccs-bar-promo-card';
import {
useProfiles,
useDeleteProfile,
@@ -43,15 +41,6 @@ import { useTranslation } from 'react-i18next';
import { toast } from 'sonner';
import { useNavigate } from 'react-router-dom';
// CCS Bar is installed via the `ccs bar install` CLI command, not from the
// dashboard. The promo CTA therefore opens the user-facing docs page where the
// install/launch steps live, rather than triggering an in-app action.
const CCS_BAR_DOCS_URL = 'https://github.com/kaitranntt/ccs/blob/main/docs/ccs-bar.md';
function openCcsBarDocs() {
window.open(CCS_BAR_DOCS_URL, '_blank', 'noopener,noreferrer');
}
export function ApiPage() {
const { t } = useTranslation();
const navigate = useNavigate();
@@ -224,7 +213,6 @@ export function ApiPage() {
return (
<div className="flex h-full min-h-0 flex-col overflow-hidden">
<OpenRouterBanner onCreateClick={() => setCreateDialogOpen(true)} />
<CcsBarBanner onInstallClick={() => openCcsBarDocs()} />
<div className="flex-1 flex min-h-0 overflow-hidden">
<div className="w-80 border-r flex flex-col bg-muted/30">
<div className="p-4 border-b bg-background">
@@ -375,7 +363,6 @@ export function ApiPage() {
setCreateDialogOpen(true);
}}
/>
<CcsBarPromoCard onInstallClick={() => openCcsBarDocs()} />
</div>
<div className="flex min-h-0 flex-1 flex-col min-w-0 overflow-hidden">