Compare commits

..

7 Commits

Author SHA1 Message Date
Alex Newman c126a7083f chore: Bump version to 6.1.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 17:14:09 -05:00
Alex Newman f1170512d6 feat: Add responsive mobile navigation with Discord-style sidebar layout (#138)
Implements a mobile-first navigation reorganization that moves controls into the sidebar at smaller breakpoints:

- Community button moves to sidebar at 600px
- Projects dropdown moves to sidebar at 480px
- Sidebar gains proper width constraints (100% width, 400px max-width)
- Full-height layout styling fixes for proper flex behavior
- Clean separation between header and sidebar responsibilities

This creates a Discord-like mobile experience where the sidebar becomes the primary navigation container on smaller screens.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-19 17:13:24 -05:00
Alex Newman d64939c379 docs: Add semantic naming principle and clean up migration docs
Added semantic naming to coding standards emphasizing verbose,
self-documenting names for comprehension. Cleaned up database
migration section removing TODO in favor of clear evergreen statement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:45:33 -05:00
Alex Newman 97d8bd3e62 docs: Update CHANGELOG.md for v6.0.9
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:18:25 -05:00
Alex Newman 6cd904a81c chore: Bump version to 6.0.9
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:17:23 -05:00
Alex Newman 74c8afd0e0 feat: Add real-time queue depth indicator to viewer UI
Implements a visual badge that displays the count of active work items (queued + currently processing) in the worker service. The badge appears next to the claude-mem logo and updates in real-time via SSE.

Features:
- Shows count of pending messages + active SDK generators
- Only displays when queueDepth > 0
- Subtle pulse animation for visual feedback
- Theme-aware styling

Backend changes:
- Added getTotalActiveWork() method to SessionManager
- Updated worker-service to broadcast queueDepth via SSE
- Enhanced processing status API endpoint

Frontend changes:
- Updated Header component to display queue bubble
- Enhanced useSSE hook to track queueDepth state
- Added CSS styling with pulse animation

Closes #122
Closes #96
Closes #97

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 15:11:37 -05:00
Alex Newman 02444392da docs: Update CHANGELOG.md for v6.0.8
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 14:43:39 -05:00
16 changed files with 1113 additions and 92 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
"plugins": [
{
"name": "claude-mem",
"version": "6.0.8",
"version": "6.1.0",
"source": "./plugin",
"description": "Persistent memory system for Claude Code - context compression across sessions"
}
+53
View File
@@ -4,6 +4,59 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [6.0.9] - 2025-11-17
## Queue Depth Indicator Feature
Added a real-time queue depth indicator to the viewer UI that displays the count of active work items (queued + currently processing).
### Features
- Visual badge next to claude-mem logo
- Shows count of pending messages + active SDK generators
- Only displays when queueDepth > 0
- Subtle pulse animation for visual feedback
- Theme-aware styling
- Real-time updates via SSE
### Implementation
- Backend: Added `getTotalActiveWork()` method to SessionManager
- Backend: Updated worker-service to broadcast queueDepth via SSE
- Frontend: Enhanced Header component to display queue bubble
- Frontend: Updated useSSE hook to track queueDepth state
- Frontend: Added CSS styling with pulse animation
### Closes
- #122 - Implement queue depth indicator feature
- #96 - Add real-time queue depth indicator to viewer UI
- #97 - Fix inconsistent queue depth calculation
### Credit
Original implementation by @thedotmack in PR #96
Bug fix by @copilot-swe-agent in PR #97
## [6.0.8] - 2025-11-17
## Critical Fix
This patch release fixes a critical bug where the PM2 worker process would start from the wrong directory (development folder instead of marketplace folder), causing the plugin to malfunction when installed via the marketplace.
### What's Fixed
- **Worker Startup Path Resolution** (`src/shared/worker-utils.ts:61`)
Added `cwd: pluginRoot` option to `execSync` when starting PM2
This ensures the worker always starts from the correct marketplace directory (`~/.claude/plugins/marketplaces/thedotmack/`), regardless of where the hook is invoked from.
### Impact
Users will no longer experience issues with the worker starting from the wrong location. The plugin now works correctly when installed via marketplace without manual intervention.
### Verification
Run `pm2 info claude-mem-worker` to verify:
- **exec cwd** should be: `/Users/[username]/.claude/plugins/marketplaces/thedotmack`
- **script path** should be: `/Users/[username]/.claude/plugins/marketplaces/thedotmack/plugin/scripts/worker-service.cjs`
## [6.0.7] - 2025-11-17
## Critical Hotfix: Database Migration Issue (#121)
+5 -3
View File
@@ -1,3 +1,5 @@
/* To @claude: be vigilant about only leaving evergreen context in this file, claude-mem handles working context separately. */
# Claude-Mem: AI Development Instructions
## What This Project Is
@@ -6,7 +8,7 @@ Claude-mem is a Claude Code plugin providing persistent memory across sessions.
**Your Role**: You are working on the plugin itself. When users interact with Claude Code with this plugin installed, your observations get captured and become their persistent memory.
**Current Version**: 6.0.8
**Current Version**: 6.1.0
## IMPORTANT: Skills Are Auto-Invoked
@@ -122,6 +124,7 @@ Changes to React components, styles, or viewer logic require rebuilding and rest
3. **Fail Fast**: Explicit errors beat silent failures
4. **Simple First**: Write the obvious solution, optimize only if needed
5. **Delete Aggressively**: Less code = fewer bugs
6. **Semantic Naming**: Always name variables, parameters, and API endpoints with verbose, self-documenting names that optimize for comprehension by both humans and LLMs, not brevity (e.g., `wait_until_obs_is_saved=true` vs `wait=true`)
**Common anti-patterns to avoid:**
- Ceremonial wrapper functions for constants (just export the constant)
@@ -145,8 +148,7 @@ Changes to React components, styles, or viewer logic require rebuilding and rest
### Modifying Database Schema
1. Update schema in `src/services/sqlite/schema.ts`
2. Update SessionStore/SessionSearch classes
3. Migration strategy: The plugin currently recreates on schema changes (acceptable for alpha)
4. TODO: Add proper migrations for production
3. Migration strategy: The plugin currently recreates on schema changes (alpha phase). Production deployments will require proper migration handling.
### Debugging Worker Issues
```bash
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem",
"version": "6.0.8",
"version": "6.1.0",
"description": "Memory compression system for Claude Code - persist context across sessions",
"keywords": [
"claude",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem",
"version": "6.0.8",
"version": "6.1.0",
"description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions",
"author": {
"name": "Alex Newman"
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+457 -19
View File
@@ -297,10 +297,9 @@
overflow: hidden;
}
.container {
.full-height-flex-layout {
display: flex;
height: 100vh;
width: 100vw;
height: 100%;
position: relative;
}
@@ -314,8 +313,9 @@
position: fixed;
right: 0;
top: 0;
width: 400px;
height: 100vh;
width: 100%;
max-width: 400px;
background: var(--color-bg-primary);
border-left: 1px solid var(--color-border-primary);
display: flex;
@@ -331,12 +331,16 @@
}
.header {
padding: 14px 18px;
padding: 16px 24px;
border-bottom: 1px solid var(--color-border-primary);
display: flex;
justify-content: space-between;
align-items: center;
background: var(--color-bg-header);
background: linear-gradient(to bottom,
var(--color-bg-header) 0%,
var(--color-bg-primary) 100%);
backdrop-filter: blur(8px);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.sidebar-header {
@@ -354,13 +358,124 @@
color: var(--color-text-header);
}
.sidebar-community-btn {
display: none;
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 14px;
height: 36px;
cursor: pointer;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
font-size: 13px;
font-weight: 500;
text-decoration: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
margin: 16px 18px;
}
.sidebar-community-btn:hover {
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.sidebar-community-btn:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (max-width: 600px) {
.sidebar-community-btn {
display: flex;
}
}
.sidebar-project-filter {
display: none;
padding: 16px 18px;
border-bottom: 1px solid var(--color-border-primary);
}
.sidebar-project-filter label {
display: block;
margin-bottom: 8px;
font-size: 12px;
color: var(--color-text-muted);
font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
font-weight: 500;
}
.sidebar-project-filter select {
width: 100%;
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 32px 0 12px;
height: 36px;
font-size: 13px;
font-weight: 500;
color: var(--color-text-secondary);
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
}
.sidebar-project-filter select:hover {
background-color: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
}
.sidebar-project-filter select:focus {
outline: none;
border-color: var(--color-border-focus);
box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}
@media (max-width: 480px) {
.sidebar-project-filter {
display: block;
}
}
.sidebar-social-links {
display: none;
padding: 16px 18px;
border-bottom: 1px solid var(--color-border-primary);
gap: 8px;
justify-content: center;
}
.sidebar-social-links .icon-link {
flex: 1;
max-width: 80px;
}
@media (max-width: 768px) {
.sidebar-social-links {
display: flex;
}
}
.header h1 {
font-size: 16px;
font-size: 17px;
font-weight: 500;
color: var(--color-text-header);
display: flex;
align-items: center;
gap: 10px;
gap: 12px;
line-height: 1;
}
@@ -376,46 +491,138 @@
animation: spin 1.5s linear infinite;
}
.queue-bubble {
position: absolute;
top: -8px;
right: -8px;
background: var(--color-accent-primary);
color: var(--color-text-button);
font-size: 10px;
font-weight: 600;
font-family: 'Monaspace Radon', monospace;
height: 18px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
animation: pulse 2s ease-in-out infinite;
z-index: 10;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
}
.logo-text {
font-family: 'Monaspace Radon', monospace;
font-weight: 100;
font-size: 20px;
font-size: 21px;
letter-spacing: -0.03em;
color: var(--color-text-logo);
line-height: 1;
padding-top: 1px;
}
.status {
display: flex;
align-items: center;
gap: 12px;
gap: 8px;
font-size: 13px;
}
.settings-btn,
.theme-toggle-btn {
background: transparent;
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
padding: 8px;
border-radius: 6px;
padding: 0;
width: 36px;
height: 36px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-primary);
transition: all 0.15s ease;
color: var(--color-text-secondary);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.settings-btn:hover,
.theme-toggle-btn:hover {
background: var(--color-bg-secondary);
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.settings-btn.active {
background: var(--color-bg-button);
background: linear-gradient(135deg, var(--color-bg-button) 0%, var(--color-accent-primary) 100%);
border-color: var(--color-bg-button);
color: var(--color-text-button);
box-shadow: 0 2px 8px rgba(9, 105, 218, 0.25);
}
.community-btn {
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 14px;
height: 36px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
font-size: 13px;
font-weight: 500;
text-decoration: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.community-btn:hover {
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.community-btn:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.icon-link {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
color: var(--color-text-secondary);
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
text-decoration: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.icon-link:hover {
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.settings-icon,
@@ -462,6 +669,40 @@
transition: all 0.15s ease;
}
.status select {
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 32px 0 12px;
height: 36px;
font-size: 13px;
font-weight: 500;
color: var(--color-text-secondary);
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
max-width: 180px;
}
.status select:hover {
background-color: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.status select:focus {
outline: none;
border-color: var(--color-border-focus);
box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
transform: translateY(-1px);
}
select:hover,
input:hover {
border-color: var(--color-border-focus);
@@ -504,8 +745,6 @@
}
.feed-content {
width: 100%;
max-width: 42rem;
}
.card {
@@ -549,7 +788,6 @@
display: flex;
align-items: center;
gap: 10px;
min-width: 10%;
}
.card-subheading-left {
@@ -1160,6 +1398,206 @@
transform: translateY(0);
}
}
/* Utility: Container */
.container {
width: 100%;
max-width: 42rem;
margin: 0 auto;
}
/* Large screen - center content with max-width */
@media (min-width: 769px) {
.feed-content {
}
}
/* Tablet Responsive Styles - 481px to 768px */
@media (max-width: 768px) and (min-width: 481px) {
/* Header stays on one line, hide icon links to save space */
.header {
padding: 14px 20px;
}
.status {
gap: 6px;
}
.status select {
max-width: 160px;
}
/* Hide icon links (docs, github, twitter) on tablet */
.icon-link {
display: none;
}
/* Sidebar full width on tablet */
.sidebar {
}
/* Feed adjustments */
.feed {
padding: 20px 16px;
}
.feed-content {
}
/* Card adjustments */
.card {
padding: 20px;
}
}
/* Mobile & Small Tablet - 600px and below */
@media (max-width: 600px) {
/* Hide community button in header, will show in sidebar */
.community-btn {
display: none;
}
}
/* Mobile Responsive Styles - 480px and below */
@media (max-width: 480px) {
/* Hide project dropdown in header, will show in sidebar */
.status select {
display: none;
}
/* Header stays on one line */
.header {
padding: 12px 16px;
}
.header h1 {
font-size: 15px;
gap: 8px;
}
.logomark {
height: 28px;
}
.logo-text {
font-size: 18px;
}
.status {
display: flex;
gap: 6px;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding-bottom: 4px;
}
.status::-webkit-scrollbar {
display: none;
}
.status select {
max-width: 140px;
flex-shrink: 0;
padding: 0 28px 0 10px;
height: 32px;
font-size: 12px;
}
/* Hide icon links on mobile */
.icon-link {
display: none;
}
.settings-btn,
.theme-toggle-btn,
.icon-link {
width: 32px;
height: 32px;
flex-shrink: 0;
}
.community-btn {
height: 32px;
padding: 0 12px;
font-size: 12px;
flex-shrink: 0;
}
.community-btn svg {
width: 12px;
height: 12px;
}
.settings-icon,
.theme-toggle-btn svg,
.icon-link svg {
width: 16px;
height: 16px;
}
/* Sidebar adjustments for mobile */
.sidebar {
}
.sidebar-header {
padding: 12px 16px;
}
.settings-section {
padding: 16px;
}
/* Feed adjustments */
.feed {
padding: 16px 12px;
}
.feed-content {
}
.card {
}
/* Card adjustments */
.card {
padding: 16px;
margin-bottom: 16px;
}
.card-title {
font-size: 15px;
}
.card-header {
flex-wrap: wrap;
gap: 8px;
}
.card-header-left {
flex-wrap: wrap;
}
/* Stats grid to single column */
.stats-grid {
grid-template-columns: 1fr;
}
/* Form inputs full width */
.form-group input,
.form-group select {
width: 100%;
}
/* Scroll to top button position */
.scroll-to-top {
bottom: 16px;
right: 16px;
width: 44px;
height: 44px;
}
}
</style>
</head>
+9 -5
View File
@@ -322,9 +322,11 @@ export class WorkerService {
// Send initial processing status (based on queue depth + active generators)
const isProcessing = this.sessionManager.isAnySessionProcessing();
const queueDepth = this.sessionManager.getTotalActiveWork(); // Includes queued + actively processing
this.sseBroadcaster.broadcast({
type: 'processing_status',
isProcessing
isProcessing,
queueDepth
});
}
@@ -806,11 +808,12 @@ export class WorkerService {
}
/**
* Get processing status (for viewer UI spinner)
* Get processing status (for viewer UI spinner and queue indicator)
*/
private handleGetProcessingStatus(req: Request, res: Response): void {
const isProcessing = this.sessionManager.isAnySessionProcessing();
res.json({ isProcessing });
const queueDepth = this.sessionManager.getTotalActiveWork(); // Includes queued + actively processing
res.json({ isProcessing, queueDepth });
}
// ============================================================================
@@ -823,7 +826,7 @@ export class WorkerService {
*/
broadcastProcessingStatus(): void {
const isProcessing = this.sessionManager.isAnySessionProcessing();
const queueDepth = this.sessionManager.getTotalQueueDepth();
const queueDepth = this.sessionManager.getTotalActiveWork(); // Includes queued + actively processing
const activeSessions = this.sessionManager.getActiveSessionCount();
logger.info('WORKER', 'Broadcasting processing status', {
@@ -834,7 +837,8 @@ export class WorkerService {
this.sseBroadcaster.broadcast({
type: 'processing_status',
isProcessing
isProcessing,
queueDepth
});
}
+17
View File
@@ -256,6 +256,23 @@ export class SessionManager {
return total;
}
/**
* Get total active work (queued + currently processing)
* Counts both pending messages and items actively being processed by SDK agents
*/
getTotalActiveWork(): number {
let total = 0;
for (const session of this.sessions.values()) {
// Count queued messages
total += session.pendingMessages.length;
// Count currently processing item (1 per active generator)
if (session.generatorPromise !== null) {
total += 1;
}
}
return total;
}
/**
* Check if any session is actively processing (has pending messages OR active generator)
* Used for activity indicator to prevent spinner from stopping while SDK is processing
+457 -19
View File
@@ -297,10 +297,9 @@
overflow: hidden;
}
.container {
.full-height-flex-layout {
display: flex;
height: 100vh;
width: 100vw;
height: 100%;
position: relative;
}
@@ -314,8 +313,9 @@
position: fixed;
right: 0;
top: 0;
width: 400px;
height: 100vh;
width: 100%;
max-width: 400px;
background: var(--color-bg-primary);
border-left: 1px solid var(--color-border-primary);
display: flex;
@@ -331,12 +331,16 @@
}
.header {
padding: 14px 18px;
padding: 16px 24px;
border-bottom: 1px solid var(--color-border-primary);
display: flex;
justify-content: space-between;
align-items: center;
background: var(--color-bg-header);
background: linear-gradient(to bottom,
var(--color-bg-header) 0%,
var(--color-bg-primary) 100%);
backdrop-filter: blur(8px);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.sidebar-header {
@@ -354,13 +358,124 @@
color: var(--color-text-header);
}
.sidebar-community-btn {
display: none;
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 14px;
height: 36px;
cursor: pointer;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
font-size: 13px;
font-weight: 500;
text-decoration: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
margin: 16px 18px;
}
.sidebar-community-btn:hover {
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.sidebar-community-btn:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (max-width: 600px) {
.sidebar-community-btn {
display: flex;
}
}
.sidebar-project-filter {
display: none;
padding: 16px 18px;
border-bottom: 1px solid var(--color-border-primary);
}
.sidebar-project-filter label {
display: block;
margin-bottom: 8px;
font-size: 12px;
color: var(--color-text-muted);
font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
font-weight: 500;
}
.sidebar-project-filter select {
width: 100%;
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 32px 0 12px;
height: 36px;
font-size: 13px;
font-weight: 500;
color: var(--color-text-secondary);
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
}
.sidebar-project-filter select:hover {
background-color: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
}
.sidebar-project-filter select:focus {
outline: none;
border-color: var(--color-border-focus);
box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}
@media (max-width: 480px) {
.sidebar-project-filter {
display: block;
}
}
.sidebar-social-links {
display: none;
padding: 16px 18px;
border-bottom: 1px solid var(--color-border-primary);
gap: 8px;
justify-content: center;
}
.sidebar-social-links .icon-link {
flex: 1;
max-width: 80px;
}
@media (max-width: 768px) {
.sidebar-social-links {
display: flex;
}
}
.header h1 {
font-size: 16px;
font-size: 17px;
font-weight: 500;
color: var(--color-text-header);
display: flex;
align-items: center;
gap: 10px;
gap: 12px;
line-height: 1;
}
@@ -376,46 +491,138 @@
animation: spin 1.5s linear infinite;
}
.queue-bubble {
position: absolute;
top: -8px;
right: -8px;
background: var(--color-accent-primary);
color: var(--color-text-button);
font-size: 10px;
font-weight: 600;
font-family: 'Monaspace Radon', monospace;
height: 18px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
animation: pulse 2s ease-in-out infinite;
z-index: 10;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
}
.logo-text {
font-family: 'Monaspace Radon', monospace;
font-weight: 100;
font-size: 20px;
font-size: 21px;
letter-spacing: -0.03em;
color: var(--color-text-logo);
line-height: 1;
padding-top: 1px;
}
.status {
display: flex;
align-items: center;
gap: 12px;
gap: 8px;
font-size: 13px;
}
.settings-btn,
.theme-toggle-btn {
background: transparent;
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
padding: 8px;
border-radius: 6px;
padding: 0;
width: 36px;
height: 36px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-primary);
transition: all 0.15s ease;
color: var(--color-text-secondary);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.settings-btn:hover,
.theme-toggle-btn:hover {
background: var(--color-bg-secondary);
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.settings-btn.active {
background: var(--color-bg-button);
background: linear-gradient(135deg, var(--color-bg-button) 0%, var(--color-accent-primary) 100%);
border-color: var(--color-bg-button);
color: var(--color-text-button);
box-shadow: 0 2px 8px rgba(9, 105, 218, 0.25);
}
.community-btn {
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 14px;
height: 36px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
font-size: 13px;
font-weight: 500;
text-decoration: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.community-btn:hover {
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.community-btn:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.icon-link {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
color: var(--color-text-secondary);
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
text-decoration: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.icon-link:hover {
background: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.settings-icon,
@@ -462,6 +669,40 @@
transition: all 0.15s ease;
}
.status select {
background: var(--color-bg-card);
border: 1px solid var(--color-border-primary);
border-radius: 6px;
padding: 0 32px 0 12px;
height: 36px;
font-size: 13px;
font-weight: 500;
color: var(--color-text-secondary);
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
max-width: 180px;
}
.status select:hover {
background-color: var(--color-bg-card-hover);
border-color: var(--color-border-focus);
color: var(--color-text-primary);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.status select:focus {
outline: none;
border-color: var(--color-border-focus);
box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
transform: translateY(-1px);
}
select:hover,
input:hover {
border-color: var(--color-border-focus);
@@ -504,8 +745,6 @@
}
.feed-content {
width: 100%;
max-width: 42rem;
}
.card {
@@ -549,7 +788,6 @@
display: flex;
align-items: center;
gap: 10px;
min-width: 10%;
}
.card-subheading-left {
@@ -1160,6 +1398,206 @@
transform: translateY(0);
}
}
/* Utility: Container */
.container {
width: 100%;
max-width: 42rem;
margin: 0 auto;
}
/* Large screen - center content with max-width */
@media (min-width: 769px) {
.feed-content {
}
}
/* Tablet Responsive Styles - 481px to 768px */
@media (max-width: 768px) and (min-width: 481px) {
/* Header stays on one line, hide icon links to save space */
.header {
padding: 14px 20px;
}
.status {
gap: 6px;
}
.status select {
max-width: 160px;
}
/* Hide icon links (docs, github, twitter) on tablet */
.icon-link {
display: none;
}
/* Sidebar full width on tablet */
.sidebar {
}
/* Feed adjustments */
.feed {
padding: 20px 16px;
}
.feed-content {
}
/* Card adjustments */
.card {
padding: 20px;
}
}
/* Mobile & Small Tablet - 600px and below */
@media (max-width: 600px) {
/* Hide community button in header, will show in sidebar */
.community-btn {
display: none;
}
}
/* Mobile Responsive Styles - 480px and below */
@media (max-width: 480px) {
/* Hide project dropdown in header, will show in sidebar */
.status select {
display: none;
}
/* Header stays on one line */
.header {
padding: 12px 16px;
}
.header h1 {
font-size: 15px;
gap: 8px;
}
.logomark {
height: 28px;
}
.logo-text {
font-size: 18px;
}
.status {
display: flex;
gap: 6px;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding-bottom: 4px;
}
.status::-webkit-scrollbar {
display: none;
}
.status select {
max-width: 140px;
flex-shrink: 0;
padding: 0 28px 0 10px;
height: 32px;
font-size: 12px;
}
/* Hide icon links on mobile */
.icon-link {
display: none;
}
.settings-btn,
.theme-toggle-btn,
.icon-link {
width: 32px;
height: 32px;
flex-shrink: 0;
}
.community-btn {
height: 32px;
padding: 0 12px;
font-size: 12px;
flex-shrink: 0;
}
.community-btn svg {
width: 12px;
height: 12px;
}
.settings-icon,
.theme-toggle-btn svg,
.icon-link svg {
width: 16px;
height: 16px;
}
/* Sidebar adjustments for mobile */
.sidebar {
}
.sidebar-header {
padding: 12px 16px;
}
.settings-section {
padding: 16px;
}
/* Feed adjustments */
.feed {
padding: 16px 12px;
}
.feed-content {
}
.card {
}
/* Card adjustments */
.card {
padding: 16px;
margin-bottom: 16px;
}
.card-title {
font-size: 15px;
}
.card-header {
flex-wrap: wrap;
gap: 8px;
}
.card-header-left {
flex-wrap: wrap;
}
/* Stats grid to single column */
.stats-grid {
grid-template-columns: 1fr;
}
/* Form inputs full width */
.form-group input,
.form-group select {
width: 100%;
}
/* Scroll to top button position */
.scroll-to-top {
bottom: 16px;
right: 16px;
width: 44px;
height: 44px;
}
}
</style>
</head>
+6 -2
View File
@@ -17,7 +17,7 @@ export function App() {
const [paginatedSummaries, setPaginatedSummaries] = useState<Summary[]>([]);
const [paginatedPrompts, setPaginatedPrompts] = useState<UserPrompt[]>([]);
const { observations, summaries, prompts, projects, isProcessing, isConnected } = useSSE();
const { observations, summaries, prompts, projects, isProcessing, queueDepth, isConnected } = useSSE();
const { settings, saveSettings, isSaving, saveStatus } = useSettings();
const { stats, refreshStats } = useStats();
const { preference, resolvedTheme, setThemePreference } = useTheme();
@@ -86,7 +86,7 @@ export function App() {
}, [currentFilter]);
return (
<div className="container">
<div className="full-height-flex-layout">
<div className="main-col">
<Header
isConnected={isConnected}
@@ -96,6 +96,7 @@ export function App() {
onSettingsToggle={toggleSidebar}
sidebarOpen={sidebarOpen}
isProcessing={isProcessing}
queueDepth={queueDepth}
themePreference={preference}
onThemeChange={setThemePreference}
/>
@@ -116,6 +117,9 @@ export function App() {
isSaving={isSaving}
saveStatus={saveStatus}
isConnected={isConnected}
projects={projects}
currentFilter={currentFilter}
onFilterChange={setCurrentFilter}
onSave={saveSettings}
onClose={toggleSidebar}
onRefreshStats={refreshStats}
+3 -1
View File
@@ -64,7 +64,8 @@ export function Feed({ observations, summaries, prompts, onLoadMore, isLoading,
<div className="feed" ref={feedRef}>
<ScrollToTop targetRef={feedRef} />
<div className="feed-content">
{items.map(item => {
<div className="container">
{items.map(item => {
const key = `${item.itemType}-${item.id}`;
if (item.itemType === 'observation') {
return <ObservationCard key={key} observation={item} />;
@@ -93,6 +94,7 @@ export function Feed({ observations, summaries, prompts, onLoadMore, isLoading,
No more items to load
</div>
)}
</div>
</div>
</div>
);
+25 -28
View File
@@ -10,6 +10,7 @@ interface HeaderProps {
onSettingsToggle: () => void;
sidebarOpen: boolean;
isProcessing: boolean;
queueDepth: number;
themePreference: ThemePreference;
onThemeChange: (theme: ThemePreference) => void;
}
@@ -22,13 +23,21 @@ export function Header({
onSettingsToggle,
sidebarOpen,
isProcessing,
queueDepth,
themePreference,
onThemeChange
}: HeaderProps) {
return (
<div className="header">
<h1>
<img src="claude-mem-logomark.webp" alt="" className={`logomark ${isProcessing ? 'spinning' : ''}`} />
<div style={{ position: 'relative', display: 'inline-block' }}>
<img src="claude-mem-logomark.webp" alt="" className={`logomark ${isProcessing ? 'spinning' : ''}`} />
{queueDepth > 0 && (
<div className="queue-bubble">
{queueDepth}
</div>
)}
</div>
<span className="logo-text">claude-mem</span>
</h1>
<div className="status">
@@ -37,15 +46,7 @@ export function Header({
target="_blank"
rel="noopener noreferrer"
title="Documentation"
style={{
display: 'block',
padding: '8px 4px 8px 8px',
color: '#a0a0a0',
transition: 'color 0.2s',
lineHeight: 0
}}
onMouseEnter={(e) => e.currentTarget.style.color = '#606060'}
onMouseLeave={(e) => e.currentTarget.style.color = '#a0a0a0'}
className="icon-link"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
@@ -57,15 +58,7 @@ export function Header({
target="_blank"
rel="noopener noreferrer"
title="GitHub"
style={{
display: 'block',
padding: '8px 4px',
color: '#a0a0a0',
transition: 'color 0.2s',
lineHeight: 0
}}
onMouseEnter={(e) => e.currentTarget.style.color = '#606060'}
onMouseLeave={(e) => e.currentTarget.style.color = '#a0a0a0'}
className="icon-link"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
@@ -76,20 +69,24 @@ export function Header({
target="_blank"
rel="noopener noreferrer"
title="X (Twitter)"
style={{
display: 'block',
padding: '8px 8px 8px 4px',
color: '#a0a0a0',
transition: 'color 0.2s',
lineHeight: 0
}}
onMouseEnter={(e) => e.currentTarget.style.color = '#606060'}
onMouseLeave={(e) => e.currentTarget.style.color = '#a0a0a0'}
className="icon-link"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>
</svg>
</a>
<a
href="https://discord.gg/J4wttp9vDu"
target="_blank"
rel="noopener noreferrer"
className="community-btn"
title="Join our Discord community"
>
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" style={{ marginRight: '6px' }}>
<path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z"/>
</svg>
<span>Community</span>
</a>
<select
value={currentFilter}
onChange={e => onFilterChange(e.target.value)}
+65 -1
View File
@@ -10,12 +10,15 @@ interface SidebarProps {
isSaving: boolean;
saveStatus: string;
isConnected: boolean;
projects: string[];
currentFilter: string;
onFilterChange: (filter: string) => void;
onSave: (settings: Settings) => void;
onClose: () => void;
onRefreshStats: () => void;
}
export function Sidebar({ isOpen, settings, stats, isSaving, saveStatus, isConnected, onSave, onClose, onRefreshStats }: SidebarProps) {
export function Sidebar({ isOpen, settings, stats, isSaving, saveStatus, isConnected, projects, currentFilter, onFilterChange, onSave, onClose, onRefreshStats }: SidebarProps) {
// Settings form state
const [model, setModel] = useState(settings.CLAUDE_MEM_MODEL || DEFAULT_SETTINGS.CLAUDE_MEM_MODEL);
const [contextObs, setContextObs] = useState(settings.CLAUDE_MEM_CONTEXT_OBSERVATIONS || DEFAULT_SETTINGS.CLAUDE_MEM_CONTEXT_OBSERVATIONS);
@@ -118,6 +121,67 @@ export function Sidebar({ isOpen, settings, stats, isSaving, saveStatus, isConne
</button>
</div>
</div>
<a
href="https://discord.gg/J4wttp9vDu"
target="_blank"
rel="noopener noreferrer"
className="sidebar-community-btn"
title="Join our Discord community"
>
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" style={{ marginRight: '6px' }}>
<path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z"/>
</svg>
<span>Community</span>
</a>
<div className="sidebar-social-links">
<a
href="https://docs.claude-mem.ai"
target="_blank"
rel="noopener noreferrer"
title="Documentation"
className="icon-link"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
</svg>
</a>
<a
href="https://github.com/thedotmack/claude-mem/"
target="_blank"
rel="noopener noreferrer"
title="GitHub"
className="icon-link"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
</a>
<a
href="https://x.com/Claude_Memory"
target="_blank"
rel="noopener noreferrer"
title="X (Twitter)"
className="icon-link"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>
</svg>
</a>
</div>
<div className="sidebar-project-filter">
<label htmlFor="sidebar-project-select">Filter by Project</label>
<select
id="sidebar-project-select"
value={currentFilter}
onChange={e => onFilterChange(e.target.value)}
>
<option value="">All Projects</option>
{projects.map(project => (
<option key={project} value={project}>{project}</option>
))}
</select>
</div>
<div className="stats-scroll">
<div className="settings-section">
+4 -2
View File
@@ -10,6 +10,7 @@ export function useSSE() {
const [projects, setProjects] = useState<string[]>([]);
const [isConnected, setIsConnected] = useState(false);
const [isProcessing, setIsProcessing] = useState(false);
const [queueDepth, setQueueDepth] = useState(0);
const eventSourceRef = useRef<EventSource | null>(null);
const reconnectTimeoutRef = useRef<NodeJS.Timeout>();
@@ -83,8 +84,9 @@ export function useSSE() {
case 'processing_status':
if (typeof data.isProcessing === 'boolean') {
console.log('[SSE] Processing status:', data.isProcessing);
console.log('[SSE] Processing status:', data.isProcessing, 'Queue depth:', data.queueDepth);
setIsProcessing(data.isProcessing);
setQueueDepth(data.queueDepth || 0);
}
break;
}
@@ -107,5 +109,5 @@ export function useSSE() {
};
}, []);
return { observations, summaries, prompts, projects, isProcessing, isConnected };
return { observations, summaries, prompts, projects, isProcessing, queueDepth, isConnected };
}