feat: add agent activity feed overlay with Gitea API polling (Fixes #2)

Adds a scrolling right-side panel showing real-time agent work pulled
from the Gitea API.  Auto-refreshes every 30 s.  Displays PR opens,
PR merges, issue opens, and issue closes with relative timestamps and
colour-coded event types.  Panel is collapsible; collapses to a narrow
vertical toggle button.  Gitea base URL and repo slug are configurable
via URL params (?gitea=, ?repo=) or Vite env vars (VITE_GITEA_URL,
VITE_GITEA_REPO) with defaults pointing at the live Gitea instance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Whitestone
2026-03-23 14:08:21 -04:00
parent 840270fe4b
commit 2bd840cc33
3 changed files with 321 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import { initUI, updateUI } from './ui.js';
import { initInteraction, updateControls, disposeInteraction } from './interaction.js';
import { initWebSocket, getConnectionState, getJobCount } from './websocket.js';
import { initVisitor } from './visitor.js';
import { initActivityFeed } from './activity-feed.js';
let running = false;
let canvas = null;
@@ -38,6 +39,18 @@ function buildWorld(firstInit, stateSnapshot) {
initUI();
initWebSocket(scene);
initVisitor();
initActivityFeed();
// Activity feed collapse/expand toggle
const $feedPanel = document.getElementById('activity-feed');
const $feedClose = document.getElementById('activity-feed-close');
const $feedToggle = document.getElementById('activity-feed-toggle');
if ($feedClose && $feedPanel) {
$feedClose.addEventListener('click', () => $feedPanel.classList.add('collapsed'));
}
if ($feedToggle && $feedPanel) {
$feedToggle.addEventListener('click', () => $feedPanel.classList.remove('collapsed'));
}
// Dismiss loading screen
const loadingScreen = document.getElementById('loading-screen');