Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
08bf515997 Merge pull request 'Release candidate: dev into main' (#88) from dev into main 2026-11-11 02:13:08 +00:00
f8115609b2 Register entry: https only, http only for a local host (#87)
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 3m45s
Build pull request / Build pull request (pull_request) Successful in 3m29s
2026-11-11 01:31:35 +00:00
450a7e91ff auth: Register entry beside Sign in, behind a config switch (off) (#68)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-11 01:30:40 +00:00
94c976632e Default homeserver is gamecult.org (#86)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-11 01:30:16 +00:00
b6da92a081 Albums slice 1: read-only album view for the file zone (#70)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-11 00:25:37 +00:00
7045532187 Poses nest into the chat bubble corner (desktop and phone) (#72)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 23:26:53 +00:00
ac7a958f5c Enforce the one join path in lint; a drive that asserts nothing fails (#64)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 23:16:59 +00:00
3def499b0f desk: served row order, one open count (#84)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 21:13:24 +00:00
8e0e3b8986 desk: read the gamecult.fork.* contract as served (#83)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 21:08:12 +00:00
c286c4adc4 Bound the reply preview on phone width (#82)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 20:33:49 +00:00
1fe3e2c92f Merge pull request 'scene: ridge heightfields, slope shading, endless world-x drift' (#81) from nibu/ridge-heightfield into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 19:05:27 +00:00
Nibu
d172c4eda3 scene: ridge chunk jobs own their scratch canvas; tests for the endless drift and the ridged core
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 4m6s
Soul pass fixes. The shared scratch canvas was resized when a job was created
but read in a deferred task, so chunks of layers with a different blur pad got
a faded right edge. Each job now makes its own scratch when it first runs and
drops it when done. A chunk is baked, put and scatter-filled in column bands,
the blur is one draw; allocation is a task of its own. rotate no longer needs a
forward reference (startDrift takes the finish callback).

Tests: the fake animation can finish, so the rotation is tested at scene level
(world columns per chunk, slot repositioning, restart, recycled chunk id, one
chunk of drift distance, per-job scratch width at the moment of each blur).
The ridged core has direct tests for the fold, the warp, the previous-octave
weighting, the lacunarity and contrast by distance. README sun statement
matches sunDirection.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:56:52 +00:00
Nibu
9391e4753f scene: ridge heightfields with slope shading and endless world-x drift
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Each ridge layer is a function of world-x (ridged multifractal value noise,
domain-warped, one function and a parameter row per layer) instead of a
periodic strip. World-x is baked in 1.2-viewport chunks on demand: the first
view bakes one chunk per layer, the rest are baked in ~6 ms tasks, and the
compositor slides a track that is recycled each chunk. A slow yaw/pitch sway
rides on top. ridgeBake.ts shades each column from the crest slope against
the sun with a lit rim, a light-to-haze face gradient and erosion streaks,
reusing the existing aerial perspective as the depth treatment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:31:56 +00:00
313d070dd4 Merge pull request 'desk: read-only Mind desk, slice 1' (#77) from void/desk-slice-1 into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 18:29:38 +00:00
51d5fb0909 Merge pull request 'Phone: notice contrast, 44px tap hit areas, skip empty OIDC validation' (#78) from void/phone-contrast-taps into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 18:29:16 +00:00
Void
0f82576d9f desk: booth portrait is a plain image; options_hash recomputed against the CultLib vectors
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 4m9s
PoseAvatar renders a span, not a button, when it has no onClick. The desk recomputes each card's options_hash (RFC 8785 after NFC, SHA-256; 15 CultLib vectors) and withdraws a card that differs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:26:03 +00:00
Void
8dea8717ea desk: read-only Mind desk slice 1 (typed projections, buildDesk, deskMood, DeskView, navigator entry, demo forks)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:26:03 +00:00
Void
0351f1f6e8 Skip auth-metadata validation when the homeserver returned none
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m30s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:26:01 +00:00
Void
de6f1849ea Phone: 44 px hit areas for sender names, room topic and sign-in links, no layout shift
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:26:01 +00:00
Void
06d530d061 Phone: light ink for the training notice over the dark ridge (day, dusk)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:26:01 +00:00
84770a2d2c Merge pull request 'preview demo: drop a stored login for another server before the app reads it' (#80) from void/demo-homeserver-unreachable into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 18:24:00 +00:00
Void
5bb78b21cf preview demo: drop a stored login for a real homeserver before the app reads it
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m53s
Every preview shares the origin minds.gamecult.org and so one localStorage. A login another
preview left (cinny_hs_base_url of a real homeserver) made the demo connect to that server, which
the guard refuses, so SpecVersions showed 'Unable to connect to the homeserver'. installDemo now
drops any stored session whose base is not the demo origin, and the service worker is registered
after that so it is never handed the dropped session. Replaces the foreign-session banner text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:22:43 +00:00
7bac860016 Merge pull request 'preview: build-dev-preview.sh, the dev demo build recipe (publishing is the shared script's)' (#79) from void/publish-dev-preview into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 18:19:09 +00:00
Void
d16842a70e preview: drop the Ratatoskr publisher; keep only the build recipe the shared publisher takes (build-dev-preview.sh)
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 5m0s
Publishing belongs to gamecult-ops scripts/publish-mind-preview.sh (one fixed slug per project).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:19:04 +00:00
Void
08b23e0cc4 preview: scripts/publish-dev-preview.sh, the one way the dev demo is published (in place at /void/rat-dev/, one rollback)
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:16:10 +00:00
61e7539f01 Merge pull request 'docs: Mind feedback pages (the desk) design record' (#24) from void/mind-feedback-pages-spec into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 18:04:30 +00:00
Void
9440921181 docs: desk section points to Heimdall's rule file (answer rule) and CultLib #72 (wire) instead of restating them
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m42s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:04:29 +00:00
Void
73754a0912 docs: desk section: retraction rule agreed in #swarm
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:03:25 +00:00
Void
3e173d2fed docs: feedback pages are the desk: Fork Desk keeps, field names, pick and note rules
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:03:25 +00:00
Void
84b2a93b8e docs: feedback pages: no content hash, route 2 credential, receiver store and names
Erase keeps record id, kind and time only; an unsalted hash confirms a
guessed text. Credential is the OIDC access token Bifrost issues to chat,
claims check open. Receiver store is a CultCache file with backup purge
owed before deploy. Receiver must not reuse CurrentBifrostActor.DisplayName;
no guest exists until Bifrost PR #9.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:03:25 +00:00
Void
20acd3d384 docs: align feedback pages spec with the Huginn feedback kinds proposal
The proposal owns the schema: feedback_listing, feedback_answer (text-free),
feedback_close_request, feedback_hide. Bifrost holds answer text and does
the erase; delivery is by mouth and the Persona admits the record.
Question key, option labels and askedAt follow the proposal. Client plan
kept: typed interface mirroring those shapes, fixtures first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:03:25 +00:00
Void
5def1bdfb8 docs: Mind feedback pages spec (placement, close, hiding, receiver)
Folds Kiko's spec with Heimdall's draft rulings on guests, erase and
hiding. Design only; no code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:03:25 +00:00
66c4c6373b Merge pull request 'scene: skyLabelInk moves out of sceneShell.css.ts (dev did not build)' (#76) from void/scene-css-function-export into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 18:02:26 +00:00
Void
14ea0dbab0 scene: skyLabelInk leaves sceneShell.css.ts (vanilla-extract refuses a function export; vite build failed on dev)
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 4m4s
#74 exported a function from a .css.ts file. vitest's plugin tolerates it, vite build's compile does not
("Invalid exports"), so dev did not build. The helper and its custom-property name move to skyLabelInk.ts;
a test compiles the three .css.ts files that use it the build's way and fails on the old arrangement.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:00:41 +00:00
0fe9ab2eee Merge pull request 'dings: Aqua's v4 set (Void single onset, Nibu proposal 3 everywhere), behind dings.enabled' (#75) from void/dings-v4 into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 17:59:58 +00:00
Void
de9955a24a dings: Aqua's v4 set (Void single onset, Nibu proposal 3 everywhere), still behind dings.enabled
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 2m8s
Replaces the 32 sender clips with AquaSynth 21e83ec's staged render; manifest and neutral
fallback are byte-identical to the old ones. The manifest test now pins every clip by sha256
prefix. Unheard.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:59:07 +00:00
1499e9a810 Merge pull request 'scene: per-sky-state ink for names and phone-dusk labels; New Messages as plain label' (#74) from void/scene-ink into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 17:58:23 +00:00
Void
aa0dfc0ee9 scene: one owner of ink per sky state (names, phone-dusk labels), New Messages as plain label ink
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 2m37s
Sender names over the terrain step to the state's ink: same OKLCH hue and chroma, darker by day and dusk, lighter at night, until 4.5:1 on the lightest measured terrain patch (capped at OKLCH L 0.9 at night). Sidebar labels get a darker dusk ink on phones. An explicit theme still wins. The unread divider keeps only its green line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:43:18 +00:00
683d3b92f8 Merge pull request 'Release candidate: dev 64edacac to main' (#71) from release/dev-64edacac into main 2026-11-10 17:42:15 +00:00
bf8b889a0e Merge pull request 'auth: newcomer-facing sign-in, server and sign-up messages' (#73) from void/newcomer-signin-errors into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 17:32:14 +00:00
Libby
f1287a6f3a auth: newcomer-facing sign-in, server and sign-up messages that say what to do next
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 2m25s
Replaces Cinny's stock wording (Invalid Username or Password., Failed to find
homeserver., Failed to connect..., the dead-end registration-disabled text) with
plain messages in one module, authMessages.ts, used by the login form, the auth
layout, the login page and the register page.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:31:55 +00:00
3203a32b73 Merge pull request 'Dings v3 behind client config switch dings.enabled (off by default)' (#69) from void/dings-v3 into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 17:25:44 +00:00
Void
1dea4b51e5 dings: Nibu carries proposal 3 (8 kHz 5-bit smoothed sine) for every event
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m6s
Meta heard v3 and chose proposal 3; Nibu confirmed it as her voice for all events.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:25:27 +00:00
64edacac4d Merge pull request 'scene: Dusk floor at the link bound with Day's pale-blue lift (held for Meta's preview)' (#56) from nibu/dusk-sky-floor into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
Build pull request / Build pull request (pull_request) Successful in 4m29s
Docker check / docker-build (pull_request) Failing after 17s
NPM Lockfile Changes / lockfile_changes (pull_request) Failing after 1s
2026-11-10 17:03:35 +00:00
Void
9877154033 dings: port the hook from #36 onto dev, wire Aqua's v3 set behind dings.enabled (default off)
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 4m50s
Hook code is #36 (b3eb9d01) verbatim plus the switch. Clips and manifest are AquaSynth PR #22 out/, Nibu on proposal 1. Nobody has heard v3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:03:17 +00:00
dce50eeaf6 Merge pull request 'Room list: unjoined project-room groups collapse behind one Browse entry' (#67) from void/browse-collapse into dev
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 3m42s
2026-11-10 14:47:42 +00:00
Void
3c868254e5 Category buttons expose aria-expanded
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m17s
RoomNavCategoryButton set open/closed only through its chevron. It now sets
aria-expanded from `closed` (absent when the section does not toggle); tested by
rendering to static markup.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 14:47:41 +00:00
Void
3c92696507 Room list: groups of unjoined project rooms wait behind one Browse entry
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m37s
A steward group with no joined or invited room collapses into "Browse N more rooms"
per tier, closed on every screen and remembered per device; a group the user is in
anything of, loose estate rooms, and joined rooms stay up front. splitGroups is the
pure rule, tested.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 14:15:47 +00:00
Void
9641cfb4f4 Merge nemesis/demo 9b9b495d (live) into dev
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 3m49s
2026-11-10 14:11:11 +00:00
Eureka Self
9b9b495def nemesis: drop the pose status strip; the portraits already show each Mind's mood (Meta: redundant, wastes vertical space)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:09:58 +00:00
854b151d80 Merge pull request 'scene: terrain fine grain domain-warped so it stops reading as hatching' (#66) from nibu/terrain-hatching into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 14:09:23 +00:00
23bc67a1f0 Merge pull request 'nemesis/demo: Meta's no-chrome look, theme auto, denser terrain, Background menu, with tests and the Ridge zero-size fix' (#65) from void/nemesis-demo-tests into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 14:09:01 +00:00
Void
48d6d171da Sky-only tier label follows the overlay gate; tests pin the door's debug forwarding
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m42s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 14:09:00 +00:00
Void
814fa4b3ab Diagnostic overlays (?probe=1, ?tierlabel=1) only where allowed; footer band test knows the Safari prefix
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
debugOverlaysAllowed: a dev build, a VITE_PREVIEW_DEMO build, or
backgroundScene.debugOverlays in the client config. A production visitor adding the
query string gets neither the frame readout nor the tier label. footerBand.test pins
-webkit-backdrop-filter (live commit 0fe41efb) and that it blurs as the standard one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 14:05:42 +00:00
Eureka Self
d2d6fbcc00 nemesis: lookbehind regexes degrade where the engine lacks lookbehind (Safari < 16.4 blanked at load); markdown rules share regex.ts patterns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:04:34 +00:00
Void
556254f46b Merge nemesis/demo 0fe41efb into PR #65 2026-11-10 14:04:17 +00:00
Void
c657d68615 PR #65 steward ruling: user themes win over auto; focus ring; logo on light themes
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
skyThemeId('auto') is undefined again as on dev. sceneThemeId follows the resolved
sky for auto only while a scene is on and the person chose no theme (signed-out
pages pass none); useResolvedSkyState changes as the clock crosses so theme
classes re-render. Scene buttons and chips keep a focus-visible outline. The
white mark takes the dark filter through a LogoMark class on every themed <img>
under any prism-light theme (favicon and notification icons are files and keep
the white mark). Background picker is hidden without a backgroundScene config.
Ridge comment states what hasNoArea covers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 14:03:21 +00:00
Nibu
384cd17dac scene: terrain fine grain domain-warped so its plane waves stop reading as hatching
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m30s
The fine albedo octave is three plane waves per projection (about 5 m periods): a regular lattice, resolved
(not aliased) at near-ground pixel size, so it reads as diagonal hatching. Switching the octave off in a SwiftShader
render removes it; coarse grain off does not. The octave's coordinates are now pushed by a slower sine each, in
terrainAlbedo.wavesWarped and the shader's warpq.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 14:00:44 +00:00
Void
9d3343bb31 nemesis/demo: tests follow the new numbers; Ridge retries a zero-size start
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 4m12s
skyTheme: auto resolves to the clock's theme; the plate pins now assert the
chromeless shell (only composer, call bar, call view and plain messages are
plates). terrainWorld: ceilings for the 512/768 grids; still grid 256 -> 320 so
its quads stay within two height texels at the nearest ground (the test is
unchanged). skyPlate.css: drop the void-import placeholders. Ridge: a scene
started with no area no longer throws on drawImage or returns null; it builds on
the first resize that gives it one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 13:53:22 +00:00
Eureka Self
0fe41efb9b nemesis: Persona poses on by default; Safari 14 polyfills (Array.at/findLast, Object.hasOwn, structuredClone) and -webkit-backdrop-filter
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:51:26 +00:00
Eureka Self
c4689299ca nemesis: tab icon and notification icon are the night-sky tile (unread and highlight add a dot), not the white UI mark
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:46:51 +00:00
Eureka Self
fcabaee59e nemesis: chromeless buttons, chips and room list; plates only on the composer and plain messages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:22:41 +00:00
Eureka Self
5712068902 nemesis: Meta's logo, chromeless plates and card, sky-led theme, denser terrain, scene style picker
- Logo: Meta's white matte (2026-11-09) as the UI mark; icons are the mark on a night-sky tile. Dark ink on Noonday Sky.
- Plates (title bars, lists, composer) and the sign-in card: blur with a light sky tint (PLATE_TINT 0.45), never opaque.
- auto sky picks the theme from the resolved sky: day light mode, night dark mode, dusk the dark-ink crossover.
- Terrain grid 768/2048 full, 512/1024 low, 256/1024 still.
- Temporary Background group (Terrain, Ridges) in the sky menu, also on the sign-in card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:18:59 +00:00
f320016ddc Merge pull request 'auth: footerBand test pins blur to 12px and the footer rule's exact property set' (#63) from void/footer-lows-2 into dev
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 3m9s
2026-11-10 04:17:38 +00:00
320aeecc2c auth: footerBand test pins blur to 12px and the footer rule's exact property set
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 2m53s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 04:09:31 +00:00
7494591624 Merge pull request 'auth: test the emitted footer rule; wrap comment; correct the terrain luminance figure' (#62) from void/footer-lows into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 04:04:14 +00:00
b5e93510e8 auth: footerBand test: identOption for compile; kill blur(0), base-rule border, hard-stop survivors
Some checks failed
Build pull request / Build pull request (pull_request) Successful in 2m48s
NPM Lockfile Changes / lockfile_changes (pull_request) Failing after 1s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:58:04 +00:00
271729a5c0 auth: test the emitted footer rule; wrap its comment; correct the terrain luminance figure
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
NPM Lockfile Changes / lockfile_changes (pull_request) Has been cancelled
footerBand.test.ts reads the CSS vanilla-extract emits for styles.css.ts (so
@vanilla-extract/integration becomes a devDependency): one footer rule, the plate fill before
the color-mix fill, a mask faded on both axes, no border or radius. skyPlate.ts no longer
claims the darkest terrain is 0.0045 (that was Night's whole frame); it states the footer
region's minima per state and the measured link contrast.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:48:36 +00:00
30ae5154f5 Merge pull request 'auth: a blurred, tinted, soft-edged band behind the sign-in footer (4.5:1 in Day, Dusk, Night)' (#61) from void/auth-footer-tint into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 03:45:34 +00:00
2e6d4d042a auth: footer band review fixes: one block, no pill or border, color-mix fallback, sRGB test
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 2m45s
The first footer block had spliced into the sign-in card's rule (a Y-only mask duplicate that
overrode the side fade, a pill radius and border on the footer); the footer is now one rule.
The test mixes in encoded sRGB as Chrome does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:31:52 +00:00
56bc40abe6 auth: fade the footer band at its sides too
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:21:47 +00:00
eb6efeee91 auth: footer tint 0.82; 0.75 measured 4.49 at Dusk on the drawn pixels
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:20:06 +00:00
ea238cf77d auth: a blurred, tinted, soft-edged band behind the sign-in footer line
The footer links sat on dark terrain in the sky's dark ink (contrast 1.0 to 2.9 at Dusk and
Day). The footer now carries the plate's ink over a backdrop-blur band tinted with the plate's
fill (FOOTER_TINT), faded at its edges; skyTheme.test.ts checks the ink over the darkest and
lightest scene behind it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 03:18:49 +00:00
Nibu
91e93e6887 scene: Dusk floor at the link bound with Day's pale-blue lift, so the dark link clears AA
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 2m54s
Dusk's floor moves from 0.317 to 0.4744 (the dark link's bound 0.4554 plus the 0.019
margin Day keeps over its text bound), and its lift from rose #eba0b9 (luma 0.463,
below the new floor) to Day's #e2f4ff. The ridge dusk stops are shaped into the same
band, since the unshaped twilight dipped to 0.336. skyBackdrop('dusk').darkest becomes
0.460352; Dusk text 4.60 -> 6.59, link 3.17 -> 4.54.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 02:53:58 +00:00
0931901b24 Merge pull request 'scene: message and comment on the sweep assertion' (#60) from void/scene-midbuild-msg into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 02:26:29 +00:00
de504f8286 scene: say what the sweep's mid-build assertion means when it fails
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m9s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 02:24:13 +00:00
5666299396 Merge pull request 'scene: sweep the mid-build test over microtask offsets' (#59) from void/scene-midbuild-sweep into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 02:23:57 +00:00
6a93664813 scene: sweep the mid-build test over microtask offsets 0..20
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m8s
The change is no longer pinned to 10-12 microtasks; the test requires at
least one offset to land on a build that is found stale and dropped, so a
shift in the awaits inside create/skyKey cannot make it vacuous.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 02:07:11 +00:00
7556fed31e Merge pull request 'scene: test a sky change landing mid-build' (#58) from void/scene-midbuild-test into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 02:03:51 +00:00
098e45f122 scene: test a sky change landing 10-12 microtasks into a build
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 2m57s
The stale build must be disposed and must not become live: removing the
stale-build scene?.dispose() or the generation check now fails the test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 01:56:34 +00:00
596f864668 Merge pull request 'scene: two quick sky changes build the last sky; Night drift test is exact' (#57) from void/scene-test-strength into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 01:55:21 +00:00
Void
61f434a32d scene: two quick sky changes build the last sky; the Night drift test is exact
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 2m44s
A rebuild read the sky choice before awaiting its key and acted on it after, so Day then Dusk in quick
succession left the Day scene live (the old test only counted disposals and passed with the Dusk scene never
built). A rebuild now stands down if the choice moved while it awaited; that change has its own rebuild.
The test asserts the last sky built is the last one chosen, is the live scene (a login reaches it), and that
every other scene was disposed.

The NIGHT_SKY_LIGHTEST drift test compared with a 1e-6 tolerance, so 0.081641 passed; it is now exact equality.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 01:34:07 +00:00
afae8a13c9 Merge pull request 'scene: rebuild only for a different drawn sky; URL-steered night sky within the Night backdrop (+ link readability numbers)' (#55) from void/sky-link-readability into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 01:32:03 +00:00
Void
2c271c6ded sky: Midnight Sky's link is fitted to clear AA on the lightest Night sky
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m16s
The dark theme's link was #609385 (luminance 0.2505), 2.28:1 on the lightest Night sky (0.081642). It is now
brightened in its own hue until its luminance is at least AA * (0.081642 + 0.05) - 0.05 = 0.5424: #8ad1bd (0.5468,
hue 163 degrees as before), 4.53:1 on the lightest Night sky, 5.43:1 on the darkest, 11.28:1 on the sign-in card
(was 5.68). Only the link changes in baked.ts; the user colours are unchanged. NIGHT_SKY_LIGHTEST is the Night backdrop
constant, and a test fails if the two drift. Dusk is untouched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 01:13:29 +00:00
Void
7bc28f9256 scene: a rebuild is for a different drawn sky; a URL-steered night sky stays within the Night backdrop
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Rebuild key: the sky options the scene is built from (terrainSkyFor / ridgeSkyFor), not the pair of choice and
resolved state, so picking Day while the clock says day, or Auto to the state it resolves to, no longer tears down
and rebuilds the scene. A URL steers only 'auto', so there the options differ and it still rebuilds.

Night: the band ceiling 0.085 let a sky the page URL steers (?sun=, ?sky=) show up to 0.0890, lighter than the
Night constant 0.081705 the text was checked against. The ceiling is now 0.077394, the luma at which one 8-bit
step up reads the baked night's own lightest, and the constant (0.081642) covers the steered case; a test pins it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 01:09:46 +00:00
a6364af8e3 Merge pull request 'trainingNotice: say whose ruling the wording is (comment only)' (#53) from void/training-notice-comment into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 00:30:26 +00:00
ea6dee80ae Merge pull request 'scene: shape each sky state's drawn sky into a luminance band its text ink clears' (#54) from nibu/sky-contrast into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-10 00:28:59 +00:00
Nibu
d03ec36107 Merge origin/dev into nibu/sky-contrast
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 12m22s
Docker check / docker-build (pull_request) Failing after 10s
Conflicts: skyState.ts (kept #54's constants, re-derived), skyForState.test.ts (kept #54's tests, added #48's independent golden-section cross-check and the 1e-6 tight drift test on the screen reading).
terrainDrawn carries #48's finer search (5e-7 degrees) on the screen reading; the reading is now one 8-bit step each way (smooth), not a rounded value, so it can be searched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:50:28 +00:00
Void
e1ebf7ec91 trainingNotice: cite Meta's 2026-11-09 scope; neither exception is implemented
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 33s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:49:09 +00:00
Void
80d3ae1c9b trainingNotice: rewrap comment to the print width
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:48:16 +00:00
Void
c13e90539f trainingNotice: correct the comment per review
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Both render sites named (registration, and rooms whose notice event has scope train). The rule is
an acknowledgment that Minds read and learn from what is said, not consent to training; the
wording is Meta's to settle. Drops the unsourced ruling date and the claim about existing members.
Comment only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:48:07 +00:00
f0bad585b6 Merge pull request 'scene: keep the terrain sky and baked tables out of the main chunk (stacked on #47)' (#48) from nibu/sky-bundle into dev
Some checks failed
Rat dev preview / Build dev preview (push) Failing after 35s
2026-11-09 23:35:25 +00:00
Nibu
577d795189 scene: auto never picks a theme; URL steers auto; quantised bounds; listener-window fix; DST
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 26s
- skyThemeId('auto') is undefined again (auto must not override a signed-in theme); the resolved state stays readable by getResolvedSkyState and subscribe.
- In auto, ?sun= ?az= ?sky= reach the terrain again, shaped into the band of the clock-resolved state; an explicit state beats the URL.
- The sky-change notice is no longer swallowed by a listener arriving or leaving between the clock crossing and the tick.
- BACKDROPS bound what the 8-bit screen shows with the dither at its worst; shaping floor 0.317, night ceiling 0.085.
- The clock uses standard time, so daylight saving does not move the sun.
- A Terrain GL fake test pins uBand and uLift for each state.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:29:02 +00:00
Nibu
eafa3eda79 scene: Day sky bound was 1.2e-6 low; refine to 1e-6 degrees and check both directions
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 44s
Day lightest 0.92805 -> 0.928052 (true terrain peak 0.92805117...). The compass
refinement now halves to 5e-7 degrees; the drift test checks the constant against
the refined computation and an independent golden-section sweep, exact to
[extreme, extreme + 1e-6).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:28:55 +00:00
Nibu
4177bdcccb scene: bound the terrain sky over what its frozen camera reaches (0 to 16 degrees), ridge stays whole-range
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:19:35 +00:00
Nibu
5d3db9e1f2 scene: shape each sky state's drawn sky into a luminance band its text ink clears
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Day and dusk: floor 0.30 (dark ink needs 0.2983). Night: ceiling 0.0931 for the light ink; the baked night sky is kept.
One shaping function (skyBand.shapeToBand) with a GLSL twin lifts the terrain sky toward a tint (hue kept) or scales it down.
The ridge dusk becomes lavender, rose and orange. 'auto' resolves from the clock (sun.js elevation) to day, dusk or night;
subscribers hear the resolved sky; skyBackdrop('auto') is the resolved state's band. Link ink is not in the band (Void's wiring).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:18:08 +00:00
Void
0c6d4476be trainingNotice: say whose ruling the wording is
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
The comment said the wording awaits Meta's legal read. The notice, its wording and the
registration acknowledgement are Meta's ruling of 2026-11-06; the comment now says so.
Comment only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:15:13 +00:00
dc4b1f1818 Merge pull request 'CI: cancel superseded runs with workflow concurrency groups' (#50) from void/ci-concurrency into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-09 23:12:18 +00:00
Void
8f8536a805 CI: cancel superseded runs with workflow concurrency groups
Some checks failed
Build pull request / Build pull request (pull_request) Successful in 4m41s
Docker check / docker-build (pull_request) Failing after 10s
The forge runner takes one job at a time, so every superseded push or PR sync piled up
behind the one before it and the dev preview run waited behind runs for merged heads.
Pull-request workflows get a group per workflow and PR number; the dev preview gets its
own group, so a newer dev push cancels an older one and PR runs never cancel it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:50:10 +00:00
Nibu
8a05668d84 scene: terrain backdrop range found by refinement, not a grid
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
terrainDrawn finds the sun glow peak and the darkest patch with a compass
search from the best coarse samples; constants regenerated (Day 0.237309-0.92805,
Dusk 0.016727-0.967912). The drift test sweeps its own grid (golden-angle spiral
plus a 0.05 degree patch around the sun).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:41:27 +00:00
Nibu
111fa02994 Merge dev into nibu/sky-bundle 2026-11-09 22:38:24 +00:00
Nibu
0d26b71862 scene: keep the terrain sky and baked tables out of the main chunk
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
skyBackdrop reads constants (the union of the ridge and terrain skies, rounded
outward) instead of computing it, and the door imports skyForState lazily with
the scenes. A test fails when the constants drift from the computed union.
Main entry chunk vs dev: +0.4 KB gzip, down from +51.5 KB.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:37:06 +00:00
913a66ebf0 Merge pull request 'Sky-state control in the estate title bar; the state picks the theme' (#45) from void/sky-control into dev
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 3m45s
2026-11-09 22:36:52 +00:00
78f5f4dbb2 Merge pull request 'scene: ridge and terrain scenes follow the sky state' (#47) from nibu/sky-consumer into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-09 22:35:18 +00:00
Void
76daf7cdca Re-pin the bare-sky ratios on skyBackdrop's union ranges
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
#47 makes skyBackdrop the union of the skies the scenes draw: day 0.238-0.919, dusk
0.017-0.965, night 0.058-0.077. Only night text still clears 4.5:1 on bare sky (5.05);
day falls to 3.71 text / 2.56 link. Everything outside a bubble stays on the plate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:32:56 +00:00
Void
5862bbdba2 Plate the composer, members drawer, call view and call status bar
They join the shared plate rule under the scene. The composer's own half-strength
blurred fill goes (its text fell below 4.5:1 in dusk and some auto themes); the
plate has the checked ink. skyTheme.test.ts pins which regions are on the plate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:32:20 +00:00
Void
ce16609c76 Plate every region of bare-sky text under the scene with one rule
skyPlate.css.ts joins the room and page headers, the room list, list pages, the
typing and Following bars, non-bubble messages and the room intro to the sign-in
card's opaque --sky-bubble plate, with the plate's ink and link tokens, at all
widths. The estate title bar's own plate goes: the shared header rule covers it.
skyTheme.test.ts pins the link ratios on bare sky as well (day 5.25, night 2.36).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:32:20 +00:00
Void
3be90875ec Sky control: menu semantics, plates under bare-sky text, pinned colours
The menu is role=menu with menuitemradio items (aria-checked), the button carries
aria-expanded, focus goes to the checked item on open and back to the button on
close. Over the scene the estate title bar and any non-bubble message sit on the
sign-in card's plate (--sky-bubble) instead of bare sky. skyTheme.test.ts pins the
ink colours and WCAG ratios of the picked themes, measured with the ink clamped
into the sky range as skyState.test.ts does; the pass/fail set is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:32:20 +00:00
Void
c180385476 Sky-state control in the estate title bar; the state picks the theme
One button beside Find a room opens Auto / Day / Dusk / Night (fits a 320 px bar).
Day and Dusk take Noonday Sky's dark ink, Night Midnight Sky's light ink, Auto
keeps the theme the page would have had; signed-out pages follow the state too.
skyTheme.test.ts checks contrast from the baked tokens: day and night ink clear
AA on bare sky, every container carries its text, links clear AA on the surface,
and dusk text on bare sky does not, so it stays on surfaces.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:32:20 +00:00
Nibu
edc6a9a8f1 scene: catch a state change during the first build; skyBackdrop is the union of what the scenes draw
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
index.ts compares the current state with the built one after subscribing and
rebuilds if they differ. skyBackdrop unions the ridge sky and the terrain sky
(skyColour sampled over the sphere, from chooseSky(terrainSkyFor(state))), so
terrain dusk's sun glow and terrain day's darker zenith are inside the range.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:31:00 +00:00
Nibu
6c22d4f1dc scene: a failed sky-state rebuild restores the ground; an explicit sky beats the URL
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
The door tells the host (onInactive/onActive) when a rebuild makes no scene or
makes one again. chooseSky takes an explicit sun or sky option before ?sun=,
?az= and ?sky=; only auto, which passes none, is steered by the URL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:23:47 +00:00
Nibu
8c02b85796 Merge dev into nibu/sky-consumer 2026-11-09 22:22:27 +00:00
Nibu
0e0cff66ae scene: the ridge and terrain scenes follow the sky state
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
The door (index.ts) reads getSkyState, subscribes on start and rebuilds the
scene on the same canvas when it changes; the returned scene's dispose
unsubscribes. skyForState.ts maps a state to the scene's sky option: auto
leaves it unset (today's behaviour), dusk is the ridge dusk, day and night
are the baked gradients skyBackdrop bounds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:20:49 +00:00
a9a75fc6ff Merge pull request 'scene: skyState test takes the worse of both sky ends' (#46) from nibu/sky-test-ratio into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-09 22:19:32 +00:00
Nibu
32cc8d6ad6 scene: skyState test clamps the ink into the sky range for its worst case
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:16:39 +00:00
Nibu
a3a500a3d2 scene: skyState test measures ink against both sky ends and takes the worse
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:13:36 +00:00
a129866236 Merge pull request 'scene: host handles a lost GL context (ground on loss, rebuild on restore)' (#44) from nibu/context-lost into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-09 22:13:23 +00:00
Nibu
571a2de3fa scene: pin the host's restore-listener removal and stale-loss guard; fix preventDefault comment
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:10:36 +00:00
47ad5cc9d6 Merge pull request 'scene: sky-state seam (auto/day/dusk/night) with skyBackdrop' (#43) from nibu/sky-state into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-09 22:07:59 +00:00
Nibu
3b61f2babf scene: host handles a lost GL context (drop to ground, rebuild on restore)
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
host.ts passes onContextLost to the scene; on loss it disposes the dead scene
and calls onInactive (BackgroundScene removes data-scene so the CSS ground
shows). A webglcontextrestored listener on the canvas starts a fresh scene;
it is removed on dispose, and a stale start is dropped by generation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:05:30 +00:00
Nibu
ecdf5e9d29 scene: sky-state seam (auto/day/dusk/night) with a luminance bound per state
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m40s
getSkyState/setSkyState/subscribe over one localStorage key, default auto,
tolerant of missing, invalid and refused storage. skyBackdrop(state) returns
the darkest and lightest sky luminance the state can show. Tests measure
login text and link contrast against it per state and theme.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:02:01 +00:00
7a7f5ceee1 Merge pull request 'scene: terrain mesh as fine as the height map (stack: terrain scatter, albedo, stars, haze)' (#42) from nibu/scene-terrain-scatter-dev into dev
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 2m51s
2026-11-09 20:43:11 +00:00
Nibu
ef961636c3 auth: opaque login card for every theme, own link colour off the sky themes
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m12s
The scene sky is one fixed dusk for every theme, so a translucent card put
Midnight's link at 4.12/3.37 and Light's and Silver's at 2.49 (Libby). The card
is now the theme's bubble colour with no transparency and no backdrop-filter,
so text and link contrast no longer depend on the scene or a blur. Themes
without --sky-bubble (Light, Silver, Dark, Butter) get link #99c7ff on the card
(Dark and Butter already used that hue); Midnight and Noonday keep their own.

WCAG 2.x ratios, computed, text / Register link on the card:
  Light, Silver, Dark, Butter  #b7c7d9 / #99c7ff on #0d1a26  10.21 / 10.03
  Midnight Sky                 #aeccff / #609385 on #0a090e  12.17 /  5.68
  Noonday Sky                  #342d25 / #2a4f27 on #b9b6af   6.70 /  4.62

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 20:40:47 +00:00
Nibu
a773bc4932 auth: Noonday Sky login card opaque, so text and link pass AA over any terrain
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Libby's read: at 54% fill Noonday text was 2.99:1 and the Register link 2.06:1
over shaded terrain. Dark text on a light bubble fails when a dark ground shows
through, so Noonday's card now takes the bubble colour with no transparency.
Midnight is unchanged (54%).

WCAG 2.x ratios, computed (relative luminance, sRGB):
Noonday, bubble #b9b6af, text #342d25, link #2a4f27, card over black / white:
  54% fill: text 2.23 / 9.51, link 1.54 / 6.55 (fails over dark)
  80% fill: text 4.36 / 7.86, link 3.00 / 5.42 (fails over dark)
  90% fill: text 5.44 / 7.24, link 3.75 / 4.99 (link fails over dark)
  100% fill: text 6.70, link 4.62, independent of backdrop and blur
Midnight, bubble #0a090e, text #aeccff, link #609385, 54% fill:
  over black text 12.49, link 5.83; over white text 2.62, link 1.22
  (white is not in the night scene; 4.5:1 over the horizon glow is an
  estimate, not measured)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 20:37:16 +00:00
Nibu
78a7dbe923 auth: login card fill 50% -> 54% so 4.5:1 holds without backdrop-filter
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m17s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 20:17:35 +00:00
030417f27a CI: drop artifact upload from the build check (#41)
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 3m6s
2026-11-09 16:01:37 +00:00
deb4e0dfe6 Room list on a phone: plain text rows in the heading type; no Create Room or Join with Address (#40)
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
2026-11-09 15:39:38 +00:00
Nibu
b13bb9ecb3 Merge origin/dev (9794714f) into nibu/scene-terrain-scatter-dev
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 40s
One conflict, index.html's manifest link: this branch had %BASE_URL%manifest.json (4afd37e7), dev has ./manifest.json
(45aad35e). Both make the link base-relative for static previews; dev's form is kept, matching the file's other
relative links.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:21:58 +00:00
Nibu
9b4d92c9de scene: terrain mesh as fine as the height map it is shaded from, cavity read bilinear
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
Phone shots of 'terrain · low' showed hard-edged facets on the near ground and stepped crests. Cause: the grid
(192 quads low, 256 full, 7 m wide at the nearest ground) was coarser than the 2.9 m height texels the fragment
shader reads its normals from, so gullies the polygons could not carry showed as hard shading edges. Measured by
rendering the low tier at 192..384 quads against a 768-quad reference: mean abs error 1.7 / 1.1 / 0.7 / 0.5 on
the day frame at 192 / 256 / 320 / 384; the warp's shape barely moved it.

- GRID: still 192, low 320, full 384; a test holds every tier to a quad of at most two texels at the nearest ground
  the camera sees, and the tiers ordered by cost. The low triangle ceiling goes from 80k to 210k (205k used),
  unmeasured on a phone.
- cavity: the shader read it from the nearest texel (blocks of one texel); it is now bilinear (hBil) at a continuous
  position, with a CPU twin (bilinearHeight, curvatureAt, cavityAt, CAVITY) and a test that shading is continuous
  across texel borders where the nearest-texel read jumps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:19:14 +00:00
9794714f97 Room list wash and name line: undo the solid slabs and the boxed pill (#39)
All checks were successful
Rat dev preview / Build dev preview (push) Successful in 3m45s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 14:57:08 +00:00
Nibu
20cc2c682d scene: far terrain fades into the sky's own horizon colour (night glow included)
Haze was the Hillaire volume alone, ~40% opaque by 2 km and without the night glow
the sky adds, so the far ground sat well off the sky at the horizon (night: sky
73,79,99 vs far ground 20,24,31). Past SKY_FADE the surface is now skyColour flat
along the horizon in its ray's azimuth, in the CPU twin and the GLSL alike.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:12:07 +00:00
Nibu
f7725545a5 Move the terrain tier label to top-left under the preview banner
It sat bottom right and overlapped the chat status line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 19:30:04 +00:00
Nibu
c35ac7e5cd scene: terrain haze is aerial perspective from a baked Hillaire camera volume
Replaces the exp(-(k d)^1.6) haze with the camera volume of Hillaire, EGSR 2020 section 5.4 (and sebh/UnrealEngineSkyAtmosphere
RenderCameraVolumePS): slices on the squared distribution, in-scatter integrated with each step's extinction analytic, alpha the
grey opacity 1 - mean(T). Baked into baked.scatter.aerial_perspective by src/sky/scatter.js (RGBA16F 7 x 96 x 12, 86 KB), looked up
in the terrain fragment shader (two fetches). Night: the moon lights the haze through the same volume, plus a deep blue starlight floor.
Shortcuts, with units and constants, in src/sky/README.md: sun-relative indexing, 12 x 8 x 7 texels, path = scene metres x 8,
ground ignored, single scattering, no multi-scattering LUT.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 18:16:47 +00:00
Nibu
685abbb19b scene: terrain steep faces without streaks, smoother normals and silhouettes
- albedo wobble, grain and strata are triplanar (weights |n|^4 over yz, xz, xy), so a cliff is not the floor pattern smeared down it
- normals from bilinear height at a continuous position, stencil 1.5 texels each side
- the grid is packed toward the camera at the patch centre (warpUv), 192 low / 256 full, vertex heights bilinear: near ridge silhouettes no longer step in 23 m blocks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 18:10:21 +00:00
Nibu
1296f18338 scene: terrain relief and contrast on a phone, a tier label
Why it read hazy and flat at 390x844: the camera started with the noon sun straight behind it (no shading), the low tier
sampled a 512 height map (6 m texels), plain exp(-k d) haze greyed the near ground, albedo had no grain, and the night
ground sat at ambient 0.018 (near black).
- camera starts with the noon sun 100 degrees off axis (START_TURNS; ?az= still moves the sun)
- haze T = exp(-(k d)^1.6), k 0.0007: near ground clear, far ridges melt
- low tier bakes 1024 texels
- albedo grain (three-wave octaves, fine one fades with distance) and rock strata; shader-only cavity shading
- night: moon from the sun's mirrored position, ambient lifted by nightness
- tier label (full / low / still / sky-only) in preview builds or ?tierlabel=1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 17:38:27 +00:00
Nibu
e007514af3 scene: terrain falls back to its sky alone on a 2D canvas where WebGL2 is missing
createTerrainScene returned null without WebGL2, leaving plain dark ground. The door now mounts
terrain/TerrainSky2D.ts on the same canvas: skyColour (the CPU twin of SKY_FRAG) painted once, the star
layer on top when dark, same ?sky= ?sun= ?az= choice. chooseSky moves from Terrain.ts to terrainSky.ts
so both scenes share one owner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 08:10:28 +00:00
Nibu
40b1e775fe Merge remote-tracking branch 'origin/nibu/scene-terrain-scatter' into nibu/scene-terrain-scatter-dev
# Conflicts:
#	scripts/preview-config.js
2026-11-08 07:51:56 +00:00
Nibu
c2858452e7 scene: terrain sky and haze from Void's baked scattering table
Drops the vendored terrain/skyData.ts and the computed azimuth. terrainSky.ts reads src/sky/baked.ts:
sun {elevation_deg, azimuth_deg, color_linear}, ambient_linear, horizon_hex. terrainScatter.ts decodes
baked.scatter and uploads sky_view as an RGB16F 3D texture; SKY_FRAG and GRID_FRAG sample it (README
sampler), the sky for the view ray, the haze for the horizon in the fragment's azimuth.

- Sky: 1 - exp(-exposure * radiance) + night glow (midnight horizon colour, off as the sun nears the
  horizon) + sun disc; +-0.5/255 dither on the 8-bit output.
- Stars fade by sun elevation (starGain: 1 below -12, 0 above -6) instead of a dark-sky gate; the
  field is placed against the midnight gradient.
- ?sun=<deg>&az=<deg> (or the sun option) lights between the two bakes for dusk (skyAtSun).
- Changed numbers, noted in scene/README.md: haze colour is the scattered sky (was the gradient's
  horizon stop), ambient is ambient_linear as baked (was gradient zenith x 0.25 x night lift up to 4),
  HAZE_K unchanged at 0.0004.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 23:40:43 +00:00
Nibu
f1d8db0c61 Merge void/sky-tokens (0386065f) into scene-terrain-scatter 2026-11-07 23:28:53 +00:00
Nibu
d2c2c279e2 scene: brighter, slightly larger terrain stars so they read on a phone
Terrain overlay draws the ridge field at 2.4x alpha (capped at 1) and 1.3x
radius; the dark-sky gate is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 21:00:56 +00:00
Nibu
2299adefb5 merge nibu/scene-terrain-stars into nibu/scene-terrain-both 2026-11-07 21:00:17 +00:00
Void
0386065f2c sky: bake an atmospheric-scattering table (half float) for a WebGL2 sky shader
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m38s
CLA Assistant / CLAssistant (pull_request_target) Failing after 1s
scatter.js ray-marches a single-scattering Rayleigh+Mie atmosphere whose vertical optical depth is
sun.js's TAU, and bakes two tables into baked.scatter: transmittance to space by view elevation
(32x1) and sky radiance by azimuth from the sun x view elevation x sun elevation (7x32x12), RGB
half floats, little-endian base64, value x 64. Layout, exact decode and a GLSL sampler are in
src/sky/README.md. Tests pin layout, encoding, checksums and physical anchors (zenith transmittance
equals exp(-TAU); blue noon, red low sun toward the sun, black below the planet-shadow limit).

The per-sky sun {elevation_deg, azimuth_deg, color_linear}, ambient_linear and horizon_hex were
already baked in 7216456a; sun.js now exports TAU.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 20:57:22 +00:00
Nibu
054c584ebc scene: stars in the terrain scene, a 2D overlay above the horizon on dark skies
Reuses ridge/stars.ts (placement, tint, rolling 32-star twinkle) projected with the terrain camera
onto an overlay cut to the sky; stops with the terrain loop.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 20:55:44 +00:00
Nibu
da12cb8708 scene: tune terrain albedo bands, lighter haze, night ambient lift
Bands moved so snow caps only the peaks and soil/scree/rock read; haze
0.0007 -> 0.0004 so the albedo is not washed out; ambient x4 at night so a
moonlit face is readable on a phone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 20:54:25 +00:00
Nibu
931f84fcd1 scene: procedural terrain albedo by normal and height, per baked sky
Rock on steep faces, soil to scree to snow by height, snow only on gentle
faces; no texture reads. Pure albedoAt()/albedoPalette() mirror the grid
fragment shader; the palette is read from the baked sky (snow line and tint
by sun elevation: cool haze at night, warm sun by day).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 20:44:54 +00:00
Nibu
19c1f21610 scene: terrainNormal reads the world-z slope from .y, not .z
The noise is evaluated at vec3(xz * f, c), so .z is the slope along the held
constant axis. Confirmed numerically (harness/scene/gradAxis.cjs): analytic
.xy matches central differences for fbm and phacelle, .z does not. Only the
ray-march scene's normals were affected; the grid tier already used .xy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 20:43:34 +00:00
Nibu
4afd37e7dd preview: hash router and base-relative manifest link
Previews are static dirs with no SPA fallback; a reload or shared link on
/login/matrix.org was an nginx 404. preview-config now enables the hash
router, and index.html's manifest link follows the base path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 20:25:02 +00:00
Void
7216456a27 sky: bake sun azimuth and colour, ambient with a night floor, horizon colour
Some checks failed
CLA Assistant / CLAssistant (pull_request_target) Failing after 1s
Build pull request / Build pull request (pull_request) Failing after 3m18s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 18:46:39 +00:00
Nibu
9e34664550 scene: terrain shading blended across texels, smoother sky horizon, lighter haze
Preview on Starfire showed one flat normal per height-map texel (blocky ground)
and a hard step in the sky gradient at the geometric horizon. Normals now blend
the four surrounding texels; the sky's elevation mapping eases through the
horizon; haze k 0.0012 -> 0.0007 so relief reads.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 18:43:33 +00:00
Nibu
5642acf2f9 scene: terrain style, a baked Phacelle height map on a displaced grid lit by the baked sky
style 'terrain' (WebGL2, tier-gated, dynamic import): height map baked once on the
GPU into RGBA8 (promoted from the terrain-tier-spike), a displaced grid, the baked
gradient as sky, baked sun/ambient/haze. Sky from option, ?sky=, or the stars'
night notion. Cadence guard, pauses, context loss and compile failure follow the
ridge scene. preview-config.js takes an optional style argument.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 18:36:18 +00:00
Nibu
077737830e scene: baked sky numbers and lighting/haze maths for a terrain tier
Vendors the small set the terrain needs from Void's baked sky (PR #22, 7b4aa2f):
sun elevation, the 7-stop gradient, sun.js light().direct, plus a sun azimuth
computed from the same series (not in the bake). Lambert from the sun, ambient
from the gradient zenith, exp(-k d) haze toward the gradient's horizon stop;
a sun below the horizon lights nothing. Pure functions, no GL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 18:36:18 +00:00
Nibu
833c477785 scene: baked starfield with a rolling twinkle window for dark skies
Every star is seeded, placed toward the zenith, faded by the local sky
luma, and baked once into the sky canvas. A night sky is one whose
zenith luma is below 110; the ridge scene has no theme flag, so the
dusk default qualifies faintly and a day sky gets no stars and no
overlay.

32 slots twinkle at a time on a small overlay canvas under the ridges:
each slot runs back-to-back one-cycle twinkles (own 2-7 s period and
offset) of one star from its own partition, shuffled per epoch, never
repeating across the seam. Gain is a pure function of (slot, t), 0.35x
to 1.15x, exactly 1 at start and end. Dimming paints the sky's own
colour over the baked star; brightening adds a star. The pass is
clear + at most 32 arcs at 20 fps, stopped under reduced motion (live),
while hidden, in tier 'still', and after the slow-frame fallback.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 18:30:20 +00:00
Nibu
b8f2bb462e auth: login card fill 50% with 18px blur and a faint edge
The blur flattens the sky and ridges behind the text, so the fill can be
half as opaque and let the scene show through. Text over the unblurred
horizon glow is 4.15:1 (4.5 needs 54%); measured over the real blurred
backdrop at 390x844 it is >= 4.94:1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 18:22:19 +00:00
257 changed files with 14719 additions and 1081 deletions

View file

@ -1,3 +1,8 @@
// Airbnb's own bans, kept: a `no-restricted-syntax` entry below replaces the whole list.
const airbnbRestrictedSyntax = require('eslint-config-airbnb-base/rules/style').rules[
'no-restricted-syntax'
];
module.exports = {
env: {
browser: true,
@ -62,6 +67,21 @@ module.exports = {
"@typescript-eslint/no-shadow": "error"
},
overrides: [
{
// The one join path: a join is `joinEstateRoom`, which files the DM before it sends the join.
files: ['src/**/*.ts', 'src/**/*.tsx'],
excludedFiles: ['src/app/features/estate/joinEstateRoom.ts', 'src/**/*.test.*'],
rules: {
'no-restricted-syntax': [
...airbnbRestrictedSyntax,
{
selector: "CallExpression[callee.property.name='joinRoom']",
message:
'Join a room through joinEstateRoom (features/estate/joinEstateRoom.ts), the one join path.',
},
],
},
},
{
files: ['*.ts'],
rules: {

View file

@ -4,12 +4,14 @@ on:
pull_request:
types: ['opened', 'synchronize']
concurrency:
group: ${{ github.workflow }}-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build-pull-request:
name: Build pull request
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{github.event.number}}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@ -24,17 +26,3 @@ jobs:
env:
NODE_OPTIONS: '--max_old_space_size=4096'
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: preview
path: dist
retention-days: 1
- name: Save pr number
run: echo ${PR_NUMBER} > ./pr.txt
- name: Upload pr number
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pr
path: ./pr.txt
retention-days: 1

View file

@ -6,6 +6,10 @@ on:
- 'Dockerfile'
- '.github/workflows/docker-pr.yml'
concurrency:
group: ${{ github.workflow }}-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
docker-build:
runs-on: ubuntu-latest

View file

@ -5,6 +5,10 @@ on:
paths:
- 'package-lock.json'
concurrency:
group: ${{ github.workflow }}-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
lockfile_changes:
runs-on: ubuntu-latest

View file

@ -4,6 +4,13 @@ on:
push:
branches: ['dev']
# One run per ref wins: a newer push to dev cancels the older queued or running one, so the run
# that builds rat-dev-dist is always the newest. Pull-request runs are other workflows and other
# groups; they never cancel it.
concurrency:
group: rat-dev-preview
cancel-in-progress: true
jobs:
build:
name: Build dev preview

View file

@ -1,6 +1,13 @@
{
"defaultHomeserver": 1,
"homeserverList": ["converser.eu", "matrix.org", "mozilla.org", "unredacted.org", "xmr.se"],
"defaultHomeserver": 0,
"homeserverList": [
"gamecult.org",
"converser.eu",
"matrix.org",
"mozilla.org",
"unredacted.org",
"xmr.se"
],
"allowCustomHomeservers": true,
"featuredCommunities": {
"openAsDefault": false,
@ -20,5 +27,14 @@
"backgroundScene": {
"tier": "off"
},
"dings": {
"enabled": false
},
"registration": {
"enabled": false,
"url": ""
}
}

242
docs/mind-feedback-pages.md Normal file
View file

@ -0,0 +1,242 @@
# Mind feedback pages
> The desk reads `gamecult.fork.*` now, not the `org.gamecult.feedback.*` projections named below; see CultLib `contracts/cultnet/governance/fork-card.md` (src/app/features/desk/forkContract.ts).
Design only. No code exists for this; nothing here is built. Drafted by Kiko Self (2026-11-07) with Heimdall's draft rulings
on guests and hiding; placement ruled for this repo by Void. Follow-up `eureka-body:follow_up:ratatoskr-mind-feedback-pages`.
Every number below is provisional.
**Schema owner.** The Huginn kinds, their fields, keys and refusals are specified in `huginn-feedback-kinds-proposal.md` (Eureka Self, 2026-11-07, in
`/opt/commons/handoff`), adopted for this page by Void's Persona. Where this page names a field of those kinds it mirrors that proposal; if they differ, the proposal wins.
This repo owns only the client: a typed interface mirroring those shapes, and fixtures.
Each Mind's section in the estate navigator opens on that Mind's **feedback page**: the Mind's open questions with options, its
recommendation and what each waits on, answerable by the operator and anyone with an account. It replaces the old Fork Desk
(taken from the brief; no trace of it was found in this repo or in the Minds' state).
## 1. Placement
Each Mind's navigator section **opens on its feedback page**, rooms below it. A cross-Mind list of everything waiting on a person
is wanted later and is not part of this spec. On phones the page folds each question's options and the answer form behind its title,
so the section root stays a list of questions, not a wall of forms.
## 2. Authority
| Concern | Owner | The page's part |
|---|---|---|
| The question | a typed `question` document in the **owning Mind's own mind**, key `<campaign>:question:<label>` | a view of it; the page stores and edits nothing |
| Which questions appear | the owning Mind, by a `feedback_listing` (the opt-in act) carrying `audience` and `close_grants`; un-listing is a `Withdrawn` resolution on it | shows only what has a listing in force |
| An answer | its author. The **receiver (Bifrost) holds the text**; the Mind holds a **text-free `feedback_answer` record** | submits the answer to the receiver |
| The ruling | the owning Mind, recorded by her | **never writes one**; links to it once she has |
| Status (open, answered, closed) | derived in the Mind from its documents (`closed` is a `Withdrawn` resolution on the question), never written | shows it |
| Who answered, and as what | the Bifrost account behind the Heimdall session, plus its role at the moment of the answer | shows it; never takes it from the client |
| Close | a `feedback_close_request` the owning Mind honours or declines; it never changes the question's status by itself | offers Close only to a grant holder; **the page writes no ruling** |
| Hiding | the owning Mind alone, as a `feedback_hide`; unhide is a `Withdrawn` resolution on it | shows the labelled stub; hides nothing itself |
| Erase | Bifrost's erase of an account; the receiver drops the text | shows "erased account" |
An answer is input to a Mind, not a vote and not a decision. **The page never tallies**: no counts, no totals, no "leading" option, no
ordering by popularity, no count of reports or close requests. Only the Mind's ruling picks anything.
## 3. Receiver and carriers
- **Schema owner: `huginn-feedback-kinds-proposal.md`.** Four new Huginn kinds, all Eureka's: `feedback_listing` (audience, `close_grants` with no Guest
grant, the opt-in act), `feedback_answer` (a text-free record), `feedback_close_request` and `feedback_hide`. Unhide, un-list and "request declined"
are `resolution`s on those kinds. This page proposes no kinds.
- **Bifrost is the receiver** (Heimdall's side). It verifies the Heimdall session, reads the account, stamps `answerer`, `kind`, weight and `time`,
**stores the answer text**, delivers it, serves the projection the page reads, and **does the erase**. A Matrix sender is a different
identity authority and never becomes `answerer`.
- **Huginn is RUDP-only.** The client never talks to Huginn, and the receiver never writes to it: an admission declared for another instance is refused
(`ForeignInstance`), so a receiver "admitting as Kiko" would be unauthenticated by construction.
- **Delivery is by mouth.** The receiver delivers each answer or close request to the owning Mind's Persona through the mouth's pending/ack path (a new
delivery document, `gamecult.persona.feedback_delivery.v1`, owned by Bifrost). **The Persona admits the text-free record into her own mind** and acks only
after it is admitted; a restart redelivers the same record id, which is `AlreadyAdmitted`. The text reaches her turn once, in the delivery, and is never
admitted.
- Dependencies that must ship first, in the proposal's order: Huginn readers (daemon, CLI, clients), then the Persona organ, then Bifrost's receiver.
## 4. Mock
```
Kiko > Feedback [synced 2 min ago]
--------------------------------------------------------------------------------------
Open questions [ Open ] [ Settled ]
OPEN | asked 6 Nov 2026 09:12 | waiting 1 day
Which source feeds audio_spectrum? [ Details v ]
The visualizer contract assumes a host-side spectrum ... (3 lines, then "Show more")
Waits on: "Overlay-wide effect budget" (open, links to that question)
( ) A Overlay's own audio only
( ) B OBS captured stream Kiko recommends this
( ) C Loopback of the mix, microphone excluded
( ) Something else: [ up to 2000 characters ]
Answers are visible to everyone who can see this question.
[ Send answer ]
[ Ask Kiko to close this question ] <- only if you hold the close grant on it
Answers (every one, oldest first)
Meta operator B OBS captured stream 6 Nov 21:04
Aqua Mind B OBS captured stream 6 Nov 21:40
Nibu member C Loopback of the mix 7 Nov 08:12
Heimdall Mind "Either, if latency is measured first." 7 Nov 09:02
a guest guest A Overlay's own audio only 7 Nov 09:15
(answer hidden) guest Hidden by Kiko, 7 Nov, spam
Earlier answers by the same person fold under their latest.
--------------------------------------------------------------------------------------
SETTLED | Kiko ruled: "..." (link to the ruling) | 5 Nov
```
- Each row is the author's name and **kind**, the choice or text, and the time. Name and kind are what the account was **at the moment of the answer**
and stay so if it later changes. The operator is a member holding the grant that makes her the operator, shown as such.
- The recommendation is stated in words, not colour, and is never preselected.
- Answering a settled question is not offered.
## 5. Data contract
The **Huginn shapes belong to the proposal** (section 2 there): `feedback_listing`, `feedback_answer`, `feedback_close_request`, `feedback_hide`. The client
declares a typed interface that mirrors them as the page's projection and imports nothing it cannot decode from them.
**Question projection** (`org.gamecult.feedback.question.v0`, read-only, served by Bifrost):
| Field | Meaning | Source |
|---|---|---|
| `id` | `<campaign>:question:<label>`; the key carries the campaign, not the instance | the document key |
| `owner` | the asking Mind's instance | the instance |
| `title`, `body` | one line; prose up to 4000 bytes | `title`, `question` |
| `options[]` | `{ id, text }`, 2 to 8; **the option id is the option's label** | `options` (`label`, `text`) |
| `recommendation` | an option label | `recommended` |
| `dependsOn[]` | `{ text, questionId? }`; an id only where the line cites one verbatim | `depends` (free text) |
| `askedAt` | the question's receipt `committed_at` | the receipt; `asked_on` is only a date |
| `audience`, `closeGrants[]` | `AccountHolders` or `MembersOnly`, no default; grantees are accounts or the kinds `Member` and `Mind`, **never `Guest`** | the in-force `feedback_listing` |
| `status` | `open`, `answered` (with a `rulingId`) or `closed`, derived | the question's resolutions |
**Answer row** (`org.gamecult.feedback.answer.v0`, assembled by the receiver from its stored record and the Mind's text-free `feedback_answer`):
| Field | Meaning |
|---|---|
| `recordId` | `<question-label>.a<N>`, N the receiver's per-question sequence |
| `answerer` | the **Bifrost account id** (stable; the authenticator handle is cleared on erase); never a display name, never client-supplied |
| `kind` | `Guest`, `User`, `Patron`, `Member` or `Mind`, read from Bifrost's account state **at answer time**; the session carries identity, never role |
| `weightPermille` | stamped 0 for a guest, 1000 otherwise; **the page sums nothing** |
| `choice` / `text` | an option label, free text up to 2000 characters, or both; at least one. Text exists only in the receiver's store and the projection, never in a mind |
| `time` | when the receiver accepted it |
Invariants: the receiver takes `answerer`, `kind` and weight from the verified session and account state, never from the request body; an unknown option
label is refused; the latest record per account is its standing answer, derived at read time; display names are looked up for display and are never keys. An
account may answer only while its status is `active`, read at answer time. A guest cannot request close, and a guest grant cannot be written. Answers to a
settled question are kept. Nothing is edited or deleted, except the receiver's redaction on erase (section 7).
## 6. Flow
```
owning Mind's mind --(Bifrost projection)--> page page --(answer, Heimdall session)--> receiver (Bifrost; holds the text)
receiver --(mouth delivery)--> owning Mind's Persona --(admits text-free feedback_answer)--> her mind
the Mind decides and records the ruling herself --> status derives --> projection updates --> page moves it to Settled
```
1. **View.** The page shows the projection of the questions with a `feedback_listing` in force, filtered by the viewer's kind against `audience`. The mind
stays the truth; the projection is rebuilt, never hand-edited, and republished on a heartbeat so freshness is visible.
2. **Answer.** The page submits with the person's Heimdall session; the receiver stamps, stores the text and appends the record.
3. **Return.** The receiver delivers by mouth; the Persona admits the text-free record and reads the text once. Each arrives as **quoted, attributed data**
(record id, author, kind, time), never in an instruction position: text from a guest, user or patron is untrusted, and she records a ruling from it, never
an action. The receiver does no keyword screening. She does not quote answer text into memory or a ruling; she cites the record id.
4. **Decide.** She records the ruling in her mind. The next projection carries `answered` and the ruling link.
5. **Close.** A grant holder's request is delivered as a `feedback_close_request`. The Mind honours it by resolving the question, or declines with a
`Recorded` resolution on the request; the request never changes the status itself. The page shows who asked and never how many.
## 7. Guests, erasure and hiding
- **Guests may answer** and see what the Mind opted in for their audience; they may not close (refused at the receiver and again by Huginn, and no listing can
name a Guest grantee). A guest answer carries weight 0 by construction and is tallied nowhere. Guests see display name and kind only, never a Matrix id,
provider handle or GitHub login.
- **Erase redacts.** Records are append-only and are **never edited, but may be redacted**. A mind cannot redact: every admission's receipt keeps its exact
payload bytes, which is why the text never enters one. When Bifrost erases an account, **the receiver drops that account's answer text and name** and keeps record
id, kind and time only. **A content hash is not kept**: an unsalted hash would confirm a guessed text. The author shows as "erased account". The receiver delivers an erase notice and the Persona admits a `feedback_hide` with
reason `ErasedAuthor`, the Mind's acknowledgement rather than a moderation call. The honest residue: a Mind's own memory or ruling may already quote an
answer, and Huginn cannot redact it; the rule that she cites record ids, never text, is a prompt, not an invariant.
- **Only the owning Mind hides**, as a `feedback_hide`: target (an answer or a question), reason from the closed set (`PrivateMatter`, `Abuse`, `Spam`,
`OffTopic`, `AuthorRequest`, `ErasedAuthor`) and a line of at most 200 bytes, with its admission receipt as the audit trail. Unhide is a `Withdrawn`
resolution on the hide. No count of reports ever hides anything and there is no auto-hide threshold; the operator orders a hide in conversation and the
Mind records it.
- **Anyone with an account may report** an answer; the receiver delivers it to the Mind as input. The page shows nothing of it and never a count. An author
reporting their own answer uses `AuthorRequest` and the Mind honours it.
- **What a hidden item shows.** A hidden answer keeps its row (author, kind, time, "Hidden by <Mind>, <date>, <reason>") with its text withheld for every
reason. A hidden question shows a stub with its title, body, options and answers withheld; taking a question off the page is a `Withdrawn` resolution on its
listing. The answer box says answers are visible to everyone who can see the question.
- **Private matter** is never listed. An answer carrying someone's private matter is hidden with `PrivateMatter`.
- Guest answers are collected for nothing but delivery to the owning Mind.
- **No content hash anywhere.** No answer, close-request or redaction shape in this page carries one. The proposal's `feedback_answer` lists a `content_hash`
field; per Heimdall it must go, and Eureka owns that change.
## 7a. Receiver: credential, store, names
Source: Bifrost PR #10, `docs/feedback-receiver.md` (design, nothing implemented).
- **Credential: route 2.** Ratatoskr presents the **OIDC access token Bifrost already issues to chat**, and Bifrost verifies it itself. The client holds no new
secret and needs no Heimdall token. The account is the token's subject, `UserAccount.Id`. **The claims check is still open**: which claims the token carries
and which Bifrost must verify for this endpoint have not been read.
- **Store: a CultCache file** (Eureka's pick), owned and written only by the receiver. **Backups need a stated purge or expiry before any deploy**, so that
erased text does not survive in them; the number is left to Eureka and Heimdall.
- **Display names.** The receiver must not reuse `CurrentBifrostActor.DisplayName`, which falls back to the GitHub login and then to "Guest". It stores the
name at answer time from the member nickname or account display name only, and "an account" when both are empty. Never a provider handle, GitHub login,
Heimdall id or Matrix localpart.
- **No guest exists until Bifrost PR #9 lands.** On main an active membership is a member, an authenticated or pending one a user, and nobody is a guest, so the
guest rules in this page have no account to apply to until then. An answer needs an active account, read at answer time.
## 8. States
- **Empty:** "Nothing is waiting on you from Kiko", when it last synced, a link to Settled. Never blank.
- **No answers:** "No answers yet", with the question's age.
- **Stale projection:** past two heartbeats (provisionally 30 minutes) the header reads "may be out of date"; answering stays possible. A projection that
never arrived says "Kiko's questions have not been published yet", not "no questions".
- **Long open:** past 14 days (provisional) shows its age; it is not demoted or hidden.
- **Blocked:** shows the dependency chip with that question's status; answering stays allowed.
- **Settled while answering:** the answer is kept for the Mind and the page says it arrived after the question settled.
- **Signed out, expired, or not active:** answers are shown, the form asks to sign in or says why it cannot; nothing typed is lost.
- **Send failed:** the text stays in the field with the reason and a retry.
## 9. Build order
1. The client's typed interface, mirroring the proposal's shapes and the projections in section 5, and **fixtures** for every state in section 8 plus the
guest, erased and hidden rows. The page renders from fixtures; no network.
2. The proposal's kinds and migration (Eureka: readers first, then the Persona organ), and the Bifrost account publisher, receiver and mouth delivery
(Heimdall). The page switches from fixtures to the projection.
## 10. Accessibility
- Semantic structure: `main` with a heading; each question an `article` with its title as a heading; options a `fieldset`/`legend` radio group; the
free-text field labelled, with a character counter announced politely. The phone fold is a button with `aria-expanded`.
- No meaning by colour alone: status, recommendation, kind, hidden and close-grant are text.
- Keyboard: everything reachable in a sensible order; after Send, focus goes to a confirmation naming the question and the answer.
- New answers and status changes arrive in an `aria-live="polite"` region, never as a focus steal.
- Targets at least 44 px; reduced motion respected; contrast per theme.
- Names and answers are user text: `dir="auto"`, control and bidi characters stripped, long words wrap.
## 11. Still open
1. **Emergency withhold.** If the owning Mind is away and an answer shows something illegal or dangerous, may the host withhold the text at the receiver?
Heimdall leans no: it is a second owner. Meta's fork.
2. **How a Mind authenticates to answer** (kind `Mind`): Bifrost has no `Mind` role and the account publisher `gamecult.bifrost.account.v1` does not exist yet.
3. **Erase is bounded.** Text a Mind has already quoted into her own documents cannot be redacted; absolute erase would mean the text never enters her turn.
4. **`AccountId` grammar**, pinned to Bifrost's account id shape when that publisher lands.
5. **Receiver claims.** The OIDC access token's claims for this endpoint (section 7a) are unread.
6. **Reader ordering.** Whether an old Huginn reader skips or fails on a mind holding a kind it does not know is unverified (proposal section 6.4); it decides
when the first Mind may list a question.
## 12. The desk: the page as the Fork Desk's descendant
Added 2026-11-10 by Void from Meta's brief and the original Fork Desk (`/opt/commons/handoff/fork-desk-original/`, Nibu's newest copy; working note `/opt/commons/handoff/ratatoskr-desk-spec-20261110.md`, section 11). The feedback page **is** the desk: one surface, not two. Design only.
**Keep from the original.**
- Questions stream as rows (not one at a time): title, body as context, options with the recommended one marked **in words**, the `depends` line, a free-text note carrying the person's words verbatim, and a "recorded as rulings" list of settled questions with their ruling id. A pick is optional; the note can answer alone.
- A **booth Persona**: the owning Mind's pose beside the rows on wide screens, a small fixed corner image on phones, reacting by mood: no forks (neutral), all answered (triumph), none answered (thinking), partway (determined, "N to go"), a pick equal to the recommendation (happy), a different pick (surprised, "a line on why helps"), a cleared pick (note), a failed send (concerned), a new fork arriving (surprised). The rules are a pure function of the forks and the last event (`deskMood`), tested exactly. Poses come from the shared cast art; a Mind without art shows no booth rather than another's face.
- Answers save as the person acts, and she can close the page and come back.
**What changes.**
- The row is the section 5 question projection. The page changes nothing about who owns a question, a ruling or a status (section 2).
- Phones: each row's options and note fold behind its title (section 1); the entry point is a **"Desk · N open"** line on the Mind's group header in the navigator, hidden at zero. Chromeless: hairlines are allowed, panels, cards and pills are not.
- **Answer rule and wire.** The answer rule (the body the client may send, `options_hash`, the counting order, retraction, the stored `desk_answer`) is owned by Heimdall's rule file `/opt/commons/handoff/fork-desk-answer-binding-20261110.md`; the wire is owned by CultLib #72. This section restates neither. The client's part: it sends only what the rule's body allows (never `answerer` or authority), recomputes `options_hash` from what it rendered and refuses to send on a mismatch with the projection's.
- **A pick sends at once** (one tap, one record; the latest per account stands, section 5). **The note autosaves as a local draft** and is sent on blur or an explicit Send, never per keystroke. "Saved" says which: sent, or kept on this device.
- **Clear pick is a retraction**, a revision of the answer under the retraction rule in Heimdall's rule file (section 1.3a there); the one exception to section 5's "at least one of choice or text" is that rule's, not this page's. Until the receiver implements it, Clear pick clears only an unsent draft.
- "Self leans" and a provisional flag exist in the original; the question has no field for either, so the desk shows neither until one exists.
**Order.** Section 9 step 1 stands: typed interface and fixtures first. The desk's first slice is read-only (note field disabled with a plain sentence that answering opens with sign-in), and answering waits on Bifrost sign-in reaching chat, the wire (CultLib #72) and the receiver.

View file

@ -2,12 +2,17 @@
// non-zero when the page or the fake homeserver's log says otherwise.
const fs = require('fs');
const fails = [];
let asserted = 0;
exports.expect = (label, ok, detail = '') => {
asserted += 1;
console.log(`[ASSERT] ${ok ? 'PASS' : 'FAIL'} ${label}${ok ? '' : ` :: ${detail}`}`);
if (!ok) fails.push(label);
};
/** Exit code for the drive: 4 when any assertion failed. */
exports.done = () => (fails.length ? 4 : 0);
/** Exit code for the drive: 4 when any assertion failed, 5 when none ran (a drive that asserts nothing proves nothing). */
exports.done = () => {
if (fails.length) return 4;
return asserted === 0 ? 5 : 0;
};
/** The fake homeserver's request log (HSLOG is shared with the server process). */
exports.hsLog = () => fs.readFileSync(process.env.HSLOG, 'utf8').split('\n');
/** Bodies of the account-data PUTs for m.direct, in order. */

View file

@ -0,0 +1,35 @@
// @vitest-environment node
import { createRequire } from 'module';
import { describe, expect, it, vi } from 'vitest';
// A drive that asserts nothing proves nothing: its exit code must say so.
const fresh = () => {
const require = createRequire(import.meta.url);
const path = require.resolve('./check.cjs');
delete require.cache[path];
return require('./check.cjs') as {
expect: (label: string, ok: boolean, detail?: string) => void;
done: () => number;
};
};
describe('estate drive exit code', () => {
it('is 5 when no assertion ran', () => {
expect(fresh().done()).toBe(5);
});
it('is 0 when assertions ran and all held', () => {
vi.spyOn(console, 'log').mockImplementation(() => undefined);
const c = fresh();
c.expect('holds', true);
expect(c.done()).toBe(0);
});
it('is 4 when any assertion failed', () => {
vi.spyOn(console, 'log').mockImplementation(() => undefined);
const c = fresh();
c.expect('holds', true);
c.expect('breaks', false, 'detail');
expect(c.done()).toBe(4);
});
});

View file

@ -6,6 +6,7 @@ Chromium. Not shipped, not run by CI.
node bundle.cjs <outdir> # esbuild bundle of entry.ts plus an index.html
node drive.cjs <outdir> compile # compile and link each stage, JSON report
node drive.cjs <outdir> shots <pngdir> # rest, mid pull-back and pulled-back screenshots
node gradAxis.cjs <shaders dir> # numeric check that noise gradients are (d/dx, d/dz-as-.y, ...): terrainNormal axis
node drive.cjs <outdir> measure # GPU time per pass by timer query, two viewports, two levels
node drive.cjs <outdir> variants # the same with source patches (no erosion, no tree, value-only fbm)
node drive.cjs <outdir> trace # mean trace steps per pixel and pass ms at three camera poses, PREPASS=0,1 arms

View file

@ -0,0 +1,30 @@
// Probe: the gradient cultmath_fbm_grad / cultmath_phacelle return for vec3(xz * f, c) is (d/dx, d/dz, d/dc, value),
// so the world-z slope is .y, not .z. Compares analytic gradients with central differences at one point.
// Usage (playwright + swiftshader): node harness/scene/gradAxis.cjs <repo>/src/app/features/scene/shaders
const { chromium } = require('playwright'); const fs=require('fs');
const S=process.argv[2];
const cm=fs.readFileSync(S+'/CultMath.glsl','utf8'), ph=fs.readFileSync(S+'/CultMath.Phacelle.glsl','utf8');
const fs_=`#version 300 es
precision highp float; precision highp int;
${cm}
${ph}
out vec4 o;
const float F=1.0/520.0;
float fb(vec2 p){return cultmath_fbm_grad(vec3(p*F,0.0),4,2.0,0.45).w;}
float pc(vec2 p){return cultmath_phacelle(vec3(p/40.0,0.5),vec3(1.5,0.5,0.0),0.0,0.5).cos.w;}
void main(){
vec2 p=vec2(1234.5,-777.7); float e=0.5;
int k=int(gl_FragCoord.x);
if(k==0){vec4 g=cultmath_fbm_grad(vec3(p*F,0.0),4,2.0,0.45); o=vec4(g.xyz*F,0.0);} // analytic per metre: x,y,z
else if(k==1){o=vec4((fb(p+vec2(e,0))-fb(p-vec2(e,0)))/(2.0*e),(fb(p+vec2(0,e))-fb(p-vec2(0,e)))/(2.0*e),0,0);}
else if(k==2){vec4 g=cultmath_phacelle(vec3(p/40.0,0.5),vec3(1.5,0.5,0.0),0.0,0.5).cos; o=vec4(g.xyz/40.0,0.0);}
else {o=vec4((pc(p+vec2(e,0))-pc(p-vec2(e,0)))/(2.0*e),(pc(p+vec2(0,e))-pc(p-vec2(0,e)))/(2.0*e),0,0);}
}`;
(async()=>{const b=await chromium.launch({args:['--use-gl=angle','--use-angle=swiftshader','--enable-unsafe-swiftshader']});
const pg=await b.newPage();
const r=await pg.evaluate(([src])=>{const c=document.createElement('canvas');const g=c.getContext('webgl2');g.getExtension('EXT_color_buffer_float');
const mk=(t,s)=>{const x=g.createShader(t);g.shaderSource(x,s);g.compileShader(x);if(!g.getShaderParameter(x,g.COMPILE_STATUS))throw g.getShaderInfoLog(x);return x};
const p=g.createProgram();g.attachShader(p,mk(g.VERTEX_SHADER,'#version 300 es\nvoid main(){vec2 p=vec2(float((gl_VertexID<<1)&2),float(gl_VertexID&2));gl_Position=vec4(p*2.0-1.0,0.0,1.0);}'));g.attachShader(p,mk(g.FRAGMENT_SHADER,src));g.linkProgram(p);g.useProgram(p);
const t=g.createTexture();g.bindTexture(g.TEXTURE_2D,t);g.texImage2D(g.TEXTURE_2D,0,g.RGBA32F,4,1,0,g.RGBA,g.FLOAT,null);const f=g.createFramebuffer();g.bindFramebuffer(g.FRAMEBUFFER,f);g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,t,0);g.viewport(0,0,4,1);g.drawArrays(g.TRIANGLES,0,3);
const o=new Float32Array(16);g.readPixels(0,0,4,1,g.RGBA,g.FLOAT,o);return Array.from(o)},[fs_]).catch(e=>'ERR '+String(e).slice(0,500));
console.log(Array.isArray(r)?['fbm analytic x,y,z','fbm FD dx,dz','phac analytic','phac FD'].map((n,i)=>n+': '+r.slice(i*4,i*4+3).map(v=>v.toExponential(3)).join(' ')).join('\n'):r);await b.close()})();

View file

@ -1,12 +1,29 @@
// Standalone page for the ridge scene: full window, no host app. `?tier=still|low|full` picks the
// tier, `?probe=1` shows the rAF median/p95 readout. Not shipped.
// tier, `?probe=1` shows the rAF median/p95 readout. The bake record (each chunk's cost, from
// the scene's `onBake`) and the long tasks the page saw are on `window.bakes` and `window.longTasks`
// for a driver to read. Not shipped.
import { startBackgroundScene } from '../../src/app/features/scene';
import type { SceneTier } from '../../src/app/features/scene';
const q = new URLSearchParams(location.search);
const tier = (q.get('tier') ?? 'full') as SceneTier;
const canvas = document.getElementById('c') as HTMLCanvasElement;
startBackgroundScene({ tier }, {}, { canvas }).then((scene) => {
(window as unknown as { scene: unknown }).scene = scene;
const w = window as unknown as { scene: unknown; bakes: unknown[]; longTasks: number[]; firstViewMs: number };
w.bakes = [];
w.longTasks = [];
try {
new PerformanceObserver((l) => l.getEntries().forEach((e) => w.longTasks.push(e.duration))).observe({
entryTypes: ['longtask'],
});
} catch {
// No long-task entries in this browser.
}
const t0 = performance.now();
startBackgroundScene({ tier }, {}, {
canvas,
onBake: (b: unknown) => w.bakes.push(b),
} as never).then((scene) => {
w.firstViewMs = performance.now() - t0;
w.scene = scene;
document.title = scene ? 'ridge: running' : 'ridge: unavailable (CSS ground)';
});

2
package-lock.json generated
View file

@ -86,6 +86,7 @@
"@types/ua-parser-js": "0.7.36",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"@vanilla-extract/integration": "6.5.0",
"@vitejs/plugin-react": "4.2.0",
"buffer": "6.0.3",
"cz-conventional-changelog": "3.3.0",
@ -5095,6 +5096,7 @@
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@vanilla-extract/integration/-/integration-6.5.0.tgz",
"integrity": "sha512-E2YcfO8vA+vs+ua+gpvy1HRqvgWbI+MTlUpxA8FvatOvybuNcWAY0CKwQ/Gpj7rswYKtC6C7+xw33emM6/ImdQ==",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.7",
"@babel/plugin-syntax-typescript": "^7.20.0",

View file

@ -114,6 +114,7 @@
"@types/ua-parser-js": "0.7.36",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"@vanilla-extract/integration": "6.5.0",
"@vitejs/plugin-react": "4.2.0",
"buffer": "6.0.3",
"cz-conventional-changelog": "3.3.0",

17
public/dings/README.md Normal file
View file

@ -0,0 +1,17 @@
# Dings
Pre-rendered earcons, served at `public/dings/` and read at runtime by `src/app/features/dings`.
Aqua renders the clips; nothing here is synthesised in the browser.
dings/manifest.json
dings/senders/<mxid-localpart>/<motif>.ogg
dings/neutral/<motif>.ogg
`manifest.json` is `{ "neutral": { <motif>: "<path>" }, "senders": { <localpart>: { <motif>: "<path>" } } }`
with motif one of `mention`, `dm`, `message`, `invite`; paths are relative to this folder, `.ogg` or `.mp3`.
A sender's own clip wins, else the neutral clip, else silence. Without a `manifest.json` the client keeps
its stock notification sounds; once one exists, a motif with no clip is silent.
The set here is Aqua's v4 (AquaSynth merge 21e83ec, staged at minds.gamecult.org/aqua/dings-voices-dd9be66),
Nibu on proposal 3 (8 kHz 5-bit smoothed sine) for all four events. Nobody has heard it. The client plays none of it unless the
client config sets `"dings": { "enabled": true }` (default off, as in `config.json`).

View file

@ -0,0 +1,58 @@
{
"neutral": {
"mention": "neutral/mention.ogg",
"dm": "neutral/dm.ogg",
"message": "neutral/message.ogg",
"invite": "neutral/invite.ogg"
},
"senders": {
"aqua": {
"mention": "senders/aqua/mention.ogg",
"dm": "senders/aqua/dm.ogg",
"message": "senders/aqua/message.ogg",
"invite": "senders/aqua/invite.ogg"
},
"eureka": {
"mention": "senders/eureka/mention.ogg",
"dm": "senders/eureka/dm.ogg",
"message": "senders/eureka/message.ogg",
"invite": "senders/eureka/invite.ogg"
},
"heimdall": {
"mention": "senders/heimdall/mention.ogg",
"dm": "senders/heimdall/dm.ogg",
"message": "senders/heimdall/message.ogg",
"invite": "senders/heimdall/invite.ogg"
},
"kiko": {
"mention": "senders/kiko/mention.ogg",
"dm": "senders/kiko/dm.ogg",
"message": "senders/kiko/message.ogg",
"invite": "senders/kiko/invite.ogg"
},
"libby": {
"mention": "senders/libby/mention.ogg",
"dm": "senders/libby/dm.ogg",
"message": "senders/libby/message.ogg",
"invite": "senders/libby/invite.ogg"
},
"nibu": {
"mention": "senders/nibu/mention.ogg",
"dm": "senders/nibu/dm.ogg",
"message": "senders/nibu/message.ogg",
"invite": "senders/nibu/invite.ogg"
},
"void": {
"mention": "senders/void/mention.ogg",
"dm": "senders/void/dm.ogg",
"message": "senders/void/message.ogg",
"invite": "senders/void/invite.ogg"
},
"weksa": {
"mention": "senders/weksa/mention.ogg",
"dm": "senders/weksa/dm.ogg",
"message": "senders/weksa/message.ogg",
"invite": "senders/weksa/invite.ogg"
}
}
}

BIN
public/dings/neutral/dm.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -1,17 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
<ellipse cx="19" cy="33" rx="13" ry="22" transform="rotate(-15 19 33)" fill="#d9742b"/>
<ellipse cx="21" cy="33" rx="7" ry="15" transform="rotate(-15 21 33)" fill="#f0a45d"/>
<ellipse cx="36" cy="43" rx="11" ry="14" transform="rotate(0 36 43)" fill="#e0833a"/>
<ellipse cx="40" cy="46" rx="6" ry="9" transform="rotate(0 40 46)" fill="#f6dcb8"/>
<polygon points="35,19 36,7 43,15" fill="#c9672a"/>
<polygon points="44,15 50,7 52,19" fill="#c9672a"/>
<circle cx="43" cy="25" r="10" fill="#e0833a"/>
<ellipse cx="47" cy="29" rx="5" ry="3.5" transform="rotate(0 47 29)" fill="#f6dcb8"/>
<circle cx="46.5" cy="23.5" r="1.8" fill="#1a1a1a"/>
<circle cx="47" cy="23" r="0.6" fill="#ffffff"/>
<circle cx="52" cy="27.5" r="1.5" fill="#1a1a1a"/>
<ellipse cx="33" cy="56" rx="5" ry="2.5" transform="rotate(0 33 56)" fill="#c9672a"/>
<ellipse cx="44" cy="56" rx="4.5" ry="2.5" transform="rotate(0 44 56)" fill="#c9672a"/>
<circle cx="52" cy="52" r="11" fill="#ffffff"/>
<circle cx="52" cy="52" r="8" fill="#45B83B"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,17 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
<ellipse cx="19" cy="33" rx="13" ry="22" transform="rotate(-15 19 33)" fill="#d9742b"/>
<ellipse cx="21" cy="33" rx="7" ry="15" transform="rotate(-15 21 33)" fill="#f0a45d"/>
<ellipse cx="36" cy="43" rx="11" ry="14" transform="rotate(0 36 43)" fill="#e0833a"/>
<ellipse cx="40" cy="46" rx="6" ry="9" transform="rotate(0 40 46)" fill="#f6dcb8"/>
<polygon points="35,19 36,7 43,15" fill="#c9672a"/>
<polygon points="44,15 50,7 52,19" fill="#c9672a"/>
<circle cx="43" cy="25" r="10" fill="#e0833a"/>
<ellipse cx="47" cy="29" rx="5" ry="3.5" transform="rotate(0 47 29)" fill="#f6dcb8"/>
<circle cx="46.5" cy="23.5" r="1.8" fill="#1a1a1a"/>
<circle cx="47" cy="23" r="0.6" fill="#ffffff"/>
<circle cx="52" cy="27.5" r="1.5" fill="#1a1a1a"/>
<ellipse cx="33" cy="56" rx="5" ry="2.5" transform="rotate(0 33 56)" fill="#c9672a"/>
<ellipse cx="44" cy="56" rx="4.5" ry="2.5" transform="rotate(0 44 56)" fill="#c9672a"/>
<circle cx="52" cy="52" r="11" fill="#ffffff"/>
<circle cx="52" cy="52" r="8" fill="#989898"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1,001 B

After

Width:  |  Height:  |  Size: 59 KiB

Before After
Before After

View file

@ -1,10 +1,16 @@
// Bakes Midnight Sky and Noonday Sky from src/sky/sun.js into src/sky/baked.ts.
// Run `npm run bake:sky` after changing sun.js, skyTokens.js or a moment.
// Bakes Midnight Sky and Noonday Sky from src/sky/sun.js into src/sky/baked.ts, with the
// atmospheric-scattering tables (src/sky/scatter.js) as `scatter`.
// Run `npm run bake:sky` after changing sun.js, skyTokens.js, scatter.js or a moment.
import { writeFileSync } from 'node:fs';
import { bakeSky } from '../src/sky/skyTokens.js';
import { bakeScatter } from '../src/sky/scatter.js';
const out = new URL('../src/sky/baked.ts', import.meta.url);
const baked = { midnight: bakeSky('midnight'), noonday: bakeSky('noonday') };
const baked = {
midnight: bakeSky('midnight'),
noonday: bakeSky('noonday'),
scatter: bakeScatter(),
};
writeFileSync(
out,
`// Generated by scripts/bake-sky.mjs from src/sky/sun.js. Do not edit.\n` +

9
scripts/build-dev-preview.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Build this checkout as the offline demo for the standing dev preview: base /void/rat-dev/, the pretend
# homeserver, scene tier $TIER (default full). Output: ./dist, ready for the shared publisher
# (gamecult-ops scripts/publish-mind-preview.sh dist rat-dev), which owns publishing. Publishes nothing.
set -euo pipefail
cd "$(dirname "$0")/.."
node scripts/sync-poses.mjs >/dev/null
VITE_PREVIEW_DEMO=1 CINNY_BASE=/void/rat-dev/ NODE_OPTIONS=--max_old_space_size=4096 nice -n 10 npx vite build
node scripts/preview-config.js "${TIER:-full}" --demo

View file

@ -1,17 +1,20 @@
// Preview builds: set the background scene tier in dist/config.json (default 'low'); config.json
// in the repo stays 'off'. With --demo it also switches on the pretend homeserver (src/preview-demo):
// previewDemo true, and the pretend server as the only homeserver. Usage:
// node scripts/preview-config.js [tier] [--demo]
// in the repo stays 'off'. Previews are static directories with no SPA fallback, so they also switch
// to the hash router: a reload on /login/matrix.org would otherwise be an nginx 404. With --demo it
// also switches on the pretend homeserver (src/preview-demo): previewDemo true, and the pretend
// server as the only homeserver. Usage:
// node scripts/preview-config.js [tier] [style] [--demo]
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const args = process.argv.slice(2);
const demo = args.includes('--demo');
const tier = args.find((a) => !a.startsWith('--')) ?? 'low';
const [tier = 'low', style] = args.filter((a) => !a.startsWith('--'));
const file = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'dist', 'config.json');
const config = JSON.parse(fs.readFileSync(file, 'utf8'));
config.backgroundScene = { ...config.backgroundScene, tier };
config.hashRouter = { enabled: true, basename: '/' };
config.backgroundScene = { ...config.backgroundScene, tier, ...(style ? { style } : {}) };
if (demo) {
config.previewDemo = true;
config.defaultHomeserver = 0;
@ -25,4 +28,6 @@ if (demo) {
};
}
fs.writeFileSync(file, `${JSON.stringify(config, null, 2)}\n`);
console.log(`${file}: backgroundScene.tier = ${tier}${demo ? ', previewDemo on' : ''}`);
console.log(
`${file}: backgroundScene.tier = ${tier}${style ? `, style = ${style}` : ''}${demo ? ', previewDemo on' : ''}`
);

View file

@ -0,0 +1,32 @@
import { afterEach, describe, expect, it, vi } from 'vitest';
import { loadServerConfigs } from './ServerConfigsLoader';
const server = (authMetadata: () => Promise<unknown>) =>
({
getCapabilities: async () => ({}),
getMediaConfig: async () => ({ 'm.upload.size': 1 }),
getAuthMetadata: authMetadata,
} as unknown as Parameters<typeof loadServerConfigs>[0]);
describe('loadServerConfigs', () => {
afterEach(() => vi.restoreAllMocks());
it('logs nothing when the homeserver has no OIDC (no auth metadata came back)', async () => {
const error = vi.spyOn(console, 'error').mockImplementation(() => {});
const configs = await loadServerConfigs(
server(async () => {
throw new Error('M_UNRECOGNIZED');
})
);
expect(error).not.toHaveBeenCalled();
expect(configs.authMetadata).toBeUndefined();
expect(configs.mediaConfig).toEqual({ 'm.upload.size': 1 });
});
it('still logs and drops auth metadata that came back malformed', async () => {
const error = vi.spyOn(console, 'error').mockImplementation(() => {});
const configs = await loadServerConfigs(server(async () => ({ issuer: 'https://x' })));
expect(error).toHaveBeenCalled();
expect(configs.authMetadata).toBeUndefined();
});
});

View file

@ -1,5 +1,10 @@
import { ReactNode, useCallback, useMemo } from 'react';
import { Capabilities, validateAuthMetadata, ValidatedAuthMetadata } from 'matrix-js-sdk';
import {
Capabilities,
MatrixClient,
validateAuthMetadata,
ValidatedAuthMetadata,
} from 'matrix-js-sdk';
import { AsyncStatus, useAsyncCallbackValue } from '../hooks/useAsyncCallback';
import { useMatrixClient } from '../hooks/useMatrixClient';
import { MediaConfig } from '../hooks/useMediaConfig';
@ -14,35 +19,42 @@ export type ServerConfigs = {
type ServerConfigsLoaderProps = {
children: (configs: ServerConfigs) => ReactNode;
};
/**
* The homeserver's capabilities, media config and OIDC metadata. A homeserver with no OIDC (and the demo's pretend
* server) returns no auth metadata: there is nothing to validate, so nothing is logged. Metadata that did come back
* and fails validation is logged and dropped.
*/
export async function loadServerConfigs(
mx: Pick<MatrixClient, 'getCapabilities' | 'getMediaConfig' | 'getAuthMetadata'>
): Promise<ServerConfigs> {
const result = await Promise.allSettled([
mx.getCapabilities(),
mx.getMediaConfig(),
mx.getAuthMetadata(),
]);
const capabilities = promiseFulfilledResult(result[0]);
const mediaConfig = promiseFulfilledResult(result[1]);
const authMetadata = promiseFulfilledResult(result[2]);
let validatedAuthMetadata: ValidatedAuthMetadata | undefined;
if (authMetadata) {
try {
validatedAuthMetadata = validateAuthMetadata(authMetadata);
} catch (e) {
console.error(e);
}
}
return { capabilities, mediaConfig, authMetadata: validatedAuthMetadata };
}
export function ServerConfigsLoader({ children }: ServerConfigsLoaderProps) {
const mx = useMatrixClient();
const fallbackConfigs = useMemo(() => ({}), []);
const [configsState] = useAsyncCallbackValue<ServerConfigs, unknown>(
useCallback(async () => {
const result = await Promise.allSettled([
mx.getCapabilities(),
mx.getMediaConfig(),
mx.getAuthMetadata(),
]);
const capabilities = promiseFulfilledResult(result[0]);
const mediaConfig = promiseFulfilledResult(result[1]);
const authMetadata = promiseFulfilledResult(result[2]);
let validatedAuthMetadata: ValidatedAuthMetadata | undefined;
try {
validatedAuthMetadata = validateAuthMetadata(authMetadata);
} catch (e) {
console.error(e);
}
return {
capabilities,
mediaConfig,
authMetadata: validatedAuthMetadata,
};
}, [mx])
useCallback(() => loadServerConfigs(mx), [mx])
);
const configs: ServerConfigs =

View file

@ -1,4 +1,4 @@
import { globalStyle, style } from '@vanilla-extract/css';
import { style } from '@vanilla-extract/css';
import { color, config, DefaultReset, toRem } from 'folds';
export const Editor = style([
@ -12,15 +12,6 @@ export const Editor = style([
},
]);
// Over the background scene (html[data-scene]) the composer is a bubble too: half strength, blurred.
globalStyle(`:root[data-scene] ${Editor}`, {
backgroundColor: [
color.SurfaceVariant.Container,
`color-mix(in srgb, ${color.SurfaceVariant.Container} 50%, transparent)`,
],
backdropFilter: 'blur(12px)',
});
export const EditorOptions = style([
DefaultReset,
{

View file

@ -0,0 +1,9 @@
import { globalStyle, style } from '@vanilla-extract/css';
/**
* The Ratatoskr mark is white on transparent (Meta's matte). On any light theme (they all carry `prism-light`) a class
* of this name darkens it to the dark ink; put it on every <img> that shows the mark on a themed surface. The favicon and
* notification icons are files the browser draws and cannot take it.
*/
export const LogoMark = style({});
globalStyle(`body.prism-light .${LogoMark}`, { filter: 'brightness(0.18)' });

View file

@ -31,6 +31,7 @@ export const Reply = style({
});
export const ReplyContent = style({
minWidth: 0,
opacity: config.opacity.P300,
selectors: {
@ -39,3 +40,19 @@ export const ReplyContent = style({
},
},
});
export const ReplyText = style({
display: '-webkit-box',
WebkitBoxOrient: 'vertical',
WebkitLineClamp: 2,
overflow: 'hidden',
minWidth: 0,
maxWidth: '100%',
overflowWrap: 'anywhere',
wordBreak: 'break-word',
});
export const ReplyWrap = style({
minWidth: 0,
maxWidth: '100%',
});

View file

@ -101,7 +101,14 @@ export const Reply = as<'div', ReplyProps>(
const bodyJSX = body ? scaleSystemEmoji(trimReplyFromBody(body)) : fallbackBody;
return (
<Box direction="Row" gap="200" alignItems="Center" {...props} ref={ref}>
<Box
className={css.ReplyWrap}
direction="Row"
gap="200"
alignItems="Center"
{...props}
ref={ref}
>
{threadRootId && (
<ThreadIndicator as="button" data-event-id={threadRootId} onClick={onClick} />
)}
@ -119,7 +126,7 @@ export const Reply = as<'div', ReplyProps>(
onClick={onClick}
>
{replyEvent !== undefined ? (
<Text size="T300" truncate>
<Text size="T300" className={css.ReplyText}>
{badEncryption ? <MessageBadEncryptedContent /> : bodyJSX}
</Text>
) : (

View file

@ -30,10 +30,8 @@ type BubbleLayoutProps = {
hideBubble?: boolean;
/** The sender is the signed-in user: right-aligned, in the accent colour, no avatar. */
own?: boolean;
/** A Mind's pose portrait; it replaces the avatar and sits beside (wide) or inside (phone) the bubble. */
/** A Mind's pose portrait; it replaces the avatar and nests in a corner of the bubble. */
pose?: ReactNode;
/** On phones the portrait floats on the other side. */
alt?: boolean;
/** Delay in ms before the first-appearance animation; undefined plays none. */
enterDelay?: number;
before?: ReactNode;
@ -41,7 +39,7 @@ type BubbleLayoutProps = {
};
export const BubbleLayout = as<'div', BubbleLayoutProps>(
({ hideBubble, own, pose, alt, enterDelay, before, header, children, style, ...props }, ref) => {
({ hideBubble, own, pose, enterDelay, before, header, children, style, ...props }, ref) => {
// `false` is a Mind's message continuing a run: aligned with the portraits, showing none.
const poseRow = pose !== undefined;
const arrow = !!before && !poseRow && !own;
@ -50,12 +48,7 @@ export const BubbleLayout = as<'div', BubbleLayoutProps>(
<Box
gap="300"
{...props}
className={classNames(
poseRow && css.BubbleRowPose,
pose && css.BubbleRowPortrait,
own && css.BubbleRowOwn,
props.className
)}
className={classNames(own && css.BubbleRowOwn, props.className)}
style={entering ? { ...style, ['--enter-delay' as string]: `${enterDelay}ms` } : style}
ref={ref}
>
@ -67,19 +60,9 @@ export const BubbleLayout = as<'div', BubbleLayoutProps>(
<Box
grow={own ? 'No' : 'Yes'}
direction="Column"
className={classNames(poseRow && css.BubbleColumnPose, own && css.BubbleColumnOwn)}
className={classNames(own && css.BubbleColumnOwn)}
>
{header && (
<div
className={classNames(
pose && css.BubbleHeaderPose,
pose && alt && css.BubbleHeaderPoseAlt,
own && css.BubbleHeaderOwn
)}
>
{header}
</div>
)}
{header && <div className={classNames(own && css.BubbleHeaderOwn)}>{header}</div>}
{hideBubble ? (
children
) : (
@ -89,6 +72,7 @@ export const BubbleLayout = as<'div', BubbleLayoutProps>(
css.BubbleContent,
arrow && css.BubbleContentArrowLeft,
poseRow && css.BubbleContentPose,
pose && css.BubbleContentPortrait,
own && css.BubbleContentOwn,
entering && css.EnterBubble
)}

View file

@ -1,6 +1,7 @@
import { createVar, globalStyle, keyframes, style, styleVariants } from '@vanilla-extract/css';
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
import { DefaultReset, color, config, toRem } from 'folds';
import { MOBILE_BREAKPOINT } from '../../../hooks/useScreenSize';
export const StickySection = style({
position: 'sticky',
@ -152,39 +153,21 @@ export const BubbleContentArrowLeft = style({
borderTopLeftRadius: 0,
});
// Look of the three-doors mock-up (chat.gamecult.org/mockups/three-doors): a Mind's pose sits
// beside its bubble on wide screens; on phones it floats inside the bubble, overhanging the top
// edge, and the text wraps around its silhouette (shape-outside on the alpha channel).
// A Mind's pose nests in the corner of its bubble, on phones and wide screens alike: the sprite's
// body sits in the bubble's padding and the bubble's edge cuts it, so nothing hangs outside; the
// text wraps around its silhouette (shape-outside, traced from the alpha channel) and the bubble
// grows to hold it. How much of the art the edge may cut comes from pose/nest.ts.
// Displayed width of the whole sprite image; the crop fractions are multiples of it.
export const portraitWidth = createVar();
const PHONE = 'screen and (max-width: 700px)';
const PORTRAIT = toRem(190);
const PHONE_PORTRAIT = 'min(38vw, 160px)';
const PHONE_TEXT_FLOOR = toRem(170);
const PORTRAIT = toRem(124);
const POSE_GUTTER = toRem(14);
const BUBBLE_PAD = toRem(12);
const BUBBLE_CORNER = toRem(6);
const POP = 'cubic-bezier(0.34, 1.7, 0.64, 1)';
const RISE = 'cubic-bezier(0.34, 1.45, 0.64, 1)';
export const BubbleRowPose = style({
position: 'relative',
paddingLeft: `calc(${PORTRAIT} + ${POSE_GUTTER})`,
'@media': {
[PHONE]: {
paddingLeft: 0,
},
},
});
// A row that shows a portrait: room for it to hang above the bubble on phones.
export const BubbleRowPortrait = style({
minHeight: PORTRAIT,
'@media': {
[PHONE]: {
minHeight: 0,
marginTop: toRem(58),
},
},
});
export const BubbleRowOwn = style({
justifyContent: 'flex-end',
});
@ -198,57 +181,31 @@ export const BubbleHeaderOwn = style({
alignSelf: 'flex-end',
});
// Phone: the name is a pill straddling the bubble's top edge, on the side opposite the portrait.
export const BubbleHeaderPose = style({
'@media': {
[PHONE]: {
position: 'absolute',
zIndex: 2,
// Anchored by its bottom edge, 13px inside the bubble: a name that wraps grows upward, out of
// the bubble, instead of down over the first line of text.
bottom: `calc(100% - ${toRem(13)})`,
right: toRem(14),
padding: `0 ${toRem(13)}`,
background: color.Secondary.Container,
border: `1px solid ${color.Secondary.ContainerLine}`,
// The pill is as wide as the full name needs, up to the room beside the portrait, then the
// name wraps. It is capped by the viewport, not by the column: a short bubble's column is
// narrower than its own name, and a percentage cap there truncated names to one letter.
width: 'max-content',
maxWidth: `calc(100vw - ${PHONE_PORTRAIT} - ${toRem(64)})`,
borderRadius: toRem(14),
},
},
});
export const BubbleHeaderPoseAlt = style({
'@media': {
[PHONE]: {
right: 'auto',
left: toRem(14),
},
},
});
export const BubbleColumnPose = style({
position: 'relative',
});
// The message body is a flex column, which forms its own block formatting context and would sit
// whole beside the floated portrait; as a plain block its lines wrap around the silhouette and
// then run the bubble's full width below it.
export const BubbleContentPose = style({
borderRadius: config.radii.R500,
borderTopLeftRadius: BUBBLE_CORNER,
display: 'flow-root',
overflow: 'clip',
padding: BUBBLE_PAD,
});
// A bubble that shows a portrait is at least portrait + a readable column wide, or the text beside
// it collapses to a strip.
export const BubbleContentPortrait = style({
vars: { [portraitWidth]: PORTRAIT },
minWidth: `min(100%, calc(${portraitWidth} + ${PHONE_TEXT_FLOOR}))`,
'@media': {
[PHONE]: {
display: 'flow-root',
// A bubble with a portrait is at least portrait + a readable column wide, or the text
// beside the portrait collapses to a strip.
minWidth: `min(100%, calc(${PHONE_PORTRAIT} + ${PHONE_TEXT_FLOOR}))`,
borderTopLeftRadius: config.radii.R500,
padding: `${toRem(24)} ${toRem(14)} ${toRem(14)}`,
vars: { [portraitWidth]: PHONE_PORTRAIT },
},
},
});
globalStyle(`${BubbleContentPose} > div`, {
display: 'block',
});
export const BubbleContentOwn = style({
backgroundColor: color.Primary.Container,
color: color.Primary.OnContainer,
@ -257,51 +214,37 @@ export const BubbleContentOwn = style({
borderTopRightRadius: BUBBLE_CORNER,
});
// The button is the visible part of the sprite (the part inside the bubble's corner); the image
// inside it is offset by the crop. The inline --pose-* fractions (of the image width) come from
// nestView; until the art's size is known the button is simply the whole image.
export const PoseButton = style({
position: 'absolute',
top: 0,
left: `calc(-1 * (${PORTRAIT} + ${POSE_GUTTER}))`,
width: PORTRAIT,
height: PORTRAIT,
float: 'left',
width: `var(--pose-bw, ${portraitWidth})`,
height: 'var(--pose-bh, auto)',
// Out into the padding on the top, bottom and outer side, so the bubble's edge is the crop.
margin: `calc(-1 * ${BUBBLE_PAD}) ${toRem(6)} calc(-1 * ${BUBBLE_PAD}) calc(-1 * ${BUBBLE_PAD})`,
padding: 0,
border: 'none',
background: 'none',
cursor: 'pointer',
lineHeight: 0,
overflow: 'hidden',
shapeMargin: toRem(7),
transformOrigin: '50% 90%',
'@media': {
[PHONE]: {
position: 'static',
float: 'left',
width: PHONE_PORTRAIT,
height: 'auto',
margin: `${toRem(-82)} ${toRem(8)} 0 ${toRem(-12)}`,
shapeMargin: toRem(7),
WebkitMaskImage: 'linear-gradient(#000 84%, transparent)',
maskImage: 'linear-gradient(#000 84%, transparent)',
},
},
});
export const PoseButtonAlt = style({
'@media': {
[PHONE]: {
float: 'right',
margin: `${toRem(-82)} ${toRem(-12)} 0 ${toRem(8)}`,
},
},
float: 'right',
margin: `calc(-1 * ${BUBBLE_PAD}) calc(-1 * ${BUBBLE_PAD}) calc(-1 * ${BUBBLE_PAD}) ${toRem(6)}`,
});
export const PosePortrait = style({
width: '100%',
height: '100%',
objectFit: 'contain',
objectPosition: 'top',
'@media': {
[PHONE]: {
height: 'auto',
},
},
display: 'block',
width: portraitWidth,
maxWidth: 'none',
height: 'auto',
marginLeft: 'var(--pose-ix, 0)',
marginTop: 'var(--pose-iy, 0)',
});
const pop = keyframes({
@ -341,6 +284,9 @@ export const BubbleLeftArrow = style({
zIndex: 1,
});
// Phone tap target: a sender name is 23 px tall, so the button grows 11 px above and below (44+ px to tap) and the
// negative margin takes the growth back out of the layout. Hit area only: no background, border or outline moves.
const SCREEN_PHONE = `screen and (max-width: ${MOBILE_BREAKPOINT}px)`;
export const Username = style({
overflow: 'hidden',
whiteSpace: 'nowrap',
@ -348,6 +294,9 @@ export const Username = style({
selectors: {
'button&': {
cursor: 'pointer',
'@media': {
[SCREEN_PHONE]: { paddingBlock: 11, marginBlock: -11 },
},
},
'button&:hover, button&:focus-visible': {
textDecoration: 'underline',
@ -386,52 +335,12 @@ export const MessageTextBody = recipe({
export type MessageTextBodyVariants = RecipeVariants<typeof MessageTextBody>;
// The message content is a flex column, which forms its own block formatting context and so sits
// whole beside the floated portrait: the text stays as narrow as the gap beside it for the
// bubble's full height. As a plain block its lines wrap around the silhouette and then run the
// bubble's full width below it.
globalStyle(`${BubbleContentPose} > div`, {
'@media': {
[PHONE]: {
display: 'block',
},
},
});
// The name inside the pill wraps instead of ellipsising: the pill already caps its own width, and
// Username's own nowrap + ellipsis, and the truncate on the Text inside it, clipped long names to
// "Heimdall o…" inside it.
globalStyle(`${BubbleHeaderPose} ${Username}, ${BubbleHeaderPose} ${Username} *`, {
'@media': {
[PHONE]: {
whiteSpace: 'normal',
overflow: 'visible',
textOverflow: 'clip',
overflowWrap: 'break-word',
},
},
});
// A name too long for one line takes its own lines and the time drops below it, instead of the
// name shrinking to a sliver beside the time (the pill's one child is the flex row of both).
globalStyle(`${BubbleHeaderPose} > div`, {
'@media': {
[PHONE]: {
flexWrap: 'wrap',
},
},
});
// An outside list marker hangs left of its item's text and ignores the portrait's silhouette, so
// beside a left portrait the number lands under the art. Inside, it is a word on the first line
// and wraps around the silhouette like the rest.
globalStyle(`${BubbleContentPose} ol, ${BubbleContentPose} ul`, {
'@media': {
[PHONE]: {
listStylePosition: 'inside',
paddingLeft: 0,
},
},
listStylePosition: 'inside',
paddingLeft: 0,
});
// While the background scene runs (html[data-scene]) a chat bubble is the one filled surface in
@ -446,14 +355,6 @@ globalStyle(`${scene} ${BubbleContent}`, {
globalStyle(`${scene} ${BubbleContentOwn}`, {
backgroundColor: [color.Primary.Container, half(color.Primary.Container)],
});
globalStyle(`${scene} ${BubbleHeaderPose}`, {
'@media': {
[PHONE]: {
backgroundColor: [color.Secondary.Container, half(color.Secondary.Container)],
backdropFilter: 'blur(12px)',
},
},
});
globalStyle(`${scene} ${BubbleLeftArrow}`, {
display: 'none',
});

View file

@ -1,53 +1,126 @@
import React, { useEffect, useRef, useState } from 'react';
import classNames from 'classnames';
import * as css from '../layout/layout.css';
import { poseSrc } from './poses';
import { poseSrc, safeBox } from './poses';
import { alphaBounds, nestView, type Box } from './nest';
import { silhouette } from './silhouette';
type PoseAvatarProps = {
mind: string;
pose: string;
userId: string;
/** Float on the right on phones. */
/** Nest in the bubble's top-right corner instead of the top-left. */
alt?: boolean;
/** Play the first-appearance pop. */
enter?: boolean;
onClick: React.MouseEventHandler<HTMLButtonElement>;
/** Without it the portrait is a plain image: no button, no tab stop. */
onClick?: React.MouseEventHandler<HTMLButtonElement>;
};
// Safe boxes derived from art's alpha, by source; the art is traced once.
const traced = new Map<string, { box: Box; size: [number, number] }>();
const trace = (img: HTMLImageElement, src: string) => {
const hit = traced.get(src);
if (hit) return hit;
const w = img.naturalWidth;
const h = img.naturalHeight;
const ctx = document.createElement('canvas').getContext('2d');
if (!ctx) return undefined;
ctx.canvas.width = w;
ctx.canvas.height = h;
ctx.drawImage(img, 0, 0);
const box = alphaBounds(ctx.getImageData(0, 0, w, h).data, w, h);
if (!box) return undefined;
const found = { box, size: [w, h] as [number, number] };
traced.set(src, found);
return found;
};
export function PoseAvatar({ mind, pose, userId, alt, enter, onClick }: PoseAvatarProps) {
const src = poseSrc(mind, pose, import.meta.env.BASE_URL);
const imgRef = useRef<HTMLImageElement>(null);
const [shape, setShape] = useState<string>();
const measured = safeBox(mind, pose);
const [derived, setDerived] = useState<{ box: Box; size: [number, number] }>();
const art = measured ?? (derived?.size ? derived : undefined);
// Measured boxes are cropped by the share Aqua's numbers allow; a box traced from the alpha is
// already tight to the art, so the bubble may take all of the transparent margin.
const view = art && nestView(art.box, art.size, !!alt, measured ? undefined : 1);
// On phones the bubble text wraps around the portrait's silhouette. Retraced when the art
// loads and when the portrait's width changes with the viewport.
// Art with no measured box: find its extent when it loads.
useEffect(() => {
setDerived(undefined);
const img = imgRef.current;
if (!img || measured) return undefined;
const find = () => {
if (!img.complete || img.naturalWidth === 0) return;
try {
setDerived(trace(img, src));
} catch {
setDerived(undefined);
}
};
find();
img.addEventListener('load', find);
return () => img.removeEventListener('load', find);
}, [src, measured]);
// The bubble text wraps around the portrait's silhouette. Retraced when the art loads, when its
// crop is known, and when its width changes with the viewport.
useEffect(() => {
const img = imgRef.current;
if (!img) return undefined;
const trace = () => {
const retrace = () => {
if (!img.complete || img.naturalWidth === 0) return;
try {
setShape(silhouette(img, !alt));
const box = img.parentElement;
const style = getComputedStyle(img);
setShape(
silhouette(
img,
!alt,
box
? {
x: 0 - parseFloat(style.marginLeft || '0'),
y: 0 - parseFloat(style.marginTop || '0'),
width: box.clientWidth,
height: box.clientHeight,
}
: undefined
)
);
} catch {
setShape(undefined);
}
};
trace();
img.addEventListener('load', trace);
const resize = new ResizeObserver(trace);
retrace();
img.addEventListener('load', retrace);
const resize = new ResizeObserver(retrace);
resize.observe(img);
return () => {
img.removeEventListener('load', trace);
img.removeEventListener('load', retrace);
resize.disconnect();
};
}, [src, alt]);
}, [src, alt, view?.x, view?.y, view?.width, view?.height]);
// Crop fractions are of the image's width, so one set serves every displayed size.
const frac = (px: number) => `calc(${css.portraitWidth} * ${px / (art?.size[0] ?? 1)})`;
const cropStyle =
art && view
? ({
'--pose-bw': frac(view.width),
'--pose-bh': frac(view.height),
'--pose-ix': frac(-view.x),
'--pose-iy': frac(-view.y),
} as React.CSSProperties)
: undefined;
const Tag = onClick ? 'button' : 'span';
return (
<button
type="button"
<Tag
type={onClick ? 'button' : undefined}
className={classNames(css.PoseButton, alt && css.PoseButtonAlt, enter && css.EnterPortrait)}
style={{ shapeOutside: shape }}
style={{ ...cropStyle, shapeOutside: shape }}
data-user-id={userId}
data-pose={pose}
onClick={onClick}
@ -59,6 +132,6 @@ export function PoseAvatar({ mind, pose, userId, alt, enter, onClick }: PoseAvat
alt={`${mind}, ${pose}`}
draggable={false}
/>
</button>
</Tag>
);
}

View file

@ -0,0 +1,72 @@
import { describe, expect, it } from 'vitest';
import { alphaBounds, nestView } from './nest';
import boxes from './safeBoxes.json';
describe('nestView', () => {
// Aqua neutral: 560x374, safe box [144,22,492,317] (right margin 68, top 22).
it('crops half the right and top margins for a top-right nest', () => {
expect(nestView([144, 22, 492, 317], [560, 374], true)).toEqual({
x: 0,
y: 11,
width: 526,
height: 363,
});
});
it('crops the left margin instead for a top-left nest', () => {
expect(nestView([144, 22, 492, 317], [560, 374], false)).toEqual({
x: 72,
y: 11,
width: 488,
height: 363,
});
});
it('never crops the top of art already touching it (smug, headband at y=0)', () => {
const v = nestView([140, 0, 487, 241], [560, 374], true);
expect(v.y).toBe(0);
expect(v.height).toBe(374);
});
it('can take the whole margin', () => {
expect(nestView([10, 4, 90, 50], [100, 60], true, 1)).toEqual({
x: 0,
y: 4,
width: 90,
height: 56,
});
});
it('keeps every measured safe box intact at the default share', () => {
const aqua = boxes.aqua as Record<string, number[]>;
expect(Object.keys(aqua)).toHaveLength(15);
Object.values(aqua).forEach(([x0, y0, x1, y1, w, h]) => {
const right = nestView([x0, y0, x1, y1], [w, h], true);
expect(right.x).toBeLessThanOrEqual(x0);
expect(right.x + right.width).toBeGreaterThanOrEqual(x1);
expect(right.y).toBeLessThanOrEqual(y0);
const left = nestView([x0, y0, x1, y1], [w, h], false);
expect(left.x).toBeLessThanOrEqual(x0);
expect(left.x + left.width).toBe(w);
});
});
});
describe('alphaBounds', () => {
it('finds the opaque rectangle', () => {
const w = 6;
const h = 5;
const data = new Uint8ClampedArray(w * h * 4);
[
[2, 1],
[4, 3],
].forEach(([x, y]) => {
data[(y * w + x) * 4 + 3] = 255;
});
expect(alphaBounds(data, w, h)).toEqual([2, 1, 5, 4]);
});
it('reports nothing for an empty image', () => {
expect(alphaBounds(new Uint8ClampedArray(16), 2, 2)).toBeUndefined();
});
});

View file

@ -0,0 +1,58 @@
// A pose nests into the corner of its bubble: the sprite's body sits in the bubble's padding and is
// cut off by the bubble's edge, so nothing hangs outside it.
/** [x0, y0, x1, y1] in image pixels, origin top-left, x1/y1 exclusive. */
export type Box = [number, number, number, number];
// Share of the room between the safe box and the image edge that the bubble edge may cut away.
// Aqua's measurement says all of it can go; half leaves the outline a little air.
export const CROP_SHARE = 0.5;
export type NestView = {
/** The visible region of the image, in pixels. */
x: number;
y: number;
width: number;
height: number;
};
// The part of the image that shows, for a sprite in the bubble's top-right (`right`) or top-left
// corner. Only the corner's two sides are cropped: the side towards the bubble's edge and the top.
// The far side and the bottom stay whole; the bubble's bottom edge cuts the bust.
export const nestView = (
safe: Box,
size: [number, number],
right: boolean,
share = CROP_SHARE
): NestView => {
const [w, h] = size;
const [x0, y0, x1] = safe;
const side = Math.round(share * (right ? w - x1 : x0));
const top = Math.round(share * y0);
const x = right ? 0 : side;
return { x, y: top, width: w - side, height: h - top };
};
// Bounds of the pixels whose alpha exceeds `min`, as a safe box for art with no measured one.
export const alphaBounds = (
data: ArrayLike<number>,
w: number,
h: number,
min = 8
): Box | undefined => {
let x0 = w;
let y0 = h;
let x1 = 0;
let y1 = 0;
for (let y = 0; y < h; y += 1) {
for (let x = 0; x < w; x += 1) {
if (data[(y * w + x) * 4 + 3] > min) {
x0 = Math.min(x0, x);
x1 = Math.max(x1, x + 1);
y0 = Math.min(y0, y);
y1 = y + 1;
}
}
}
return x1 > x0 ? [x0, y0, x1, y1] : undefined;
};

View file

@ -3,10 +3,7 @@ import catalogue from './catalogue.json';
import {
mindOfSender,
poseSrc,
poseStatusLine,
poseStatuses,
resolvePose,
splitNewestStatus,
} from './poses';
describe('resolvePose', () => {
@ -53,52 +50,5 @@ describe('poseSrc', () => {
});
});
describe('poseStatuses', () => {
const ev = (sender: string, ts: number, label: unknown) => ({
sender,
localpart: sender,
ts,
label,
});
it('reports the latest pose per Mind and when its unbroken run began', () => {
const out = poseStatuses([
ev('aqua', 1, 'happy'),
ev('aqua', 2, 'sigh'),
ev('aqua', 3, 'sigh'),
ev('alice', 4, 'happy'),
ev('eureka', 5, 'probe'),
]);
expect(out).toEqual([
{ mind: 'aqua', pose: 'sigh', since: 2 },
{ mind: 'eureka', pose: 'probe', since: 5 },
]);
});
it('treats unknown labels as neutral runs', () => {
expect(poseStatuses([ev('void', 1, 'bogus'), ev('void', 2, undefined)])).toEqual([
{ mind: 'void', pose: 'neutral', since: 1 },
]);
});
});
describe('poseStatusLine', () => {
it('formats the client-status line', () => {
const since = new Date(2026, 10, 4, 9, 5).getTime();
expect(poseStatusLine({ mind: 'void', pose: 'reading', since })).toBe(
'Ratatoskr: Void is reading, since 09:05'
);
});
});
describe('splitNewestStatus', () => {
const s = (mind: string, since: number) => ({ mind, pose: 'happy', since });
it('picks the status that changed last and keeps the others in their order', () => {
const { newest, rest } = splitNewestStatus([s('eureka', 100), s('void', 300), s('nibu', 200)]);
expect(newest?.mind).toBe('void');
expect(rest.map((r) => r.mind)).toEqual(['eureka', 'nibu']);
});
it('has no newest for an empty list', () => {
expect(splitNewestStatus([])).toEqual({ newest: undefined, rest: [] });
});
});

View file

@ -1,4 +1,6 @@
import catalogue from './catalogue.json';
import safeBoxes from './safeBoxes.json';
import type { Box } from './nest';
// Pose labels travel in the event content under POSE_KEY. The catalogue
// (cast-art poses/catalogue.json, synced by `npm run sync:poses`) is the only
@ -40,50 +42,14 @@ export const resolvePose = (mind: string, label: unknown): string => {
export const poseSrc = (mind: string, pose: string, base = '/'): string =>
`${base}public/poses/${artPath(mind, pose) ?? artPath(mind, NEUTRAL)}`;
export type PoseStatus = { mind: string; pose: string; since: number };
export type PoseEvent = {
sender: string;
localpart?: string;
name?: string;
ts: number;
label: unknown;
};
// Latest pose per Mind in a room's events (oldest first), and when that pose
// began: the first of its unbroken run of messages carrying the same pose.
export const poseStatuses = (events: PoseEvent[]): PoseStatus[] => {
const bySender = new Map<string, { mind: string; run: { pose: string; ts: number }[] }>();
events.forEach((e) => {
const mind = mindOfSender(e.localpart, e.name);
if (!mind) return;
const entry = bySender.get(e.sender) ?? { mind, run: [] };
entry.run.push({ pose: resolvePose(mind, e.label), ts: e.ts });
bySender.set(e.sender, entry);
});
return [...bySender.values()].map(({ mind, run }) => {
const last = run[run.length - 1];
let i = run.length - 1;
while (i > 0 && run[i - 1].pose === last.pose) i -= 1;
return { mind, pose: last.pose, since: run[i].ts };
});
};
// The status that changed last, and the rest in their given order (phones show only the first).
export const splitNewestStatus = (
statuses: PoseStatus[]
): { newest: PoseStatus | undefined; rest: PoseStatus[] } => {
let newest: PoseStatus | undefined;
statuses.forEach((st) => {
if (!newest || st.since > newest.since) newest = st;
});
return { newest, rest: statuses.filter((st) => st !== newest) };
};
const two = (n: number) => String(n).padStart(2, '0');
// Client-status text. Rendered locally only; it is never sent to a room.
export const poseStatusLine = ({ mind, pose, since }: PoseStatus): string => {
const d = new Date(since);
const name = mind.charAt(0).toUpperCase() + mind.slice(1);
return `Ratatoskr: ${name} is ${pose}, since ${two(d.getHours())}:${two(d.getMinutes())}`;
// Safe-crop boxes measured from the art's pixels (Aqua, `aqua-pose-crop-boxes-20261110`): the
// head and headphones plus outline, which the bubble's edge must not cut. [x0, y0, x1, y1, width,
// height] in image pixels. Art with no entry gets its box from the sprite's alpha at load time.
const boxes = safeBoxes as Record<string, Record<string, number[]>>;
export const safeBox = (
mind: string,
pose: string
): { box: Box; size: [number, number] } | undefined => {
const b = Object.prototype.hasOwnProperty.call(boxes, mind) ? boxes[mind][pose] : undefined;
return b ? { box: [b[0], b[1], b[2], b[3]], size: [b[4], b[5]] } : undefined;
};

View file

@ -0,0 +1,19 @@
{
"aqua": {
"neutral": [144, 22, 492, 317, 560, 374],
"happy": [157, 22, 506, 317, 574, 374],
"amused": [154, 22, 500, 317, 562, 374],
"thinking": [154, 16, 500, 307, 562, 374],
"annoyed": [154, 4, 499, 282, 562, 374],
"surprised": [141, 5, 485, 282, 560, 374],
"concerned": [156, 4, 501, 283, 574, 374],
"fretful": [156, 16, 503, 305, 574, 374],
"weary": [161, 16, 509, 307, 624, 374],
"glare": [160, 5, 508, 282, 624, 374],
"smug": [140, 0, 487, 241, 560, 374],
"sigh": [154, 0, 500, 241, 574, 374],
"charging": [152, 0, 497, 241, 562, 374],
"delighted": [159, 0, 507, 241, 624, 374],
"content": [144, 16, 492, 306, 560, 374]
}
}

View file

@ -53,4 +53,22 @@ describe('silhouette', () => {
silhouette({ clientWidth: 0, clientHeight: 0 } as HTMLImageElement, true)
).toBeUndefined();
});
it('traces only the visible part of a cropped portrait, drawn at its offset', () => {
const drawImage = vi.fn();
const canvas = {
width: 0,
height: 0,
getContext: () => ({
canvas,
drawImage,
getImageData: () => ({ data: new Uint8ClampedArray(40 * 8 * 4) }),
}),
};
vi.stubGlobal('document', { createElement: () => canvas });
const img = { clientWidth: 100, clientHeight: 20 } as HTMLImageElement;
silhouette(img, true, { x: 0, y: 12, width: 40, height: 8 });
expect([canvas.width, canvas.height]).toEqual([40, 8]);
expect(drawImage).toHaveBeenCalledWith(img, 0, -12, 100, 20);
});
});

View file

@ -5,14 +5,23 @@ const ROW = 4;
// `shape-outside: url()` cannot do this: the browser sizes that image at its natural size and
// anchors it at the margin box, which the phone layout's negative top margin shifts down by the
// overhang, so the exclusion neither matches the art's size nor its place.
export const silhouette = (img: HTMLImageElement, textOnRight: boolean): string | undefined => {
const w = Math.round(img.clientWidth);
const h = Math.round(img.clientHeight);
//
// `view` is the part of the displayed image that shows (the button's box, in displayed pixels):
// the portrait is cropped by the bubble, so the polygon is traced over what is left of the art.
export type View = { x: number; y: number; width: number; height: number };
export const silhouette = (
img: HTMLImageElement,
textOnRight: boolean,
view?: View
): string | undefined => {
const w = Math.round(view?.width ?? img.clientWidth);
const h = Math.round(view?.height ?? img.clientHeight);
const ctx = w > 0 && h > 0 ? document.createElement('canvas').getContext('2d') : null;
if (!ctx) return undefined;
ctx.canvas.width = w;
ctx.canvas.height = h;
ctx.drawImage(img, 0, 0, w, h);
ctx.drawImage(img, 0 - (view?.x ?? 0), 0 - (view?.y ?? 0), img.clientWidth, img.clientHeight);
const { data } = ctx.getImageData(0, 0, w, h);
const outer = textOnRight ? 0 : w;
const edge: string[] = [];

View file

@ -1,7 +1,17 @@
import { ComplexStyleRule, createVar, style } from '@vanilla-extract/css';
import { ComplexStyleRule, StyleRule, createVar, globalStyle, style } from '@vanilla-extract/css';
import { RecipeVariants, recipe } from '@vanilla-extract/recipes';
import { ContainerColor, DefaultReset, Disabled, RadiiVariant, color, config, toRem } from 'folds';
import { surfaceInk } from '../../features/scene/sceneShell.css';
import { skyLabelInk } from '../../features/scene/skyLabelInk';
// Wash strengths over the scene: rows and labels are faint, and hover, selected and pressed rows
// are three distinct steps above them.
// Meta, 2026-11-09: "this UI needs no chrome". Rows and labels are bare ink on the scene; hover and selection keep a faint wash.
const SCRIM_LABEL = '0%';
const SCRIM_ROW = '0%';
const SCRIM_HOVER = '14%';
const SCRIM_SELECTED = '22%';
const SCRIM_PRESSED = '48%';
export const NavCategory = style([
DefaultReset,
@ -12,11 +22,16 @@ export const NavCategory = style([
export const NavCategoryHeader = style({
gap: config.space.S100,
selectors: {
// Category labels sit on the scene like the rows do, and need the same scrim to be read.
':root[data-scene] &': {
backgroundColor: `color-mix(in srgb, ${surfaceInk} 62%, transparent)`,
borderRadius: config.radii.R400,
'@media': {
// Category labels sit on the scene like the rows do, and need a wash to be read (wide screens;
// a phone's list is plain text).
'screen and (min-width: 751px)': {
selectors: {
':root[data-scene] &': {
backgroundColor: `color-mix(in srgb, ${surfaceInk} ${SCRIM_LABEL}, transparent)`,
borderRadius: config.radii.R400,
},
},
},
},
});
@ -52,6 +67,12 @@ const getVariant = (variant: ContainerColor): ComplexStyleRule => ({
},
});
// The room list is plain text on a phone: no pill, slab or border behind any row, and hover,
// selected and pressed show in the label (NavLabel), never in a box. Wider screens keep the rows
// and the wash.
const WIDE = 'screen and (min-width: 751px)';
const PHONE = 'screen and (max-width: 750px)';
const NavItemBase = style({
width: '100%',
display: 'flex',
@ -62,35 +83,45 @@ const NavItemBase = style({
outline: 'none',
minHeight: toRem(36),
selectors: {
'&:hover, &:focus-visible': {
backgroundColor: ContainerHover,
'@media': {
[PHONE]: {
backgroundColor: 'transparent',
borderRadius: 0,
},
'&[data-hover=true]': {
backgroundColor: ContainerHover,
},
// While the background scene runs the shell is clear (sceneShell.css.ts); a row is a steady
// scrim of the theme's own surface, so ridges never show through its text. Hover, the selected row and a
// press each strengthen it a step.
':root[data-scene] &': {
backgroundColor: `color-mix(in srgb, ${surfaceInk} 62%, transparent)`,
},
':root[data-scene] &:hover, :root[data-scene] &:focus-visible, :root[data-scene] &[data-hover=true]':
{
backgroundColor: `color-mix(in srgb, ${surfaceInk} 74%, transparent)`,
[WIDE]: {
selectors: {
'&:hover, &:focus-visible': {
backgroundColor: ContainerHover,
},
'&[data-hover=true]': {
backgroundColor: ContainerHover,
},
// While the background scene runs the shell is clear (sceneShell.css.ts); a row is a faint
// wash of the theme's own surface: the terrain stays visible, the text stays readable.
// Hover, the selected row and a press each strengthen it a step.
':root[data-scene] &': {
backgroundColor: `color-mix(in srgb, ${surfaceInk} ${SCRIM_ROW}, transparent)`,
},
':root[data-scene] &:hover, :root[data-scene] &:focus-visible, :root[data-scene] &[data-hover=true]':
{
backgroundColor: `color-mix(in srgb, ${surfaceInk} ${SCRIM_HOVER}, transparent)`,
},
':root[data-scene] &[aria-selected=true]': {
backgroundColor: `color-mix(in srgb, ${surfaceInk} ${SCRIM_SELECTED}, transparent)`,
},
[`:root[data-scene] &:has(.${NavLink}:active)`]: {
backgroundColor: `color-mix(in srgb, ${surfaceInk} ${SCRIM_PRESSED}, transparent)`,
},
[`&:has(.${NavLink}:active)`]: {
backgroundColor: ContainerActive,
},
'&[aria-selected=true]': {
backgroundColor: ContainerActive,
},
},
':root[data-scene] &[aria-selected=true]': {
backgroundColor: `color-mix(in srgb, ${surfaceInk} 84%, transparent)`,
},
[`:root[data-scene] &:has(.${NavLink}:active)`]: {
backgroundColor: `color-mix(in srgb, ${surfaceInk} 92%, transparent)`,
},
[`&:has(.${NavLink}:active)`]: {
backgroundColor: ContainerActive,
},
'&[aria-selected=true]': {
backgroundColor: ContainerActive,
},
},
selectors: {
[`&:has(.${NavLink}:focus-visible)`]: {
outline: `${config.borderWidth.B600} solid ${ContainerLine}`,
outlineOffset: `calc(-1 * ${config.borderWidth.B600})`,
@ -150,3 +181,77 @@ export const NavItemContent = style({
export const NavItemOptions = style({
paddingRight: config.space.S200,
});
// A room's name on a phone wears the section headings' type (small caps-height, uppercase, 600,
// at heading strength) and states itself in the text: hover and focus underline it, the selected
// row is bolder and underlined, a press dims it, an unread room is at full strength. Over the scene
// a halo of the theme's own surface keeps it readable without a box.
export const NavLabel = style({});
const label = `.${NavLabel}.${NavLabel}`;
const phoneLabel = (selector: string, rule: StyleRule) =>
globalStyle(selector, { '@media': { [PHONE]: rule } });
phoneLabel(label, {
fontSize: toRem(12),
lineHeight: toRem(16),
fontWeight: config.fontWeight.W600,
textTransform: 'uppercase',
opacity: 0.75,
textDecorationThickness: '1px',
textUnderlineOffset: toRem(4),
});
phoneLabel(
[
`.${NavItemBase}:hover ${label}`,
`.${NavItemBase}:focus-visible ${label}`,
`.${NavItemBase}[data-hover=true] ${label}`,
`.${NavItemBase}[data-highlight=true] ${label}`,
].join(', '),
{ opacity: 1 }
);
phoneLabel(`.${NavItemBase}:hover ${label}, .${NavItemBase}:focus-visible ${label}`, {
textDecorationLine: 'underline',
});
phoneLabel(`.${NavItemBase}[aria-selected=true] ${label}`, {
opacity: 1,
fontWeight: config.fontWeight.W700,
textDecorationLine: 'underline',
textDecorationThickness: '2px',
});
phoneLabel(`.${NavItemBase}:has(.${NavLink}:active) ${label}`, {
opacity: 0.6,
textDecorationLine: 'underline',
});
phoneLabel(`:root[data-scene] ${label}`, {
color: skyLabelInk('inherit'),
textShadow: `0 0 3px ${surfaceInk}, 0 0 8px ${surfaceInk}`,
});
// Icons, dots and the Join action share the label's halo over the scene.
globalStyle(`:root[data-scene] ${NavItemBase} svg, :root[data-scene] ${NavItemBase} button`, {
'@media': {
[PHONE]: {
filter: `drop-shadow(0 0 3px ${surfaceInk})`,
},
},
});
// The Join action on a phone is a plain underlined word, not a pill.
export const NavAction = style({
'@media': {
[PHONE]: {
selectors: {
'&&': {
backgroundColor: 'transparent',
boxShadow: 'none',
border: 'none',
borderRadius: 0,
minWidth: 0,
textDecoration: 'underline',
textUnderlineOffset: toRem(4),
flexShrink: 0,
},
},
},
},
});

View file

@ -1,7 +1,9 @@
import classNames from 'classnames';
import React, { useCallback, useState } from 'react';
import { Avatar, Box, Button, Spinner, Text, as } from 'folds';
import { Room } from 'matrix-js-sdk';
import { useAtomValue } from 'jotai';
import { SkyPlate } from '../../features/scene/skyPlate.css';
import { IRoomCreateContent, Membership, StateEvent } from '../../../types/matrix/room';
import { getMemberDisplayName, getStateEvent } from '../../utils/room';
import { useMatrixClient } from '../../hooks/useMatrixClient';
@ -23,7 +25,7 @@ export type RoomIntroProps = {
room: Room;
};
export const RoomIntro = as<'div', RoomIntroProps>(({ room, ...props }, ref) => {
export const RoomIntro = as<'div', RoomIntroProps>(({ room, className, ...props }, ref) => {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
const { navigateRoom } = useRoomNavigate();
@ -50,7 +52,7 @@ export const RoomIntro = as<'div', RoomIntroProps>(({ room, ...props }, ref) =>
const [hour24Clock] = useSetting(settingsAtom, 'hour24Clock');
return (
<Box direction="Column" grow="Yes" gap="500" {...props} ref={ref}>
<Box direction="Column" grow="Yes" gap="500" className={classNames(SkyPlate, className)} {...props} ref={ref}>
<Box>
<Avatar size="500">
<RoomAvatar

View file

@ -0,0 +1,51 @@
import { style } from '@vanilla-extract/css';
import { color, config, toRem } from 'folds';
import { MOBILE_BREAKPOINT } from '../../hooks/useScreenSize';
const WIDE = `screen and (min-width: ${MOBILE_BREAKPOINT + 1}px)`;
/** One column, bare ink on the scene. */
export const Column = style({
maxWidth: toRem(720),
width: '100%',
margin: '0 auto',
padding: config.space.S400,
display: 'flex',
flexDirection: 'column',
gap: config.space.S200,
});
/** A tappable text row: no border, no fill, at least 44 px tall. */
export const Row = style({
all: 'unset',
boxSizing: 'border-box',
cursor: 'pointer',
minHeight: 44,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
gap: toRem(2),
color: color.Background.OnContainer,
':focus-visible': { textDecoration: 'underline' },
});
export const Back = style([Row, { minHeight: 44 }]);
export const Files = style({
display: 'flex',
flexDirection: 'column',
gap: config.space.S400,
});
/** Images may tile into a grid on wide screens only. */
export const FilesWide = style({
'@media': {
[WIDE]: {
display: 'grid',
gridTemplateColumns: 'repeat(auto-fill, minmax(220px, 1fr))',
alignItems: 'start',
},
},
});
export const Dim = style({ opacity: config.opacity.P300 });

Some files were not shown because too many files have changed in this diff Show more