Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions web/app/[locale]/components/spacing-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ const defaults: DevValues = {
docsPt: 8,
};

function initialPanelPosition() {
if (typeof window === "undefined") {
return { x: 0, y: 0 };
}

return { x: window.innerWidth - 340, y: window.innerHeight - 320 };
}

// Tiny external store (avoids setState-during-render)
let snapshot = { ...defaults };
const listeners = new Set<() => void>();
Expand Down Expand Up @@ -95,16 +103,12 @@ function applyToDOM(v: DevValues) {

export function DevPanel() {
const [visible, setVisible] = useState(false);
const [pos, setPos] = useState({ x: 0, y: 0 });
const [pos, setPos] = useState(initialPanelPosition);
const [dragging, setDragging] = useState(false);
const [copied, setCopied] = useState(false);
const vals = useDevValues();
const dragOffset = useRef({ x: 0, y: 0 });

useEffect(() => {
setPos({ x: window.innerWidth - 340, y: window.innerHeight - 320 });
}, []);

useEffect(() => {
const handler = (e: KeyboardEvent) => {
if (e.metaKey && e.key === ".") {
Expand Down
4 changes: 2 additions & 2 deletions web/app/[locale]/docs/notifications/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ echo "$CMUX_NOTIFICATION_TITLE: $CMUX_NOTIFICATION_BODY" >> ~/notifications.log`

<h2>{t("sending")}</h2>

<h3>{t("cli")}</h3>
<h3 id="cli-usage">{t("cli")}</h3>
<CodeBlock lang="bash">{`cmux notify --title "Task Complete" --body "Your build finished"
cmux notify --title "Claude Code" --subtitle "Waiting" --body "Agent needs input"`}</CodeBlock>

Expand Down Expand Up @@ -251,7 +251,7 @@ esac`}</CodeBlock>
}
}`}</CodeBlock>

<h2>{t("integrationExamples")}</h2>
<h2 id="integration-examples">{t("integrationExamples")}</h2>

<h3>{t("notifyAfterLong")}</h3>
<CodeBlock title="~/.zshrc" lang="bash">{`# Add to your shell config
Expand Down
16 changes: 8 additions & 8 deletions web/app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ function HomeContent() {
<span className="text-muted">
{t.rich("feature.keyboardShortcutsDesc", {
link: (chunks) => (
<a
<Link
href="/docs/keyboard-shortcuts"
className={linkClass}
>
{chunks}
</a>
</Link>
),
})}
</span>
Expand Down Expand Up @@ -176,14 +176,14 @@ function HomeContent() {
<p className="text-muted">
{t.rich("faqNotificationsA", {
cliLink: (chunks) => (
<a href="/docs/notifications" className={linkClass}>
<Link href="/docs/notifications#cli-usage" className={linkClass}>
{chunks}
</a>
</Link>
),
hooksLink: (chunks) => (
<a href="/docs/notifications" className={linkClass}>
<Link href="/docs/notifications#integration-examples" className={linkClass}>
{chunks}
</a>
</Link>
Comment thread
cursor[bot] marked this conversation as resolved.
),
})}
</p>
Expand All @@ -198,9 +198,9 @@ function HomeContent() {
</code>
),
link: (chunks) => (
<a href="/docs/keyboard-shortcuts" className={linkClass}>
<Link href="/docs/keyboard-shortcuts" className={linkClass}>
{chunks}
</a>
</Link>
),
})}
</p>
Expand Down
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"cloud-vm:migrate": "bun scripts/cloud-vm/migrate-vercel-aurora-iam.mjs",
"cloud-vm:preflight": "bash scripts/cloud-vm/verify-migration-preflight.sh",
"cloud-vm:smoke": "bun scripts/cloud-vm/smoke-vm-api.mjs",
"cloud-vm:stress": "bun scripts/cloud-vm/stress-vm-api.mjs",
"db:check": "bunx drizzle-kit check --config drizzle.config.ts",
"db:down": "bash scripts/db-local.sh down",
"db:generate": "bunx drizzle-kit generate --config drizzle.config.ts",
Expand Down
Loading
Loading