diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index d33a1eb..6e2a51b 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -14,7 +14,7 @@ Claude Code fires a hook event (e.g. "I just used the Read tool") hook-handler.py receives the event JSON on stdin | v -hook-handler.py POSTs it to http://localhost:3000/api/hooks +hook-handler.py POSTs it to http://localhost:4700/api/hooks | v The server updates the SQLite DB and broadcasts via WebSocket @@ -54,7 +54,7 @@ Critical design constraint: **it must never block Claude Code.** If the server i ### 3. The Server (`server/`) -A FastAPI app running on port 3000. It does four things: +A FastAPI app running on port 4700. It does four things: | Component | File | What It Does | |-----------|------|-------------| diff --git a/CLAUDE.md b/CLAUDE.md index da4bb57..a9f9096 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ Web-based dashboard for monitoring and managing multiple Claude Code sessions. ## Running ```bash source .venv/bin/activate -uvicorn server.main:app --port 3000 --reload +uvicorn server.main:app --port 4700 --reload ``` ## Testing diff --git a/Makefile b/Makefile index 4ac39f5..7344cb6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT_GOAL := help -PORT := 3000 +PORT := 4700 # Prefer project .venv via uv so `make up` works without `source .venv/bin/activate` UV_RUN := uv run @@ -11,12 +11,13 @@ help: ## Show this help setup install: ## Full local setup: uv venv + dev deps, Playwright Chromium, Claude hooks uv sync --extra dev uv run python -m playwright install chromium - bash scripts/setup.sh + bash scripts/setup.sh $(PORT) @echo "" @echo "Setup complete. Start the app: make up" @echo "If Playwright/e2e fails (missing OS libs), run: uv run python -m playwright install --with-deps chromium" -up: ## Start the server (port 3000; override with PORT=3001) +up: ## Start the server (default 4700; override with PORT=XXXX) + @bash scripts/setup.sh $(PORT) $(UV_RUN) uvicorn server.main:app --port $(PORT) --reload down: ## Stop the server diff --git a/README.md b/README.md index 4c85aad..1ad03a6 100644 --- a/README.md +++ b/README.md @@ -51,15 +51,15 @@ pip install . bash scripts/setup.sh # Start the server -uvicorn server.main:app --port 3000 +uvicorn server.main:app --port 4700 ``` -Then open **http://localhost:3000** in your browser. +Then open **http://localhost:4700** in your browser. ## Architecture ``` -Browser (localhost:3000) +Browser (localhost:4700) | |-- REST API (/api/*) -- Sessions, history, search, analytics |-- WebSocket (/ws/*) -- Real-time dashboard updates @@ -122,7 +122,7 @@ source .venv/bin/activate pytest # Run with auto-reload -uvicorn server.main:app --port 3000 --reload +uvicorn server.main:app --port 4700 --reload ``` ## Uninstalling diff --git a/public/css/style.css b/public/css/style.css index 0bb2ae0..0521703 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1638,14 +1638,28 @@ body { .history-table tbody tr:hover { background: var(--surface-3); } -/* ---- Transcript Detail View ---- */ -.transcript-container { max-width: 800px; margin: 0 auto; } +/* ---- Transcript Detail View (History tab) ---- */ +#transcript-view { + display: flex; + flex-direction: column; + height: calc(100vh - 120px); +} + +#transcript-view .transcript-header { + flex-shrink: 0; +} + +#transcript-view .transcript-live { + flex: 1; + min-height: 0; +} .transcript-header { display: flex; align-items: center; gap: 12px; - margin-bottom: 20px; + margin-bottom: 12px; + padding: 0 4px; } .transcript-message { diff --git a/public/index.html b/public/index.html index d6b781c..836b444 100644 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,6 @@ Claude Code Command Center -
@@ -124,9 +123,6 @@

Settings

- - - diff --git a/public/js/app.js b/public/js/app.js index 5eee6c7..587b741 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -28,9 +28,15 @@ const App = { if (state.view === 'session' && state.sessionId) { // Reopen session transcript without pushing another state this._openSessionDirect(state.sessionId, state.sessionTitle); + } else if (state.view === 'history' && state.transcript && state.sessionId) { + // Reopen history transcript without pushing another state + if (typeof History !== 'undefined') { + History.showTranscriptDirect(state.sessionId, state.sessionTitle); + } } else { - // Close any open transcript and switch view + // Close any open transcript/overlay and switch view if (typeof SessionViewer !== 'undefined') SessionViewer.close(); + if (typeof History !== 'undefined') History.closeTranscript(); this._switchViewDirect(state.view || 'dashboard'); } }); diff --git a/public/js/history.js b/public/js/history.js index c7f35ec..a57f078 100644 --- a/public/js/history.js +++ b/public/js/history.js @@ -42,13 +42,12 @@ const History = {