Commit Graph
5370 Commits
Author SHA1 Message Date
Martin Ball 80b8ea1f67 Contract stubs: craft-ui-patterns 2026-11-18 08:28:04 +00:00
Martin Ball 10b23c3d55 Contract stubs: craft-ui-canvas craft-ui-shell 2026-11-18 08:21:44 +00:00
Martin Ball 53e525ad78 Contract stubs: craft-ui-widgets craft-ui-panels 2026-11-18 08:15:57 +00:00
Martin Ball ec93a52260 Contract stubs: craft-ui-contract 2026-11-18 08:08:21 +00:00
Martin Ball b21c69300c Contract stubs: craft-codepage craft-i18n craft-host craft-quit craft-theme craft-keymap craft-behavior craft-settings craft-platform 2026-11-18 08:01:14 +00:00
Martin Ball cbc63d92c1 craft-mcp-server: options for apps that report argument errors as tool results (#2061)
* craft-mcp-server: options for apps that report argument errors as tool results (#778)

Add `Options` (default = today's behaviour) and `Server::with_options`:

- `website_url`: sent as `serverInfo.websiteUrl` at `initialize`.
- `tool_errors_as_results`: a `tools/call` whose arguments fail the schema check, or whose tool
  is unknown, returns a tool result with `isError: true` and the message as text, not -32602.
- `strict_request_ids`: a request id that is not a string or number gets -32600 with a null id.

`Info` is unchanged, so existing struct-literal callers still compile. Tests cover each option on
and off, and hostile input with all options on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* craft-mcp-server: strict request ids also apply to the missing-method error (#778)

With strict_request_ids, a message without `method` echoed an object, array or
bool id in its -32600 reply. It now answers with a null id for any id that is
not a string or number, as the later strict check does. Valid ids, absent ids
and incoming responses behave as before.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3e82d1719c)
2026-11-17 21:32:22 +00:00
Dylan M. Taylor 1d8bfe6acd drawingml: accept borrowed table definitions and caller XML validation (#2045)
(cherry picked from commit cff5af869d)
2026-11-17 21:32:22 +00:00
Dylan M. Taylor 45d9cab53b zip: preserve legacy Zstandard method 20 in lenient reads (#2015)
* zip: retain legacy Zstandard method compatibility

Ported from Craft Anything 29badae7c9280fdf4c24795927bf3a91f51694c6, including the bounded-reader regression. Firmware scanner policy remains app-owned.

* Record source of legacy ZIP Zstandard compatibility

* Document both ZIP Zstandard method identifiers

---------

Co-authored-by: RRFZ <247457381+Plastic-time@users.noreply.github.com>
(cherry picked from commit fb1d7f3681)
2026-11-17 21:32:22 +00:00
Dylan M. Taylor 1ba84bb14a Keep aligned stored entry headers compatible with USDZ exporter
(cherry picked from commit 6128eabbfb)
2026-11-17 21:32:14 +00:00
Dylan M. Taylor 20c67ba4f5 zip: support bounded aligned stored entry options
Co-authored-by: bflatastic <bombayapirat@gmail.com>
(cherry picked from commit e66b3a7954)
2026-11-17 21:32:14 +00:00
Martin Ball 38289b5343 craft-image-codecs: wrap a clipboard DIB as a BMP (dib_to_bmp, dib_layout) (#2062)
* image-codecs: wrap a clipboard DIB as a BMP (#778)

Add bmp_probe::dib_to_bmp (prepend the 14-byte file header, pixel offset
from the header with saturating arithmetic, try_reserve for the output)
and bmp_probe::dib_layout (V4/V5 alpha-mask BI_RGB becomes BI_BITFIELDS,
mask copy after the header). Both are ported from WordCraft's
crates/geom/src/picture.rs so it can drop its local copies. Tests compare
byte-for-byte with the originals over crafted DIBs and every prefix, and
decode wrapped results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* image-codecs: fix DIB offsets for V2/V3 bitfields and ambiguous mask copies (#778)

- dib_to_bmp no longer adds 12 appended-mask bytes to the pixel offset for 52- and
  56-byte BI_BITFIELDS headers, which carry their masks inside the header; the
  decoder reads the pixels at bfOffBits, so the offset was 12 bytes too far.
- dib_layout treats 12 bytes after the header that equal the masks as an existing
  copy only when more bytes follow than the pixels need, so an exact-length DIB
  whose pixels equal the masks gets its copy inserted.
- dib_layout reserves the 12 bytes before changing compression or masks, so a
  failed reservation returns the DIB unchanged; the mask bytes are a [u8; 12]
  array, not a heap copy.

The differential tests against the WordCraft originals now exclude exactly the
52/56-byte bitfields offset and the exact-length payload cases, and assert the new
behaviour for them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 93dac78c93)
2026-11-17 21:30:45 +00:00
Martin Ball 3e6e0de90d image-codecs: header-only PNG pixel model and WebP alpha probes (#778) (#2064)
png_probe::pixel_model reads width, height, bit depth, colour type and tRNS
presence from IHDR and the chunk headers before IDAT without inflating iCCP;
PixelModel::bytes_per_pixel and has_alpha give a caller's pixel size and alpha.
webp_probe::has_alpha reads the VP8X alpha flag, the VP8L alpha_is_used bit,
and treats plain VP8 as opaque. Differential tests compare against WordCraft's
png_chunks as an oracle.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 1928693fbb)
2026-11-17 21:30:45 +00:00
Martin Ball b964fed1c5 image-codecs: add jpeg_worst_case_coefficients (#778) (#2063)
A conservative pre-decode coefficient budget for hostile JPEG headers: the
larger of JpegInfo::held_coefficients and a whole-picture estimate over every
progressive frame header (SOF2/6/10/14, any precision, sampling clamped to
1..=4), with the costliest frame charged at the first frame's size when the
header can't be followed. held_coefficients is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ea02182945)
2026-11-17 21:30:45 +00:00
aiongg 427c816db0 Merge the Photoshop colour picker arrangement and NumberField unit placement 2026-11-17 16:09:20 +00:00
aiongg 2e6cc11242 Full colour picker: Photoshop arrangement (two groups, short fields, unit column, stacked compare block); NumberField UnitPlacement 2026-11-17 15:56:17 +00:00
aiongg a6b9d9c986 Merge the 17 Nov bug batch follow-ups: colour picker grid cells, tab joins at the layout's top edge, native stepped resize test kit 2026-11-17 15:39:15 +00:00
aiongg 5415aaab72 Colour picker grid: build the radio's hidden side label inside the cell 2026-11-17 15:30:40 +00:00
aiongg cdfa4cefc7 Merge commit 'd87c24a93e'; commit 'cea4209559' into fx/all-1117 2026-11-17 15:26:20 +00:00
aiongg cea4209559 The test kit's child window pass lays out at the window's reported size; drop the FW-280 DIAG prints 2026-11-17 15:26:10 +00:00
aiongg d87c24a93e Picker radio cell is a Row so each channel takes three grid cells 2026-11-17 15:25:45 +00:00
aiongg 3008f7d476 Merge commit '7c04ac596a'; commit 'fc18baf87c' into fx/all-1117 2026-11-17 15:20:44 +00:00
aiongg 7c04ac596a A tab strip takes the drop over a band except near the band's line
Over a tab strip an edge, seam, column-edge or new-dock band takes the drop only
within DockSizes::strip_reach (the least hit size) of its drop line, as
production's STRIP_REACH rule did; the rest of the strip joins its group. A
strip on the layout's top edge takes tab joins again.
2026-11-17 15:20:27 +00:00
aiongg fc18baf87c The stale-pointer trial asserts the group's region mark; DIAG prints for the native stepped resize (FW-280) 2026-11-17 15:19:13 +00:00
aiongg 4c4ebbbbc9 Merge the 17 Nov bug batch: floating tool rail and panels, panel tabs, menu rows, colour picker, navigator, canvas scrollbars, dock drop preview 2026-11-17 15:18:58 +00:00
aiongg dc3be64306 Merge commit '9840ee1b99' into fx/all-1117 2026-11-17 15:18:58 +00:00
aiongg 9840ee1b99 Framework layers fade in by the motion service only: egui's own Area fade-in is off
egui's fade asked for a repaint every frame until its age passed the animation time, a second open
fade beside the presence tween; with the clock still (a trial's frames) it never ended. The menu row
trial counts egui's two frames after input before asserting that the menu asks for none.
2026-11-17 15:18:40 +00:00
aiongg e34be45027 Merge commit '38bcf20e2c'; commit 'befe5b05bc' into fx/all-1117 2026-11-17 15:18:34 +00:00
aiongg befe5b05bc Picker trial finds the field columns by x 2026-11-17 15:17:59 +00:00
aiongg 38bcf20e2c Drop preview trial: the groups under test sit clear of the layout's top edge band 2026-11-17 15:17:26 +00:00
aiongg a749afa844 Colour picker grid: a channel field's edit is its response, not an option 2026-11-17 15:08:02 +00:00
aiongg 5909fadacf Dock placed rect: Node::Dock is non-exhaustive 2026-11-17 15:07:13 +00:00
aiongg b31c8c9adb Merge branch 'fx/tabs' into fx/all-1117
# Conflicts:
#	crates/ui-widgets/src/tabs/tab.rs
2026-11-17 15:06:35 +00:00
aiongg 76758ecfdd Wrap::Clip: one line cut at the room's edge without an ellipsis; panel tab labels use it 2026-11-17 15:00:38 +00:00
aiongg a537a838d6 Merge branch 'fx/dropview' into fx/all-1117 2026-11-17 14:59:50 +00:00
aiongg af12cd1005 Merge branch 'fx/tabs' into fx/all-1117 2026-11-17 14:59:50 +00:00
aiongg ac43942a7e Dock: native::send_to, so it doesn't shadow placement::place 2026-11-17 14:59:50 +00:00
aiongg 320762cb1e Dock drops mark the region the moved panels take
A dock drop's mark is DropMark::Region: the rect the moved panels take once
dropped, laid out from the layout after the drop by the functions the dock
draws with (tree frames, column cells, column group rects) in the room the
dock registered, pruned as the area shows it. A tab join adds its tab line; a
reorder in the own strip marks the line only. The ghost painter washes the
region with the drop rule's colour under the shared band. Region replaces
DropMark::Split; a spot without a placed rect marks a line along its edge.
2026-11-17 14:48:48 +00:00
aiongg f9b87ee8f1 fit test: a zero-width strip reserves no button 2026-11-17 14:48:44 +00:00
aiongg eae5f9b97d Tab label clip: the paint closure returns nothing 2026-11-17 14:48:39 +00:00
aiongg 76974ad2b4 Merge branch 'fx/float' into fx/all-1117
# Conflicts:
#	crates/ui-patterns/tests/it/docking/native.rs
2026-11-17 14:46:20 +00:00
aiongg 21fb984332 Merge branch 'fx/rail' into fx/all-1117 2026-11-17 14:46:03 +00:00
aiongg 86abdbad5b Merge branch 'fx/menu' into fx/all-1117 2026-11-17 14:46:03 +00:00
aiongg 3ab2e3ffdb Merge branch 'fx/scroll' into fx/all-1117 2026-11-17 14:46:03 +00:00
aiongg a49737494c Merge branch 'fx/nav' into fx/all-1117 2026-11-17 14:46:03 +00:00
aiongg 96d93ab89c Merge branch 'fx/picker' into fx/all-1117 2026-11-17 14:46:03 +00:00
aiongg ef59f1d81d Merge branch 'fx/tabs' into fx/all-1117 2026-11-17 14:46:03 +00:00
aiongg 75decedac1 Menu row trial: the frame egui runs after a move changes nothing and asks for none 2026-11-17 14:45:30 +00:00
aiongg dcafabbb10 Menu row trial: a menu that fits, every row 2026-11-17 14:43:08 +00:00
aiongg 924e6a5d55 Menu row trial: the rows the menu shows are those inside the menu's rect 2026-11-17 14:42:27 +00:00
aiongg 98a5dca470 Floating dock windows keep their size and place in OS windows
A collapsed native window records its expanded rect, so expanding it restores
its size; an open OS window always carries its maximum size, so a lifted strip
limit reaches the OS; a viewport is sized within its own limits; a dock opens
OS windows only where its mount would, so a float over a full-screen window is
an in-app window that moves; a native window's edge is measured and recorded
in app coordinates. The floating window's title row shows the double arrow and
Close; its menu opens from the band.
2026-11-17 14:42:12 +00:00