[claude] Add click-to-view-PR panel for agents (#8) #9

Closed
claude wants to merge 1 commits from claude/the-matrix:claude/issue-8 into main
First-time contributor

Fixes #8

What this does

When you click or tap any agent in the 3D world, a panel slides in from the right edge showing:

  • Current issue — fetched from Gitea, linked
  • Active branch — e.g. claude/issue-8
  • Open PR — title + link to Gitea PR
  • Recent commits — last 5 commits on the branch

Implementation

  • js/agent-panel.js (new): fetches Gitea API on click; AbortController cancels stale requests; graceful fallback when giteaUrl / gitLogin are not configured
  • js/interaction.js: adds initClickDetection() using THREE.Raycaster; distinguishes clicks from orbit drags (< 6px pointer movement)
  • js/agents.js: sets group.userData.agentId for raycasting; exports getAgentGroups()
  • js/agent-defs.js: adds optional gitLogin field per agent definition
  • js/config.js: adds giteaUrl / giteaToken / giteaRepo fields (env vars VITE_GITEA_URL, VITE_GITEA_TOKEN, VITE_GITEA_REPO)
  • index.html: #agent-panel slides in from the right; Esc key or ✕ closes it

Configuration

Set in .env.local:

VITE_GITEA_URL=http://your-gitea-server:3000
VITE_GITEA_TOKEN=your-read-only-token
VITE_GITEA_REPO=owner/repo

In js/agent-defs.js, set gitLogin on any agent to enable Gitea lookups for that agent.

Fixes #8 ## What this does When you click or tap any agent in the 3D world, a panel slides in from the right edge showing: - **Current issue** — fetched from Gitea, linked - **Active branch** — e.g. `claude/issue-8` - **Open PR** — title + link to Gitea PR - **Recent commits** — last 5 commits on the branch ## Implementation - `js/agent-panel.js` (new): fetches Gitea API on click; AbortController cancels stale requests; graceful fallback when `giteaUrl` / `gitLogin` are not configured - `js/interaction.js`: adds `initClickDetection()` using `THREE.Raycaster`; distinguishes clicks from orbit drags (< 6px pointer movement) - `js/agents.js`: sets `group.userData.agentId` for raycasting; exports `getAgentGroups()` - `js/agent-defs.js`: adds optional `gitLogin` field per agent definition - `js/config.js`: adds `giteaUrl / giteaToken / giteaRepo` fields (env vars `VITE_GITEA_URL`, `VITE_GITEA_TOKEN`, `VITE_GITEA_REPO`) - `index.html`: `#agent-panel` slides in from the right; Esc key or ✕ closes it ## Configuration Set in `.env.local`: ``` VITE_GITEA_URL=http://your-gitea-server:3000 VITE_GITEA_TOKEN=your-read-only-token VITE_GITEA_REPO=owner/repo ``` In `js/agent-defs.js`, set `gitLogin` on any agent to enable Gitea lookups for that agent.
claude added 1 commit 2026-03-23 18:05:43 +00:00
Clicking/tapping an agent in the 3D world now slides in a panel showing
that agent's current Gitea issue, active branch, open PR link, and last
5 commits.

- js/agent-panel.js (new): fetches Gitea API on demand; AbortController
  cancels stale requests; graceful fallback when gitea URL / gitLogin
  are unset
- js/interaction.js: adds initClickDetection() using THREE.Raycaster;
  distinguishes clicks from orbit-control drags (< 6px pointer travel)
- js/agents.js: sets group.userData.agentId for raycasting; exports
  getAgentGroups()
- js/agent-defs.js: adds optional gitLogin field per agent
- js/config.js: adds giteaUrl / giteaToken / giteaRepo config fields
  (VITE_GITEA_URL, VITE_GITEA_TOKEN, VITE_GITEA_REPO env vars)
- index.html: #agent-panel slides in from right edge; Esc / ✕ closes it

Fixes #8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Timmy closed this pull request 2026-04-05 00:13:42 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/the-matrix#9