#2673 draws an image shown at half its size or less from a filtered,
halved copy. The per-pixel area average from this branch now applies to
that copy below half size and to the image itself above it; the export
test of the average across fractional positions moves to 0.625 of the
image's size, where no copy is made (it still fails without the
average). Test fixtures build text through Shared<TextData> (#1819).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012eBDgsvRwsSRpWeWrzabVY
A Selection colors row whose list holds other paints can't take a new
style, so the picker hides +. With no styles in the file it still said
"No styles yet. Click + to create one from the selection." It now says
"No styles yet.", a string the catalog already has.
Test: selection_colors_picker_tests::a_row_whose_list_holds_other_paints_offers_no_create
The browser version still recognises camera raw files and says they open in the desktop app
only; its pickers don't offer them. The Plugins menu, the plugin palette rows and the plugin
commands are hidden there, and running a plugin says it needs the desktop app. Native builds
are unchanged.
Mutate the document directly via ds_mut() instead of execute() so live_edit() does not run, assert pending() == 0, and verify saved_doc stays unchanged across live_poll().
Main's Selection colors Styles menu (style_items, create_form) is the
menu this branch replaces with the style picker, so the merge keeps the
picker and drops the menu, with main's focus change inside create_form.
What the menu offered stays in the picker opened from a row: this file's
paint styles and each enabled library's published ones under its name,
Create style for the row's paint (selection.createColorStyle, left out
where create_refusal refuses), colour variables, and Detach.
The picker test now also checks that a library's unpublished style is not
offered, as the menu's test did. "No color styles" goes from he.toml too,
which main added with the key.
Import tail (docs/gaps.md Gap 1), as FigCraft-side passes over the mapped
REST JSON in crates/format/src/fig/map.rs (the craft-fig mapper is pinned
and unchanged):
- A connector label without a saved snapshot gets a white, fully rounded
stand-in pill centred under it, padded by the font size, within the layer
budget (labels past it stay bare under the mapper's original note).
- TABLE cells are put back on the table's grid from their own geometry:
offsets within 2 px share a track, a sizeless or misaligned cell takes its
row and column, and no two cells overlap. Fills, strokes and text are kept.
Rotated, non-finite, colliding or oversized tables keep their saved bounds
with a warning. No row or column fields of the file are read.
- The new import notes are counted like the mapper's (`note (×n)`) and
have English keys in crates/ui-egui/locales/en.toml.
- Vector-region style and variable links were already resolved with a
fall-back to the region's own paint; no change.
Fidelity harness (Gap 3), no new dependencies:
- fig::fidelity: compare_documents (layer counts, box L-infinity error,
text/fill/stroke/opacity match rates, warnings) and compare_rgba (SSD,
RMSE, PSNR, luminance SSIM, channels past a tolerance), with JSON and
Markdown scorecards.
- fidelity_tests: metric properties, a built-in corpus that round-trips
through .fig with every layer matched and no new warnings, and an ignored
FIGCRAFT_FIG_CORPUS runner for local real files.
- render: a multi-layer scene drawn before and after a .fig round trip is
compared with compare_rgba (SSIM > 0.99; measured identical).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
collab (dst_fault_tests, 32 seeds): asymmetric partitions where a legacy
and a current client are cut off while the rest push the server past its
log, mid-flight drops with offline edits queued, one-way link stalls, and
per-user undo/redo mixed with layer, style, variable, comment, component
instance, main component and page edits. Every seed must catch up from
the log, a compressed snapshot and a plain snapshot, and end converged
and valid with monotonic sequence numbers, no undo violations, and no
remembered-deleted id live in the document.
Sim gains additive hooks: set_version (reconnect as an older app), stall
(one-way, order-keeping delay) and per-kind catch-up counters.
figcraft-server (dst_crash_tests, 24 seeds): the real Store with small
compact_after, clients acked only after a clean flush (as the hub does),
crashes before a flush, mid-flush with the log cut inside the new
records, and after a flush before acks, plus everyone-leaves idle/park.
After each restart the file is exactly the server's state at some seq no
earlier than the last durable point or anything a client heard; torn
tails are reported and later appends survive; clients resume with their
ids, lose no queue and converge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An app hosting a live session for other machines sent the session token
in the clear over plain ws://. Such a host now serves TLS with an
ephemeral self-signed Ed25519 certificate (DER written by hand with ring,
no new crates), and its invite links pin the certificate's SHA-256
(`cert=`, URL-safe base64): figcraft://join?server=wss://…&cert=… and
wss://…/?cert=…
- tls: the shared session is a rustls::Connection (client or server),
keeping the split reader/writer locking; `accept` answers a server
handshake by the hello deadline; `handshake_pinned` uses a verifier
that compares the end-entity certificate's SHA-256 in constant time
and still checks the TLS 1.2/1.3 handshake signature, refusing any
other certificate before the Hello with a clear reason.
- invite: Endpoint::cert (None for Endpoint::plain), Endpoint::pinned;
a malformed pin, one on ws://, or two that disagree is an error that
never echoes the link. The pin stays out of the WebSocket request URL.
An automation allowlist entry allows only its own pin.
- host/hub: HostConfig::tls, Host::cert_sha256, Host::endpoint; the hub
carries the server config to each connection. Hosting::serve (the
server) is unchanged.
- link: NetLink::host serves TLS for non-loopback binds without a join
code. Join-code (short) shares stay plain ws://: a 20-symbol code has
no room for the pin, and its joiners share the token with the link.
- web: the browser refuses a pinned link with a clear reason.
Tests: pinned join and edit sync both ways, a plain client against a
TLS host, a host presenting another certificate (refused, not admitted),
the request carrying neither token nor pin, link round trips and
malformed cert= values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>