Fixed scrolling issue where CLI sessions list was cut off on both desktop and mobile devices. Changes: - Added overflow: hidden to .cli-sessions-section - Changed .cli-sessions-list max-height to calc(70vh - 180px) to account for headers - Added -webkit-overflow-scrolling: touch for smooth iOS scrolling - Added responsive breakpoints for mobile (60vh at 768px, 50vh at 480px) - Proper overflow-x: hidden to prevent horizontal scrolling Fixes issue where users couldn't see the full CLI sessions list. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
603 lines
21 KiB
HTML
603 lines
21 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Claude Code</title>
|
|
<link rel="stylesheet" href="/claude/css/style.css">
|
|
<link rel="stylesheet" href="/claude/claude-ide/landing.css">
|
|
<style>
|
|
/* CLI Sessions Section Styles */
|
|
.cli-sessions-section {
|
|
margin-top: 40px;
|
|
}
|
|
|
|
.cli-sessions-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.cli-sessions-title {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
}
|
|
|
|
.cli-sessions-count {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
margin-left: 12px;
|
|
}
|
|
|
|
.cli-sessions-actions {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center;
|
|
}
|
|
|
|
.btn-refresh-cli {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 16px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-refresh-cli:hover {
|
|
background: var(--bg-tertiary);
|
|
border-color: var(--accent-color);
|
|
}
|
|
|
|
.cli-sessions-filters {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.filter-btn {
|
|
padding: 6px 12px;
|
|
background: transparent;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.filter-btn:hover {
|
|
border-color: var(--accent-color);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.filter-btn.active {
|
|
background: var(--accent-color);
|
|
border-color: var(--accent-color);
|
|
color: white;
|
|
}
|
|
|
|
.cli-sessions-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
max-height: 500px;
|
|
overflow-y: auto;
|
|
padding-right: 4px;
|
|
}
|
|
|
|
/* Custom scrollbar for CLI sessions list */
|
|
.cli-sessions-list::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.cli-sessions-list::-webkit-scrollbar-track {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.cli-sessions-list::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.cli-sessions-list::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.cli-session-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
padding: 16px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
animation: fadeInUp 0.3s ease;
|
|
}
|
|
|
|
.cli-session-item:hover {
|
|
border-color: var(--accent-color);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(74, 158, 255, 0.1);
|
|
}
|
|
|
|
.cli-session-icon {
|
|
flex-shrink: 0;
|
|
width: 48px;
|
|
height: 48px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-radius: 10px;
|
|
color: white;
|
|
}
|
|
|
|
.cli-session-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.cli-session-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.cli-session-id {
|
|
font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.project-badge {
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.cli-session-path {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 4px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.cli-session-time {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.btn-attach-cli {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 16px;
|
|
background: var(--accent-color);
|
|
border: none;
|
|
border-radius: 8px;
|
|
color: white;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-attach-cli:hover {
|
|
background: #3a8eea;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.btn-attach-cli:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
transform: none;
|
|
}
|
|
|
|
.cli-sessions-loading,
|
|
.cli-sessions-error,
|
|
.cli-sessions-empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 60px 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.cli-sessions-loading .spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid var(--border-color);
|
|
border-top-color: var(--accent-color);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
.cli-sessions-loading p {
|
|
margin-top: 16px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.cli-sessions-empty .empty-icon,
|
|
.cli-sessions-error .error-icon {
|
|
font-size: 48px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.cli-sessions-empty h3,
|
|
.cli-sessions-error h3 {
|
|
font-size: 18px;
|
|
margin-bottom: 8px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.cli-sessions-empty p,
|
|
.cli-sessions-error p {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.spinner-small {
|
|
width: 14px;
|
|
height: 14px;
|
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
border-top-color: white;
|
|
border-radius: 50%;
|
|
animation: spin 0.6s linear infinite;
|
|
display: inline-block;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes slideInRight {
|
|
from {
|
|
transform: translateX(100%);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Search input for CLI sessions */
|
|
.cli-search-container {
|
|
position: relative;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.cli-search-input {
|
|
width: 100%;
|
|
padding: 12px 16px 12px 40px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
outline: none;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.cli-search-input:focus {
|
|
border-color: var(--accent-color);
|
|
box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
|
|
}
|
|
|
|
.cli-search-icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: var(--text-muted);
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Fix: CLI Sessions list scroller - ensure it works independently on both mobile and desktop */
|
|
.cli-sessions-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-height: 70vh;
|
|
overflow: hidden; /* Prevent section from expanding */
|
|
}
|
|
|
|
.cli-sessions-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
max-height: calc(70vh - 180px); /* Account for header, filters, and search */
|
|
overflow-y: auto !important;
|
|
overflow-x: hidden;
|
|
padding-right: 4px;
|
|
flex-shrink: 0;
|
|
-webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
|
|
}
|
|
|
|
/* Ensure proper scrolling on mobile */
|
|
@media (max-width: 768px) {
|
|
.cli-sessions-section {
|
|
max-height: 60vh;
|
|
}
|
|
|
|
.cli-sessions-list {
|
|
max-height: calc(60vh - 200px);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.cli-sessions-section {
|
|
max-height: 50vh;
|
|
}
|
|
|
|
.cli-sessions-list {
|
|
max-height: calc(50vh - 180px);
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="landing-page">
|
|
<!-- Main Container -->
|
|
<div class="landing-container">
|
|
<!-- Logo and Status -->
|
|
<header class="landing-header">
|
|
<div class="logo-container">
|
|
<div class="logo-icon">
|
|
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="32" cy="32" r="30" stroke="url(#gradient)" stroke-width="4"/>
|
|
<path d="M22 32L28 38L42 24" stroke="url(#gradient)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
<defs>
|
|
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
<stop offset="0%" style="stop-color:#4a9eff"/>
|
|
<stop offset="100%" style="stop-color:#a78bfa"/>
|
|
</linearGradient>
|
|
</defs>
|
|
</svg>
|
|
</div>
|
|
<h1 class="logo-text">Claude Code</h1>
|
|
</div>
|
|
<div class="server-status" id="server-status" role="status" aria-live="polite">
|
|
<div class="status-indicator"></div>
|
|
<span class="status-text">Checking...</span>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Main Content -->
|
|
<main class="landing-main">
|
|
<!-- Recent Projects Section -->
|
|
<section class="recent-projects-section">
|
|
<div class="section-header">
|
|
<h2 class="section-title">Recent projects</h2>
|
|
<button
|
|
class="btn-open-project"
|
|
id="btn-open-project"
|
|
aria-label="Open project (Cmd+O)"
|
|
title="Open project (Cmd+O)"
|
|
>
|
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M3 10H17M17 10L12 5M17 10L12 15" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</svg>
|
|
Open project
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Projects List -->
|
|
<div class="projects-list" id="projects-list" role="list">
|
|
<!-- Loading state -->
|
|
<div class="loading-state" id="loading-state">
|
|
<div class="spinner"></div>
|
|
<p>Loading projects...</p>
|
|
</div>
|
|
|
|
<!-- Empty state (hidden by default) -->
|
|
<div class="empty-state" id="empty-state" style="display: none;">
|
|
<div class="empty-state-icon">📁</div>
|
|
<h3>No recent projects</h3>
|
|
<p>Open a project to get started</p>
|
|
<button class="btn-primary" onclick="document.getElementById('btn-open-project').click()">
|
|
Browse folders
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Projects will be rendered here -->
|
|
</div>
|
|
</section>
|
|
|
|
<!-- CLI Sessions Section -->
|
|
<section class="cli-sessions-section">
|
|
<div class="cli-sessions-header">
|
|
<div style="display: flex; align-items: center;">
|
|
<h2 class="cli-sessions-title">CLI Sessions</h2>
|
|
<span class="cli-sessions-count" id="cli-sessions-count"></span>
|
|
</div>
|
|
<div class="cli-sessions-actions">
|
|
<button class="btn-refresh-cli" id="btn-refresh-cli" title="Refresh CLI sessions">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M23 4v6h-6M1 20v-6h6"/>
|
|
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/>
|
|
</svg>
|
|
Refresh
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Search -->
|
|
<div class="cli-search-container">
|
|
<svg class="cli-search-icon" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
<circle cx="8" cy="8" r="6" stroke="currentColor" stroke-width="2"/>
|
|
<path d="M14 14l-4.5-4.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
</svg>
|
|
<input
|
|
type="text"
|
|
id="cli-search-input"
|
|
class="cli-search-input"
|
|
placeholder="Search CLI sessions by path or ID..."
|
|
autocomplete="off"
|
|
/>
|
|
</div>
|
|
|
|
<!-- Filters -->
|
|
<div class="cli-sessions-filters">
|
|
<button class="filter-btn active" data-filter="all">All</button>
|
|
<button class="filter-btn" data-filter="with-project">With project</button>
|
|
<button class="filter-btn" data-filter="without-project">Without project</button>
|
|
</div>
|
|
|
|
<!-- CLI Sessions List -->
|
|
<div class="cli-sessions-list" id="cli-sessions-list" role="list">
|
|
<!-- Content will be rendered here -->
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- Directory Picker Dialog -->
|
|
<div class="modal-overlay" id="directory-picker-modal" role="dialog" aria-modal="true" aria-labelledby="directory-picker-title">
|
|
<div class="modal-content directory-picker">
|
|
<div class="modal-header">
|
|
<h2 id="directory-picker-title">Open Project</h2>
|
|
<button class="modal-close" id="directory-picker-close" aria-label="Close">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M18 6L6 18M6 6l12 12"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<!-- Search input -->
|
|
<div class="search-container">
|
|
<svg class="search-icon" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
<circle cx="8" cy="8" r="6" stroke="currentColor" stroke-width="2"/>
|
|
<path d="M14 14l-4.5-4.5" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
</svg>
|
|
<input
|
|
type="text"
|
|
id="directory-search"
|
|
class="search-input"
|
|
placeholder="Search directories..."
|
|
autocomplete="off"
|
|
aria-label="Search directories"
|
|
/>
|
|
<button class="search-clear" id="search-clear" aria-label="Clear search" style="display: none;">
|
|
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M14 4L4 14M4 4l10 10"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Breadcrumb navigation -->
|
|
<div class="breadcrumb-container" id="breadcrumb-container">
|
|
<!-- Breadcrumbs will be rendered here -->
|
|
</div>
|
|
|
|
<!-- Current path display -->
|
|
<div class="current-path" id="current-path">
|
|
<span class="path-label">Current:</span>
|
|
<code class="path-text" id="path-text">~/</code>
|
|
</div>
|
|
|
|
<!-- Directory list -->
|
|
<div class="directory-list" id="directory-list" role="listbox" aria-label="Directories">
|
|
<!-- Loading state -->
|
|
<div class="directory-loading" id="directory-loading">
|
|
<div class="spinner"></div>
|
|
</div>
|
|
|
|
<!-- Empty state -->
|
|
<div class="directory-empty" id="directory-empty" style="display: none;">
|
|
<div class="empty-icon">📂</div>
|
|
<p>No directories found</p>
|
|
</div>
|
|
|
|
<!-- Directories will be rendered here -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<div class="footer-hint">
|
|
<kbd>↑</kbd> <kbd>↓</kbd> Navigate
|
|
<kbd>Enter</kbd> Open
|
|
<kbd>Esc</kbd> Close
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Toast Container -->
|
|
<div class="toast-container" id="toast-container" aria-live="polite"></div>
|
|
|
|
<script src="/claude/claude-ide/landing.js"></script>
|
|
<script src="/claude/claude-ide/cli-sessions.js"></script>
|
|
<script>
|
|
// Initialize CLI sessions on page load
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
// Load CLI sessions after a short delay
|
|
setTimeout(() => {
|
|
cliSessionsManager.loadCliSessions();
|
|
}, 500);
|
|
|
|
// Setup search input
|
|
const searchInput = document.getElementById('cli-search-input');
|
|
let searchTimeout;
|
|
searchInput.addEventListener('input', (e) => {
|
|
clearTimeout(searchTimeout);
|
|
searchTimeout = setTimeout(() => {
|
|
cliSessionsManager.setFilter(e.target.value);
|
|
}, 300);
|
|
});
|
|
|
|
// Setup filter buttons
|
|
const filterButtons = document.querySelectorAll('.filter-btn');
|
|
filterButtons.forEach(btn => {
|
|
btn.addEventListener('click', () => {
|
|
filterButtons.forEach(b => b.classList.remove('active'));
|
|
btn.classList.add('active');
|
|
cliSessionsManager.setProjectFilter(btn.dataset.filter);
|
|
});
|
|
});
|
|
|
|
// Setup refresh button
|
|
document.getElementById('btn-refresh-cli').addEventListener('click', () => {
|
|
cliSessionsManager.loadCliSessions();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|