Polarize
GitHub Get in touch

Changelog

What changed in the code.

Merged pull requests across the public polarizetech repositories, newest first, synced from GitHub once a day. Every repository, with the posts about it, is under Work.

2026-11-25 polarize-ui #19

feat: spatial (VR) components and storybook section

Adds a Spatial (VR) section to the storybook, plus the components behind it (src/spatial/Spatial.tsx, exported from the package).

  • SpatialSpace: panes on an arc around you. Swipe (drag), the dock, or ←/→ bring the next pane in from the side; the dock and Spaces menu trail the head (the pointer stands in for head tracking).
  • SpatialPane, Lift: pane chrome with its tier badge; components lift toward the eye on gaze and press in on pinch.
  • Orbit, OrbitGraph, OrbitBars: graphs as objects. Any flat chart becomes a slab with a labelled reverse side; categories become 3-D boxes. Flip / Turn / Roll / Pull out / Reset, or drag to orbit, even for 1-D and 2-D data.

Stories: the space, a line graph, bars, a 1-D value as a rod, components in depth. All story data is synthetic.

Standard techniques only (CSS 3-D transforms, a pane carousel, rotatable charts); no findings or recordings. Additive (patch): new exports only. Depth, lag and spacing values are TASTE.

Checks: dev_check.py 475/475, build_css.py --check, build_shadcn.py --check, tsc, storybook build. Tried in a desktop browser (swipe, dock, Flip); not yet on a headset.

Companion: polarize-holo’s spatial extension (the same UI in three.js for the Cardboard viewer).

🤖 Generated with Claude Code

2026-11-25 retrieval-augmented-generation #75

Add an example of what the research tool sends back

What

docs/example-rag-response.md: one example question taken through every call a client model makes (ask on the research route, pipeline__research_continue while running and when done, and ask on the quick route), in the JSON layout the code builds, with placeholder data. It ends with Where the length comes from, a short analysis of why replies are long (the same passages three times, a relay that reports process rather than findings, fixed boilerplate, bookkeeping fields).

Personal paths and real account balances from the original draft are replaced with placeholders (<agents-dir>, ~/.local/share/..., $XX.XX).

Note

The example shows the relay / relay_full reply format from when it was written (early November 2026). ask now returns a compact brief with answer_format, so the Call 1 / 1b shapes are partly out of date; the length analysis is what motivated that change. Docs only.

🤖 Generated with Claude Code

2026-11-25 retrieval-augmented-generation #74

Document sandboxing agents with OpenShell, telemetry off

What

  • docs/openshell.md: what OpenShell is, a by-hand macOS install with no Homebrew (v0.1.8 release assets, checksums, VM-driver entitlement, mTLS certs, LaunchAgent), how a sandbox reaches the research tool (host.openshell.internal:8891), and caveats.
  • Hard requirement: telemetry off from the first gateway start. Set by OPENSHELL_TELEMETRY_ENABLED=false plus a dead local OPENSHELL_TELEMETRY_ENDPOINT.
  • scripts/openshell-telemetry-check.sh: fails unless the env file has both settings, every running openshell-gateway has the switch in its environment, and no OpenShell process is connected to NVIDIA’s telemetry host.
  • README: a short pointer to both.

Docs and a shell check only; no code paths change. The script passes sh -n; it has not been run against a live gateway in this PR.

🤖 Generated with Claude Code

2026-11-25 retrieval-augmented-generation #73

Route research only when asked; choose providers per request

Scope: scope/smart-routing-providers.md (Tier: explore). Depends on polarizetech/paper-fetch#17 (deploy it first) for embed / rerank = modal, mac or droplet; the rest works without it.

