Skip to content

Commit 3ef6271

Browse files
jason-rlclaude
andauthored
fix: menu header clipping and breadcrumb hyperlink (#221)
## Summary - **Fix breadcrumb top border clipping**: At ~40-row terminal heights, the full layout content exceeded the terminal height, causing Ink to clip the `rl > Home` breadcrumb's top rounded border off the screen. Fixed by adding `flexShrink={0}` to the Breadcrumb outer Box and raising the full layout height threshold from 40 to 43. - **Clickable domain hyperlink in breadcrumb**: The custom domain shown in the breadcrumb header (`rl (domain) > Home`) is now an OSC 8 hyperlink via `ink-link`. In terminals that support the protocol (Kitty, iTerm2, etc.), clicking the domain opens the platform URL (`https://platform.<domain>`). Unsupported terminals show the plain text unchanged (`fallback={false}`). ## Test plan - [x] `npm run build` passes - [x] All Banner/MainMenu/Breadcrumb tests pass (113 total in affected suites) - [x] Formatting and lint checks pass (0 new warnings) - [x] Manual: run `rli` at terminal heights 35, 40, 43, 45 — breadcrumb border should never clip - [x] Manual: unset `RUNLOOP_BASE_URL` — default "RUNLOOP.ai" behavior preserved - [x] Manual: in a supported terminal (Kitty/iTerm2), verify the domain in the breadcrumb is clickable and opens `https://platform.<domain>` - [x] Manual: in an unsupported terminal, verify no URL text is appended after the domain 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3528701 commit 3ef6271

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/components/Breadcrumb.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from "react";
22
import { Box, Text, useStdout } from "ink";
3+
import Link from "ink-link";
34
import { colors } from "../utils/theme.js";
4-
import { runloopBaseDomain } from "../utils/config.js";
5+
import { runloopBaseDomain, platformBaseUrl } from "../utils/config.js";
56
import { UpdateNotification } from "./UpdateNotification.js";
67

78
export interface BreadcrumbItem {
@@ -99,6 +100,7 @@ export const Breadcrumb = ({
99100
marginBottom={1}
100101
paddingX={0}
101102
paddingY={0}
103+
flexShrink={0}
102104
>
103105
<Box flexShrink={0}>
104106
<Box
@@ -112,8 +114,11 @@ export const Breadcrumb = ({
112114
</Text>
113115
{isNonDefaultDomain && mode !== "minimal" && (
114116
<Text color={colors.warning} bold>
115-
{" "}
116-
({baseDomain})
117+
{" ("}
118+
<Link url={platformBaseUrl()} fallback={false}>
119+
{baseDomain}
120+
</Link>
121+
{")"}
117122
</Text>
118123
)}
119124
{displayItems.length > 0 && <Text color={colors.textDim}></Text>}

src/components/MainMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ interface MainMenuProps {
8080
type LayoutMode = "full" | "medium" | "compact" | "minimal";
8181

8282
function getLayoutMode(height: number): LayoutMode {
83-
if (height >= 40) return "full"; // Big banner + bordered items + descriptions
83+
if (height >= 43) return "full"; // Big banner + bordered items + descriptions
8484
if (height >= 22) return "medium"; // Small banner + simple items + descriptions
8585
if (height >= 15) return "compact"; // No banner + simple items + short descriptions
8686
return "minimal"; // No banner + labels only

0 commit comments

Comments
 (0)