Skip to content

Refresh Orbital - Hackweek - #30

Merged
itsdangold merged 39 commits into
masterfrom
hackweek-2026
Aug 21, 2026
Merged

itsdangold merged 39 commits into
masterfrom
hackweek-2026

Conversation

@itsdangold

Copy link
Copy Markdown
Contributor

Sentry Orbital: a globe that draws a beam for every event

Replaces the prototype frontend with a WebGL globe and a character-cell
terminal overlay, and the UDP prototype with a Go service that fans the feed
out over SSE. 38 commits, 97 files.

What's in it

  • Globe — one beam per event, seated on the surface where it happened,
    with a procedural cloud layer, starfield and a post-FX chain. The camera
    fits the globe to any viewport.
  • Overlay — a TUI on a character grid: session total and a zoned rate
    gauge, an SDK leaderboard with trends, region shares, and a live event
    stream that admits one row per tick so it can actually be read.
  • Cold start — a POST-style boot sequence that reports what the app
    really loaded (city count, SDK families, ring size, which feed it found)
    before dissolving into the display.
  • Backend — main.go owns the UDP socket, samples and rate-limits, and
    re-broadcasts each datagram verbatim over SSE. Same flags, ports and
    endpoints as the service it replaces.

Deploying

Nothing about the pipeline changes: GitHub Actions builds the Dockerfile and
pushes to GHCR, GoCD waits on Build and smoke test and rolls the image
out. What changed is that the pipeline now points at this app:

  • Dockerfile builds the root project with npm instead of frontend/ with bun.
  • vite build writes to static/, the directory main.go serves. This was
    the quiet one: without it a green build produces an image serving an empty
    directory.
  • The smoke test grepped / for Sentry Live, a string from the prototype.
    It now checks the title and follows the hashed bundle the page names,
    fetching it — so a build that loses the frontend fails instead of passing.

.github/ and gocd/ are restored unchanged; master's two commits are
already merged in, so this goes in clean.

Verified

Against a --no-cache build of the image CI builds (12.1 MB, linux/amd64),
running CI's own assertions: /healthz → ok, /stats carrying
udp_received, index naming a bundle that serves 200, fonts 200. Then run
with -test and opened in a browser — boot sequence through live SSE feed,
globe and every panel updating. tsc clean.

