Commit Graph
11 Commits
Author SHA1 Message Date
Andy Dixon de3dbf8601 Redesign the interface
Deep blue-black theme with a violet-to-cyan accent, frosted floating
panels, self-hosted Inter, a welcome screen with a call to action, a
card-style inspector, accent tabs and toggles, animated progress, and
a restyled open dialog. In 3D the WebGL walls are now lit per side
with a darker foot so buildings read as solids, and the canvas clears
to transparent over the new background. Renamed to CodeNavigator.
2026-04-12 15:04:26 +01:00
Andy Dixon 361ecde158 Fix every failed clone being reported as a timeout
The context was cancelled before its error was checked, so any failure
looked like a timeout and private repositories never offered sign-in.
Clone handling moves into cloneRepo, which checks for DeadlineExceeded
specifically, with tests for success, failure with token masking, and
timeout.
2026-04-05 12:44:17 +01:00
Andy Dixon e744ebab1f Time out stalled GitHub clones after ten minutes
Progress streams now stay open until a job ends, so a hung clone would
otherwise hold its job and stream forever.
2026-04-04 11:53:50 +01:00
Andy Dixon 841f27487a Keep progress streams open until the job finishes
The stream used to close after three minutes, which a job queued behind
other users could exceed. It now runs until the job completes or the
client disconnects, sending a keep-alive comment every 15 seconds so
nginx does not time out an idle stream.
2026-03-21 12:35:13 +00:00
Andy Dixon b216b86004 Add GitHub App sign-in for private repositories
/api/github/login redirects to GitHub with a single-use state bound to
the session; the callback exchanges the code for a user token kept in
memory and expired with it. Clones pass the token through git config
in the environment, never the URL or arguments, and ignore host git
config and credential helpers. Failed clones report authRequired
(signin or install) so the frontend can offer the right next step.

Configured with GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GITHUB_APP_SLUG.
2026-02-28 12:27:34 +00:00
Andy Dixon 25c8c45de4 Limit concurrent indexing to two runs
Further jobs report a queued phase until a slot frees, so a burst of
users cannot exhaust the container's CPU and memory at once.
2026-02-21 19:55:38 +00:00
Andy Dixon 1c93df022d Expire idle snapshots and abandoned jobs, cap snapshot count
A background sweep every minute drops snapshots unused for an hour,
finished jobs, and uploads never committed, deleting their workspaces.
At most 8 snapshots are held; the least recently used is evicted.
2026-02-21 09:37:43 +00:00
Andy Dixon 25e2d2f390 Keep one snapshot per session instead of one globally
Indexing used to discard every existing snapshot, so concurrent users
wiped out each other's landscapes. Only the same session's previous
snapshot and workspace are replaced now.
2026-02-15 18:15:47 +00:00
Andy Dixon 26800b9b66 Scope jobs and snapshots to a browser session
An HttpOnly, SameSite=Lax session cookie is issued when a job is
created. Job and snapshot routes return 404 to any other session, so
indexed source is only readable by the browser that loaded it.
2026-02-15 10:53:01 +00:00
Andy Dixon d8d4a77ba7 Use random job and snapshot IDs
Timestamp-derived IDs were guessable, and the ID is what grants access
to indexed source. crypto/rand.Text gives 26 base32 characters.
2026-02-07 12:18:26 +00:00
Andy Dixon 5816dea6b1 Add Go HTTP/SSE API server with embedded frontend
Implements the API routes (jobs, progress events, snapshots, search,
entities, source delivery with release) to net/http and serves the
static frontend from the same binary on the same origin.
2026-01-25 09:10:28 +00:00