Changes

  • F1 research only when asked. config/routing.default.toml research triggers are now evidence-asking phrases (“is it true”, “what does the evidence say”, “systematic review”, …); bare nouns such as “paper”, “study”, “cite”, “evidence”, “mechanism” route to a quick retrieval. Server instructions no longer tell assistants to start runs on their own.
  • F2 explore tier. Claims are still checked; the bottom line and specialist views skip the verifier, are kept, and are labelled “Explore tier: not checked against the claims.”
  • F3 per-step providers. ask and research_start take providers = {planning|extraction|writing|verify: <[providers.*] name> | client}. A pinned step uses that provider alone, no fallback. client for the ladder steps must cover all three; verify=client hands only the claim checks to the caller.
  • F4 retrieval routing. providers.embed = modal mac and providers.rerank = modal mac droplet off, passed through to paper-fetch; deploy/models_router.py honours X-Models-Route (only the named upstream, 503 if it fails, 400 if unknown).
  • F5 rerank = llm. New research_mcp/llm_rerank.py: one chat call scores up to 12 passages 0–10.

Review notes

  • llm_rerank.OFFSET = 5 maps the 0–10 mark onto the cross-encoder’s logit scale so the existing relevance floor (-3) and coverage levels apply. This calibration is exploratory, not from a paper.
  • When a pinned retrieval route fails, the library breaker is not counted, but the existing no-reranker / no-embeddings fallback can still run (labelled degraded), unlike the router’s strict 503 for a pin.

Tests

584 passed locally.

🤖 Generated with Claude Code

2026-11-25 paper-fetch #17

Choose where a retrieve call reranks and embeds

What

retrieve takes two optional per-call arguments:

  • rerank_route: modal mac droplet
  • embed_route: modal mac (no in-process embedding model, so no droplet)

modal / mac send an X-Models-Route header to the models router; droplet runs an in-process ONNX cross-encoder set by PAPER_FETCH_RERANK_LOCAL_MODEL (refused when unset). New PAPER_FETCH_RERANK_DEFAULT=off keeps the reranker for calls that ask for it and skips it otherwise.

Why

research-rag’s ask gets a per-request providers map (embed / rerank choices). That PR (polarizetech/retrieval-augmented-generation, branch claude/smart-routing-providers) needs this one deployed first; the router side (X-Models-Route) lives in that repo’s deploy/models_router.py.

Tests

tests/test_passages.py covers the route header. Full suite locally: 386 passed, 4 failed in test_http, test_library::test_verify_detects_tampering, test_scite and test_store with PytestUnraisableException errors; test_store.py fails on its own too, so these look environmental, but they are not yet confirmed pre-existing.

🤖 Generated with Claude Code

2026-11-25 polarize-ui #18

fix: knobs and faders follow a drag outside the control

Dragging a knob (or fader) and moving the mouse outside it broke the drag, and releasing outside could leave the control following the mouse.

Now initControl tracks a press on the whole page: pointermove/pointerup/pointercancel on window, added on press and removed on release (and in destroy), replacing the element-level listeners. While the button is held the value follows the pointer anywhere; releasing anywhere sets it and ends the drag. A mouse move with no button held ends the drag at its value; other pointers are ignored mid-drag.

Not breaking: no export, class, attribute or option changed. Checks: dev_check.py 475/475, tsc -p . clean.

Owner, 2026-11-25: “if you click on the knob and you hold and drag outside of the knob, you can still adjust … when you let go, it just sets to wherever it was pointing”.

🤖 Generated with Claude Code

2026-11-25 polarize-ui #17

feat: an on/off toggle in the controls layer

Adds .ui-toggle: a real <button> with its state in aria-pressed, drawn as a track and thumb from existing tokens (on in --ctl-signal), keyboard and screen-reader support from the button itself.

  • controls.js: initToggle(btn, { onChange }) flips it on a click and fires a bubbling change; init() wires [data-ui-toggle].
  • controls.d.ts: ToggleHandle, initToggle; init’s return type includes it.
  • React: Toggle (src/components/controls.tsx). Story: General UI / Controls / Toggle.
  • Docs: INTEGRATION.md § 6 row, README controls row.

Not breaking: additive only. Checks: dev_check.py 475/475, tsc -p . clean, api_surface.py --removed v0.8.3 nothing removed.

First user: polarize-thesis apps/noise-playground (Spikes and Mixer on/off). Owner, 2026-11-25: “add a nice toggle feature, component to the polarize-ui repo”.

🤖 Generated with Claude Code

2026-11-25 polarize-ui #16

feat: speaker-high and speaker-slash icons

Adds Phosphor duotone speaker-high and speaker-slash (from @phosphor-icons/core 2.1.1, MIT, like the rest of the sprite) to icons/polarize-icons.svg, and lists them in tokens.json icons.used (17 icons). For polarize-holo: an audio enable / mute toggle on .ui-playknob.

dev_check.py: 475/475 passed.

🤖 Generated with Claude Code

2026-11-25 polarize-ui #15

Play knob, mixer faders instead of sliders, geometric story fix

What changed

  • PlayKnob (new, exported): a round play/pause toggle the same size as Knob (sm/md/lg), with a thin outer ring, so they sit side by side. Story added under Controls.
  • No more sliders in the stories: Card with controls uses a Knob + PlayKnob; Mechanisms, Space and Trajectory playback use horizontal mixer Faders. ui/Slider is still exported, marked @deprecated.
  • Geometric stories fixed: Geometric overlays and Trajectory playback crashed (appendChild of null) because the host element was null when the 3-D view mounted; they now wait for it via callback refs.
  • Keyboard: a thin border separates the black keys.

Why

Geometric components were not rendering in Storybook; the play control and slider changes were requested for the controls set.

For reviewers

  • Additive only (new export and CSS class); nothing removed or renamed, so a patch release.
  • Demo values are synthetic (Rate/Depth knob ranges, readout formats in Space were chosen by the executor; presentation only).
  • Checked: tsc, dev_check.py (475/475), Storybook build, and the stories in the browser.

🤖 Generated with Claude Code

2026-11-25 polarize-ui #11

fix(deps): update @storybook/addon-mcp to 10.6.7 (CVE-2026-114126)

@storybook/addon-mcp is pinned at 10.6.0 at node_modules/@storybook/addon-mcp by the committed package-lock.json (the root manifest declares ^10.6.0 under devDependencies), inside the affected range of CVE-2026-114126 / GHSA-px85-f4q5-jh77.

The advisory names 10.6.2 as the first patched version; its fix points span several lines, so this build takes line 10’s fix deliberately. line 10’s fix 10.6.2 is the target: the lock resolves 10.6.0 below it; line 11’s fix 11.0.0-alpha.6 applies to no resolved copy (the lock resolves none in that line), so taking it would force a cross-line jump without clearing anything. The fix commit is 5f00d7d0a78e in storybookjs/storybook (rung tag-ref, confidence release-tag). The root declared range ^10.6.0 admits 10.6.2 (computed), so this is a lockfile-only update: package.json is not touched, and package-lock.json moves @storybook/addon-mcp from 10.6.0 to 10.6.7.

What changes

  • @storybook/addon-mcp: 10.6.0 -> 10.6.7 at every lockfile path (1).
  • No manifest is touched, and no source file is changed.

Verification

  • npm ci --dry-run on the patched lockfile with the unchanged manifest: pass (see the verification record).
  • Every lockfile path resolving @storybook/addon-mcp is at or above the advisory’s first patched version 10.6.2 (node_modules/@storybook/addon-mcp at 10.6.7 is the built worst copy).
  • package.json is byte-identical to the base commit (sha256 ebf451b940254bd1…).
  • Applied to a fresh clone of polarizetech/polarize-ui at 935f751d4751fbc5a9bdf32c5c22563538819863, the change touches only package-lock.json.
  • Dependency churn: 17 lines outside @storybook/addon-mcp across 2 lockfile entries: the dependency entries npm ci requires to move with it. No source file is changed.
  • Lockfile shape: the entries that resolve the package and the 2 dependency entries npm ci requires to move with it are rewritten, and the npm ci –dry-run gate passed on that file; every other byte is the base commit’s. npm: host npm 10.9.9 writes lockfileVersion 3, the repo’s own.

Scope

@storybook/addon-mcp is declared under devDependencies, and the affected range and the pinned version come from the security advisory. This is a dependency update, not a code change.