Worth knowing before you merge

  • Production is hard-wired to the live feed. No synthetic fallback, no
    ?source= override — a deployed page with no backend shows an empty globe
    rather than inventing traffic. Deliberate: a query string shouldn't be able
    to put fabricated numbers on screen, and an outage shouldn't redraw itself
    as healthy.
  • Platforms outside the taxonomy are dropped, not bucketed —
    native, elixir, other (12% of the backend's test mix). Mapping them
    to a family would inflate that family's row with traffic that isn't it.
  • 1.5 MB of JS (343 KB gzipped), unsplit. Three.js and the postprocessing
    chain dominate. Fine for a display that loads once; worth splitting if it
    ever needs to be fast on a cold phone.
  • The k8s manifest lives outside this repo. Ports (7000/tcp, 5556/udp), flags
    and endpoints are unchanged, so it shouldn't need touching — but it's the
    one thing I couldn't verify from here.
CleanShot 2026-08-21 @ 09 51@2x

itsdangold and others added 30 commits August 20, 2026 09:02
The previous Orbital was a Go service ingesting Sentry telemetry over UDP,
paired with a small Vite frontend and a GoCD deploy pipeline. None of it is
reachable from the new client-only app, which renders a synthetic event stream
in the browser and has no server component to build, containerise or deploy.

Removing it in one go rather than letting it rot alongside the rewrite: the two
share no code, and leaving a second package.json under frontend/ makes the
project root ambiguous to tooling.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Client-only: there is no server, so the whole thing builds to static files.

three is pinned alongside @react-three/fiber 8 and @react-three/postprocessing 2
deliberately. postprocessing 3 requires fiber 9, and fiber 9 requires React 19 —
upgrading any one of them forces all three, so the trio moves together or not at
all.

.claude/ is ignored: it holds a launch config with absolute paths and a
permission allowlist, both specific to one machine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Everything downstream reads TelemetryEvent and nothing else, so the renderer and
the UI never learn whether they are being fed synthetic data or a live firehose.
Swapping between them is one env var (VITE_EVENT_SOURCE) resolved in
sourceFactory; RealApiEventSource is the seam for the real thing.

The buffer is a fixed ring rather than a growing list. At a few hundred events a
second an unbounded buffer is a leak, and old pulses are worthless once they
have faded — overwriting the oldest slot is exactly the desired eviction.

Nothing here carries customer, project, user or issue identity. The event model
only has enough to place a light and colour it: coordinates, SDK family,
category and intensity.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Rasterises world-atlas land polygons into a bit-packed equirectangular mask,
which the renderer queries to place land dots and to keep synthetic events off
the ocean. Baked at build time and shipped as JSON so the app never parses
topojson at runtime.

Three things the rasteriser has to get right, each found the hard way by
ray-tracing the mask back out to an image:

- Polygons are filled independently. Pooling all rings into one scanline pass
  inverts the fill wherever two landmasses overlap horizontally.
- Rings crossing the antimeridian are unwrapped before filling. Left alone, the
  jump from 179 to -179 reads as an edge spanning the globe and floods whole
  latitude rows.
- Antarctica is capped. Its coastline stops short of the pole, so the rows below
  it have no crossings at all and leave a hole.

preview-globe.mjs is that ray tracer: it renders the mask to a PNG in Node, with
no browser involved, which is the only way to check this without eyeballing it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
391 weighted cities, sampled so the result looks like real traffic rather than
noise. Several corrections over a naive weighted pick, each fixing something
that read as obviously fake:

- Raw city weights span roughly 60:1, so a handful of hubs swallowed everything
  and whole continents sat dark. Weights are raised to a power to compress that
  range, and a share of events is drawn uniformly so quiet regions still blink.
- Placement spreads around a city in three tiers (metro, regional, rural) with a
  gaussian falloff, instead of stacking every event on one pixel.
- Longitude offsets are divided by cos(latitude), or northern cities smear into
  east-west streaks as the meridians converge.
- Points are rejection-sampled against the land mask, then snapped, so nothing
  lands in the ocean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every knob in the renderer reads from this shape, and the dev panel writes it,
so a config copied out of the panel pastes straight back in as the new default.

withDefaults deep-fills a partial config rather than trusting what it is given.
Saved configs outlive the code that wrote them, and a style gaining a field
should not leave older saves rendering undefined into a shader uniform.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The globe draws three ways — pointillist dots, flat painted continents, or
continents raised off the sphere — sharing one land mask.

Points sit on a spherical Fibonacci lattice. An even lat/lng grid oversamples the
poles by about 3.6x, which bunches dots into a dense cap at each end; Fibonacci
spreads them by equal area instead.

Rotation lives on the globe, not the camera. Orbiting the camera around a
stationary planet freezes the terminator in place, so a fixed light can never
behave like a sun. Spinning the globe under a fixed light does.

Two texture traps worth naming, both of which paint the Arctic the wrong colour:
equirectangular maps must never be mipmapped on a UV sphere (the small mips
average the entire map across the poles), and the texture column IS the mask
column — round-tripping it through a [0,360) conversion shifts every continent
by 180 degrees.

Relief uses displacement only. Bump shading derives from screen-space UV
derivatives, and a UV sphere's poles are a singularity where those blow up into
concentric rings.

Starfield is hand-rolled rather than drei's: that one has no discard in its
fragment shader, so every star renders as an opaque black square wherever the
sprite should be transparent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
One instanced draw call for up to 65k concurrent beams, in two elongated styles
over shared instance buffers:

- line — a flat quad expanded sideways in view space, so it always turns its
  width toward the camera. WebGL ignores gl_LineWidth, so this billboarding is
  what makes a controllable width possible at all.
- bar — the same beam as a solid cuboid, with depth and a baked face ramp. Being
  a real 3D object, a bar pointing at the camera shows its end rather than its
  height; `thin out when end-on` shrinks those away instead.

Instancing is what makes the box affordable. Per-beam copies of a 24-vertex
template would cost ~113MB of buffers at this capacity; instancing needs under
4MB, which is less than the flat ribbon used when it duplicated each beam's data
across four corners.

Growth and retraction each carry an amount and a duration separately. Tying
duration to amount meant a beam that grew from nothing also spent its whole life
growing, leaving no room to retract — which is exactly the bar-chart lifecycle
you would want: out of the ground, up to height, back down, then fade.

Face shading is applied to coverage as well as colour. Brightness is routinely
pushed past 1, which clips every face to the same value and flattens the box
back into a silhouette.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two styles over the same controls: a smooth noise shell, and Crossy Road style
clouds built out of cubes.

Both sample noise at each texel's direction on the sphere rather than in 2D
texture space, which wraps seamlessly across the antimeridian and avoids the
banding a flat field smears across the poles.

Soft clouds threshold on the field's measured quantile, not a fixed value. fBm
output clusters hard around 0.5, so a fixed threshold saturates: coverage 0.15
gave clear sky and 0.7 total overcast, with only the middle third usable.

Blocky clouds are one merged mesh with interior faces culled, and bake their
face brightness so the voxel read survives with every light off. Two details
that are easy to get wrong:

- The local basis must be right-handed in the order it is used, or the transform
  mirrors, flips every quad's winding, and backface culling erases the sky.
- A tangent plane never dips inside a sphere, so the only lift a cluster needs
  is its own underside — measured off the lowest occupied block, so `altitude`
  is the clearance you actually see.

Size and drift vary per cloud, both drawn so the mean is unchanged by the dial:
turning variance up spreads clouds apart without inflating or shrinking the sky.
Drift is done in the vertex shader so the whole sky stays a single draw call.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Aberration hard enough to see on the continents also smears the beams standing
on top of them, so it is masked to the map. postprocessing has no per-pixel
masking hook, so this re-implements the stock effect with the shift scaled by a
globe mask, and runs it ahead of pixelation and tilt-shift — both of which
spread a beam's colour onto neighbouring pixels the mask correctly calls map.
That ordering also matches what the effects are: aberration happens at the lens,
pixelation and scanlines at the display.

The mask is two buffers, not one. A silhouette alone is useless here because
nearly every beam stands inside the globe's outline, so the second pass measures
what the foreground actually covers, with the globe drawn colour-write-off
purely to occlude.

Coverage is read from an unblended draw rather than from alpha. Beams average
~0.16 alpha yet visually dominate, because their colour is far brighter than the
ground behind them — blended, they read as barely there and stay unprotected.
Note that only material.blending switches this: blendSrcAlpha applies solely
under CustomBlending, and `transparent` merely picks a render list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A top-ten SDK board with sparklines, framed in a CRT bezel. Hovering a row
highlights that SDK's beams on the globe and dims the rest.

Sparklines share one scale across all ten rows rather than normalising each to
its own peak, so a quiet SDK stays visibly quiet instead of being flattered into
looking as busy as JavaScript.

F hides the readouts for a clean shot of the globe; the bezel stays, since it
frames the picture rather than annotating it.

No customer, project, user or issue identity appears anywhere — SDK family is
the only dimension surfaced.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every visual parameter, editable at runtime, with the result copyable as JSON to
paste back in as a new default.

Controls hide when they cannot do anything — clearcoat only under the physical
material, relief only in relief mode, cloud controls per cloud style. With this
many knobs, a control that silently does nothing is indistinguishable from a
broken one.

Persisted under a versioned storage key. The key gets bumped whenever the shape
changes meaning: a stale saved config once squashed the map into the wrong
projection, and the failure looked like a renderer bug rather than old data.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
FPS, frame time, draw calls, triangles and JS heap.

Renderer counters need autoReset off and a manual reset per sampling window:
three clears them at the start of every render(), so reading them afterwards
reports approximately zero.

Point clouds are identified by name. Probing by type alone counted the starfield
as land dots, which made the dot budget look several times worse than it was.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Entry point and root component: builds the event source, starts the buffer, and
hands the same style object to the scene and the chrome.

The keyboard handler guards on `target instanceof HTMLElement` before calling
closest(). A keydown dispatched at window or document has a target that is not
an Element, and the resulting throw kills the whole handler — taking every other
shortcut with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
What each control does, which ones only apply in certain modes, and the ones
with a sharp edge — exposure at 0 is a black screen, bloom threshold low with
high intensity is a white-out.

Written because the panel has enough knobs that "I clicked this and nothing
happened" is usually a control that is inert in the current mode rather than a
bug.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Beam roots were hardcoded at 1.004 while the globe draws at radiusScale, so any
radiusScale below that left every beam hanging clear of the ground. At the
current 0.998 the gap is 0.006 — small in world units, but enough on screen that
pixelation snaps it into a visible block and the beams read as floating.

The radius is now a uniform derived from the globe's own settings, so it is live:
dragging radiusScale re-seats beams already in flight rather than leaving them
detached until they expire. Relief mode raises land off the sphere, and every
event is on land by construction, so beams rise with it.

Each style offsets from that surface in the direction that cannot show a seam.
Bars and ribbons sink slightly, since a buried base cap can never gap where a
lifted one can; sprites lift instead, because they are flat marks on the surface
rather than solids rising off it and the globe would simply hide them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…etract

Replaces `shrink starts at` with `hold before shrinking (s)`, which is what that
control was reaching for and failing to be.

Two changes in what it means. It is counted from where the growth finishes
rather than from spawn, so re-tuning the grow-in duration no longer silently
eats into the hold — previously the two had to be re-balanced by hand every
time. And it is seconds rather than a fraction of life, measured against each
beam's own lifetime, so the pause stays put when the lifetime or its jitter
move.

A delay longer than the life leaves the beam fading away at full height instead
of retracting, which is a legitimate look rather than a state worth clamping.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The lifecycle was described by six controls in two different units, three of
which existed only to reconcile the others: growth and shrink were amounts
paired with durations expressed as a fraction of a separate lifetime that they
had to fit inside. Getting a simple bar-chart motion out of that meant solving
for one number in terms of three others, and any change to lifetime silently
rescaled both phases.

Now there are three durations in seconds and nothing else. Beams always grow to
the full length and always shrink back to nothing, so the amounts are gone; the
lifetime is gone because a beam's life IS grow + hold + shrink. Nothing can be
squeezed out by a duration it has to fit inside, and each phase can be read
straight off the panel in the units you would describe it in.

Hold now reaches 60s, so a beam can stand for a minute before retracting.

Life jitter scales all three together, keeping the phases in proportion so the
numbers stay nominal seconds. Sprites share the derived lifetime, which is what
they used the old dial for.

Also drops config.lifetimes, an unused per-category table that now reads as if
lifetimes were still a thing, and re-derives the ring-buffer sizing note from
the new 100s worst case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Cloud size now reaches 24 blocks across and block size 0.2, enough for a single
cloud to span most of a hemisphere — 72 degrees of the globe at the top of both.

Raising the limits alone would only have bought uglier clouds. A cluster was a
rigid slab on a tangent plane, and a tangent plane leaves the sphere as the
square of its half-width: past about a radius wide, the edges hang clear of the
planet and the cloud reads as a plate hovering over it. Blocks are now wrapped
onto the sphere, so measured clearance holds at exactly `altitude` right across
a cloud at any size, rather than growing toward its edges.

Corners are placed from grid position alone rather than by transforming each
block rigidly. Rigid blocks fan apart as they rise, because a fixed angle covers
more ground at a larger radius, and the gaps tore open the seams face culling
had assumed were sealed — measured 0.5% of a small puff's area but 21% of a big
one, which is a cloud full of holes. Sharing corners makes the surface watertight
by construction: measured 0% at every size, including the largest blocks. The
cost is blocks that taper very slightly with height, invisible at cloud scale.

Budget raised to 320k quads to match, and the warning now points at cloud count
and size rather than the internal knob names. Worst measured build is 200ms.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The producer sends UDP datagrams and a browser has no UDP API, so something
has to sit in between. This owns the socket, samples and rate-limits, and
re-broadcasts each datagram verbatim to every SSE client on /stream. It also
serves the built assets, so production is one process on one origin.

The payload is passed through untouched — [lat, lng, epochMillis, platform],
no identifiers, coordinates already rounded by the sender. Nothing here
inspects or enriches it.

-sample-rate thins the stream before -max-forward-rate caps it, and /stats
reports received/forwarded/dropped so the difference between the three is
visible rather than guessed at. Dockerfile builds it alongside the frontend.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
RealApiEventSource was a stub with a commented-out fetch. It now reads the Go
service's SSE stream and maps each datagram onto the TelemetryEvent contract
the renderer already consumes.

Platforms that map to no SDK family — other, native, elixir and friends — are
dropped rather than defaulted. Bucketing them as JavaScript would have put
traffic that isn't JavaScript at the top of the leaderboard. Region comes from
longitude alone, in the same three buckets the UI shows, because guessing a
country from a rounded coordinate would be confidently wrong.

Source selection gains `auto`, which is now the default in development: start
synthetic so the globe is never empty, probe /healthz, swap to the live feed if
something answers. It does not swap back when the stream drops — EventSource
reconnects on its own, and quietly resuming synthetic would redraw an outage as
healthy traffic.

Production is hard-wired to the live feed behind `import.meta.env.PROD`, so
there is no `?source=` override to fabricate numbers with, and the synthetic
generator is dropped from the bundle entirely.

Vite proxies /stream, /healthz and /stats to :7010 in dev — 7000 is where
macOS AirPlay Receiver sits.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Storms added 140–340 events/sec on top of a 95/sec baseline, so the globe
regularly ran at four times the rate the readout reported. The baseline drops
to 50, storms add 18–34, and a hard ceiling clamps the total — the number on
screen is now the number being generated.

Timestamps were built from performance.now() values, which count milliseconds
since the page loaded, not since the epoch. Every event landed in January 1970
and the stream log drew the same wall-clock time on every row.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three things the terminal overlay needs from the data layer, none of which it
should be computing itself.

Stats gains regionCounts alongside sdkCounts, both zeroed from their key lists
so a quiet region reads 0 rather than vanishing. recent(n) hands back the tail
of the rolling window for the stream log.

REGION_LNG is a single longitude per region, weighted by the same city weights
the generator spawns from, so focusing a region lands where its traffic
actually is rather than on the middle of a bounding box. Averaged as a circular
mean — APAC straddles the antimeridian, and an arithmetic mean puts it
somewhere near Africa.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`fov` is the vertical field of view, so a portrait viewport has a much narrower
horizontal one. A globe framed to fill the height spilled past both edges,
which is what made it overflow on a phone. The camera is now fitted to
whichever half-angle is smaller — one number covering both orientations.

The fit is a floor rather than a clamp: a style framed wider keeps its framing,
and only a viewport too small to hold the globe pulls the camera back. It is
held every frame instead of subscribed to, so a resize or an orientation flip
re-fits both ways rather than leaving landscape stranded small.

Zoom goes with it, along with the min/max limits. It was the only way to push
the globe past the fit, and a view you can shove off the edge of the screen is
not worth the control.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Written straight out of the style panel, so it is the whole object rather than
a diff. `merge` only descends one level, and a preset that leaned on
DEFAULT_STYLE for its nested blocks would have drifted the moment those
defaults changed — which is how it had come to carry beam and effect settings
that no longer matched what it looked like.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…yed page

Both are development tools — the panel exposes every internal knob and writes
to localStorage, and `?perf` opened the diagnostics readout on any deployment.
They are now gated on being served from localhost, and loaded through a dynamic
import that sits behind `import.meta.env.DEV`. Because that flag is substituted
at build time, the whole expression is dead code in a production build: Rollup
drops the import and never emits the chunk, so leva (~75 kB gzipped) is not
shipped even as a fetchable asset. Unreachable is a weaker promise than absent.

Previewing a production build locally still gets them, which is exactly when
you want to check the two agree.

One key opens the workbench now — `C` brings up the panel and the readout
together, since they are fiddly to line up separately; `D` is kept for the
muscle memory it used to serve. loadSavedStyle moves to its own module so the
app can read a saved style without pulling leva into the main bundle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The chrome was a handful of floating cards. It is now a terminal: every panel
is drawn from box glyphs, measured in character cells, and laid out in columns
that line up with each other the way a real TUI does. Departure Mono is bundled
and preloaded rather than fetched from Google Fonts — the layout is only
correct at a known advance width, so the fallback flash was a re-layout, not a
re-paint.

New panels: TODAY with a zoned rate gauge, ORIGIN by region, the SDK
leaderboard, and a live event stream. The gauge auto-ranges against the feed's
own recent peak, so "red" means as loud as this stream has lately been rather
than an absolute anyone could argue with. The stream is a sample, not a queue —
one row per tick, with the ratio in its header, because a queue drained at
readable speed would be minutes behind within a minute and its timestamps would
be fiction.

Hovering a region turns the globe to put it in front of you and holds the
auto-rotation while you hover, reading the camera's own angle live so it still
arrives in front of you after you have dragged the view.

The key bar is real buttons rather than a legend, so every command is reachable
by mouse and by Tab as well as by key. Sound is synthesised inline — short
oscillator blips, no files, no network. Motion cues stand down under
prefers-reduced-motion, and the right-hand column is dropped below 1100px.

Sparkline goes; the trend column draws its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Throughput against its own trailing baseline, error share per SDK family, and
regional concentration — so a line only appears when something actually moved,
rather than on a timer. Each entry links out to published writing on what
Sentry does about that condition; every URL was fetched and confirmed to
resolve, and none of them points at a fabricated issue or project.

Nothing in it identifies a customer, project, user or issue. The bulletin names
an SDK family, a region and a rate, and nothing else.

A stalled stream is read as a backgrounded tab rather than an outage — the
generator runs off requestAnimationFrame, which browsers suspend on a hidden
tab, so it would otherwise announce a 100% drop on leaving and a spike on
return. Alerts are on a per-kind cooldown so one storm is one line.

Not mounted in Chrome yet — the panel and its rules land first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A hot-pink pyramid with one big eye and a curl of tentacles, orbiting the
planet on an inclined, precessing great circle. Click it and it opens Seer.

Built face by face rather than from ConeGeometry: the eye has to sit on a known
face, and each face needs its own baked shade, neither of which a cone's shared
vertices and UVs will give. It is unlit throughout, so it holds full strength
over the planet's night side, and the shading rides in vertex colours instead.

The eye holds the camera rather than the pyramid spinning — a spin would swing
the one detail that identifies the thing out of view half the time. It also
leans back as it passes near your line of sight: the eye face slopes only ~27°
off the tangent plane, so from overhead you would be looking at its edge. The
lean eases in from the angle where the face starts turning away, so at the limb
it still stands upright and the silhouette does the work.

Body and limbs are opaque on purpose. As transparents they sorted against the
eye by origin distance, and from overhead the eye's origin falls behind the
body's — so the pyramid painted over its own eye, and the eye's depthWrite:
false left nothing to stop it.

It orbits inside the spinning globe group, so the planet carries it: outside,
it hung still while the world turned beneath it, which read as the pyramid
following the camera.

One invisible sphere catches the pointer. As separate targets, a ray through
the pyramid hit several meshes at once and the nearest one's stopPropagation
cancelled the rest, whose onPointerOut bubbled back to the same group and
cleared the cursor it had just set — the cursor flickered between pointer and
arrow. One front-facing target means one hit and nothing to cancel, and it is
sized off the geometry's own bounds so it keeps up if the limbs change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two things were pure waste, both invisible on a fast laptop and both expensive
on anything else.

Every beam buffer was re-sent whole on any frame an event arrived, which at 50
events/sec is most of them. Measured with bufferSubData instrumented: 43.8 MB/s
of traffic for about 47 bytes of actual change. It now uploads only the slots
written, via update ranges — 2.8 KB/s, and the output is pixel-identical, 0
differing pixels out of 6.4 million.

All 65,536 instances were drawn for the ~150 alive at any moment. Dead beams
collapse to zero width in the vertex shader, but the shader still ran for 1.5M
vertices a frame, three times over when the mask is on. The ring now sizes
itself to how many events actually arrived within one beam lifetime: ~275
instances, and it grows within a frame of a burst so nothing is cut short.

Smaller cuts, all measured: the world map is painted 2x faster and byte for byte
the same (its bilinear sample recomputed per pixel what was constant per row);
the globe sphere was 140x140 when a UV sphere wants half as many rows as
columns, so 39k triangles became 19k; anisotropy was 16 with mipmaps disabled,
which on this GPU changed exactly nothing, at 16 taps a fragment.

Light config, 50 events/sec, dpr 2: 0.48 -> 0.25 ms/frame.

The rest is device scaling, which did not exist: every machine got dpr 2, a
2048px map, 16x anisotropy and full-resolution mask buffers. Three tiers now
scale only fill rate and startup cost — no effect is dropped and no geometry
disappears. Hardware reporting is thin and often wrong, so a measured governor
backs it up: two consecutive slow seconds drop resolution a step, up to three,
downgrade-only so it cannot oscillate. With the full post-FX stack a low tier
runs 2.25 ms against 4.67, and nothing changes on a capable machine.

Considered and rejected: dropping MSAA under the composer, where the final blit
is a screen quad and multisampling it does nothing. Measured 5.03 ms without
against 4.67 with — no benefit, so it stayed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
itsdangold and others added 8 commits August 21, 2026 00:06
The tube scans open, the mark draws itself a row at a time with the wordmark
landing under it, the header band fades in, and a POST log types out. It holds
on READY. for two seconds before dissolving into the scene — a machine that
finishes booting and vanishes in the same frame reads as a cut rather than as a
handover.

The wordmark is mixed case, drawn on the same grid as the mark: eighteen pixel
rows with a cap line, an x-height a third of the way down, and two rows of
descender for the y, whose tail hooks left rather than dropping straight — a
bare vertical stops dead and reads as a clipped descender rather than a tail.

Everything on the screen is 76 character cells wide, and that is the whole
layout: the mark is 38 columns at twice the cell, which is the same 76; so is
the wordmark, the band, and every line of the log. Nothing is centred by eye.
POST lines size their own dot leaders so every bracket lands in one column.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The overlay used one accent for every highlight, which meant the colour said
"selected" and nothing else. It now says which SDK family, everywhere at once:
a dot beside each row in the family's colour, its trend sparkline in the same,
and a selected row filling with that colour rather than the house orange. The
event stream carries the same dot, so a row and the beam it lit on the globe
are one colour. All of it reads `sdkColorHex` — the renderer's own palette, not
a copy, so nothing drifts.

One ink colour serves all ten fills: the tightest contrast is Ruby's red at
4.73:1, clearing AA, up to 14:1 on JavaScript's yellow. Worth rechecking if a
family is ever recoloured darker.

The dots are drawn, not typed. Departure Mono has no round glyph, and a
fallback would arrive from another face at another advance width, which is the
one thing a column of fixed-width text cannot absorb — so each is an
inline-block of exactly one cell.

Cards: #000136 at 70% behind a #4891ff border at 30%, 12px radius, 16/12
padding. The horizontal half of that padding sits on the card's children
rather than the card, because the declared width *is* the character grid and
padding it sideways would push every panel 32px wider than the column it was
sized for.

Two alignment bugs went with it. The stream's header carried a two-space indent
its rows did not, so every column label sat two characters right of its data
and the timestamps hung off the left edge. And the rate bar's left end cap was
`▐`, a right-half block — it painted ink in the second half of its cell, so the
bar appeared to start a cell and a half in from the label above it. Both caps
are gone and the bar takes the two cells back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured across eight viewports rather than eyeballed, and two things were
actually broken.

The command row's insets were the two columns' own widths, so on a phone the
left inset alone exceeded the viewport: at 430px it computed to zero width,
positioned at x=432 on a 430px screen. It floats in the gap between the bottom
cards only while the gap can hold it — the row measures 267px with all three
commands and the gap is `vw - 843`, which crosses over around 1130px. Below
that it returns to the column's flow and takes a line of its own. The old 1100
threshold was itself ~10px short, so the row was already clipped between 1100
and 1130 in local builds, where `C CONFIG` is the extra one.

Cards were sliced mid-character on a phone — every row lost 6px off its right
edge. The grid cannot reflow, so it got room instead: the display's side inset
drops to 6px at phone widths, which fits 44 cells down to ~420px, and below
that the cell itself steps to 12px and then 11px. Every width in the layout is
measured in `ch`, so the whole grid follows. That contradicts the 14px floor
noted in the palette, and the comment says why: 14px is a desktop reading
distance.

The stream's cut-off moves 1100 -> 1000. Its own comment framed that threshold
as "before anything gets clipped", and the columns actually fit down to ~845px,
so it was firing 250px early and taking the event stream off a 1024-wide laptop
for no reason.

Verified at 1440x900, 1440x600, 1280x800, 1280x720, 1024x900, 620x760, 430x932,
390x844 and 360x640: nothing clipped, nothing overlapping, no sideways scroll,
and the commands legible everywhere.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two commands and what happens between them. The frontend runs on its own with
synthetic data; the backend is only needed for the real feed, and once it is up
the page finds it by itself.

Everything in here was run before it was written: both npm scripts, all three
proxied endpoints, and the auto source actually switching over. Two claims did
not survive that and are corrected rather than repeated — the Docker run
publishes only its HTTP port, so its UDP socket is sealed inside the container
and cannot take real datagrams without `-p 5556:5556/udp`; and the payload's
coordinates arrive at four decimal places, not the two the live adapter's own
comment claims.

Also records that the container build is broken: the Dockerfile expects the
frontend under `frontend/` with its output at `/static`, but the frontend is at
the repo root and Vite emits `dist/`, and the Go service serves `static/`, which
nothing produces. Better stated than discovered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
208 lines to 91. Gone: the architecture diagram, the wire format, the source
directory tour, and the reasoning behind every choice — none of it is what you
open a README for.

What is left is the commands, the flags, the query strings and the keys, plus
the two notes that stop you wasting time: the Docker script publishes no UDP
port, and the container build is broken.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The branch replaced the prototype frontend but not the machinery that
deploys it, so master's pipeline would have built nothing it could serve:

- The Dockerfile built `frontend/` with bun. It builds the root project
  with npm now, and the Go stage copies only go.mod/go.sum/main.go so a
  frontend edit does not invalidate the Go layer.
- `vite build` wrote `dist/`; main.go serves `static/`. The build output
  is `static/` now, which is the quieter half of this: a green build
  would otherwise have produced an image that served an empty directory.
- `.github/` and `gocd/` come back unchanged. GoCD waits on the check by
  name — "Build and smoke test" — so the workflow keeps its job name.
- The smoke test grepped `/` for "Sentry Live", a string from the
  prototype. It now checks the title and follows the hashed bundle the
  page names, fetching it to prove the build really is in the image.

Verified against a --no-cache build of the image CI builds: healthz "ok",
/stats carrying udp_received, index naming a bundle that serves 200, and
the app running from the container on the live SSE feed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The boot log read `config.eventSource` to name its source, which is
"auto" in a deployed build — so the band announced SYNTHETIC over a page
that the factory had hard-wired to the live stream. It is the one thing
this display must not do: claim something the app contradicts.

Production says LIVE-API. In development `auto` is named as itself
rather than guessed at, since it starts synthetic and may switch a
second later and neither label would stay true.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Master's two commits touch `frontend/`, the prototype this branch
replaces, so both arrive as modify/delete. Resolved by taking the
deletion: the fix they carry — display labels for platform slugs in the
prototype's feed list, `csharp` to "C#" and so on — has no counterpart
here, where platforms are mapped to SDK families and shown by family.

Resolving it on the branch rather than in the merge button means the
pull request goes in clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread src/render/Beams.tsx
Comment on lines +602 to +604
const blend = b.additive ? THREE.AdditiveBlending : THREE.NormalBlending;
state.ribbonMat.blending = blend;
state.spriteMat.blending = blend;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The additive blending setting is not applied to quadMat, which is used for "line" style beams, because the update logic is missing.
Severity: MEDIUM

Suggested Fix

The blending mode for quadMat should be updated along with the other materials. Add the line state.quadMat.blending = blend; within the update block to ensure the "line" style beams correctly reflect the additive blending setting.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/render/Beams.tsx#L602-L604

Potential issue: When the `additive` blending property is toggled, the code updates the
blending mode for `state.ribbonMat` (used for "bar" style beams) and `state.spriteMat`.
However, it omits updating `state.quadMat`, which is used for "line" style beams. Since
the default beam style is "line", toggling additive blending will have no visual effect
on the beams, as `quadMat` will retain its default `THREE.NormalBlending` mode. This
makes the additive blending feature non-functional for the default beam style.

Did we get this right? 👍 / 👎 to inform future reviews.

`quadMat` draws the `line` beams and was the one material the blending
switch never reached, so turning additive on did nothing to the default
style — the toggle only moved `bar` and the sprites.

Easy one to miss: quadMat borrows ribbonMat's uniforms object wholesale,
so every uniform written for the bars reaches it for free. Blending is a
property of the material rather than a uniform, and does not come along.

Found in review. Confirmed by running the app with beams.additive on:
the line beams drew flat over the globe before and add onto it after.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@itsdangold
itsdangold merged commit f837402 into master Aug 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants