`dim_block_entities` makes the contents of a dimension's anonymous `*D`
block from the dimension's drawn geometry. It lived in the DXF writer
(`crates/io/src/dxf_write/blocks.rs`) and only the writer could call it.
It moves to `crates/render/src/dim_block.rs`, beside the geometry it reads,
and is exported as `cadcraft_render::dim_block_entities`. The writer calls
it there.
The body is unchanged: the three `cadcraft_render::` paths in it lose their
prefix and `pub(super)` becomes `pub`. No behaviour changes.
* DXF: a block record keeps its annotative flag and uniform scaling
A BLOCK_RECORD's AcadAnnotative xdata (references to the block are
annotative) was dropped on reading, AcadAnnotative being among the
applications CADCraft writes itself, and never written: a saved drawing's
annotative blocks came back plain, and AutoCAD then scaled their references
by units instead of the annotation scale (a metre block showed Unit factor
1000 and Scale 0.005). Group 281 (scale uniformly) was dropped too. Both are
now read into the block (`Block::annotative`, `Block::scale_uniformly`) and
written back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: a block reference keeps its annotation scale contexts, following the reference
A reference to an annotative block holds its scale at each annotation scale in
its extension dictionary (AcDbContextDataManager, ACDB_ANNOTATIONSCALES).
CADCraft dropped it with the other annotation contexts it means to write from
its model, but it models none for references: with the block's annotative
flag kept, AutoCAD then scaled the reference once more by the current
annotation scale (5 became 25). A reference's contexts are now kept, and
refreshed on writing: each moves, turns and scales by what the reference did
since the file was read (its default context was the reference then), so a
reference left alone keeps them as read. The scales they name are found by
name (SCALE group 300), as the scale list is written again from the model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Block literals in tests take scale_uniformly; a test helper's lifetime is elided
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: a block reference's attributes keep their annotation scale contexts
The attributes of an annotative reference hold their own contexts (insertion
and alignment points and rotation at each annotation scale, under the ATTRIB's
extension dictionary), dropped like the reference's were. CADCraft writes
attributes with new handles, so their extension dictionaries are now kept by
attribute, as its reference's handle and tag, and put back on the attribute
written with that reference and tag. On writing each context keeps its own
place in the block at its scale, moves by what the attribute did in the block
since (its default context then, the attribute now), and is placed by the
reference's context for that scale as it is now: a reference left alone keeps
them as read; one moved, turned or scaled carries them exactly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DWG: block reference annotation contexts keep their rotation, insertion and scales
AutoCAD's DXF has a block reference context's rotation (50, degrees),
insertion point and scales straight after its scale (340). acadrust 0.6.4
reads them after an AcDbBlkRefObjectContextData marker, with the rotation in
radians, and without the marker read zeros: a drawing saved as DWG had every
annotative reference at scale 0 at its other annotation scales, where
AutoCAD then drew nothing. The DWG bridge now gives acadrust the contexts its
way (marker, radians) and turns its DXF back into AutoCAD's (no marker,
degrees).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: kept reference contexts follow the drawing's and the reference's scales
A kept block reference or attribute context whose SCALE is no longer in the
drawing's list is not written (its dictionary entry goes with it), so no
context points at a null scale. A reference CADCraft's model keeps annotative
has a context for exactly the scales it supports: contexts of scales it
dropped go, and one per new scale is made from the default context, scaled
by the ratio of the scales about the reference's insertion point. One
context stays the default.
Attributes are identified by reference, tag and their place among the
reference's attributes with that tag, so two attributes with one tag keep
their own extension dictionaries and contexts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: new reference contexts come from one whose scale is still written
When the default context's scale had been deleted from the drawing's list,
a reference CADCraft keeps annotative got no new contexts for its added
scales; the template is now its default context, else its first, among
those whose SCALE is written.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: kept reference contexts follow the reference as read; one default rule
A kept context is brought up to date by what its block reference did since
the file was read. That baseline was the default context, which needn't be
where the reference was (an unchanged save then moved every context); the
reference and its attributes as read are now kept (`Foreign::placements`)
and used, the default context only for data without them.
A context's own offset from the reference now scales and mirrors with it
(back into the reference's frame then, scaled, turned to its frame now), not
only turns.
The default context is the one whose first 290 group is 1 everywhere (an
attribute context has a later 290 of its own).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: new reference contexts take handles above every handle in use
Upstream now believes handles above 2^48 (AutoCAD writes them), so new
annotation contexts can no longer take stand-in handles from 2^48 up: they
start above the written handles, $HANDSEED, the kept objects and their targets.
Test: a drawing whose reference sits at 2^48 + 1 gains a scale and every
written handle stays unique (red with the old 2^48 base).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: an attribute as read is found by its tag and place, and keeps its rotation
A kept attribute placement was looked up by its index among the reference's
attributes now, which differs once they are reordered or replaced (ATTSYNC).
It is now found by tag and place among that tag, like the attribute's contexts.
The rotation change is measured from the attribute as read too, not from its
default context, so an unchanged save no longer turns every context when the
ATTRIB (at the current scale) and the default context differ.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: the kept-context code in read and finish moves into helpers
main now denies cognitive_complexity over 30 and too_many_arguments over 7.
This PR's additions took read to 32 and finish to 31, and retained_objects
to 8 arguments: the block-reference and attribute bookkeeping now lives in
insert_handles, of_insert, keep_attrib_dictionaries, keep_placements,
written_attribs and refreshed_contexts, and retained_objects takes the root
and its entries as one pair.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* DXF/DWG: annotative text, MText and dimensions keep their annotation scales on save
AutoCAD keeps an annotative object's size at each annotation scale it
supports in scale contexts (extension dictionary AcDbContextDataManager,
ACDB_ANNOTATIONSCALES, one *OBJECTCONTEXTDATA_CLASS per scale), with the
object's own groups at its default scale. CADCraft dropped AutoCAD's contexts
on read, so those objects opened as plain text at the default scale's size
and lost their scales on save; its own annotative objects went out with only
CADCraft's private record, so AutoCAD showed them at one size at every scale.
Text, MText and dimensions in model space and layouts are now written at
their default scale (the current one when supported) with AcadAnnotative
xdata and a context per scale: text insertion and alignment points, MText
width and columns, a dimension's text position and a *D block with its
geometry at that scale (sharing the DIMASSOC's extension dictionary when
there is one). Scales missing from the list are added. Reading takes the
scales from the contexts and the sizes back to paper size. Files before the
2007 format keep CADCraft's record as before. The DWG bridge gives acadrust
text contexts its way (marker, radians) and dimension contexts' blocks as
BLOCK_RECORD handles, and turns them back.
Checked in AutoCAD: it opens the output, keeps both contexts of each
object, and draws the dimension at 0.18 / 9.0 text height at 1:1 / 1:50.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF test: a justified text's start point is recomputed on save (since #1062)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: only annotative dimensions get a *D block per scale
Annotative text and MText went through the dimension block planning too and
left one empty anonymous *D block per scale in every saved file. The hostile
contexts test now saves, opens the file again and checks the scales and that
every context names a written SCALE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF/DWG: annotative multileaders keep their annotation scales on save
An annotative multileader's scale context (ACDB_MLEADEROBJECTCONTEXTDATA_CLASS)
holds the multileader's whole CONTEXT_DATA body at that scale: overall scale
(40), text height, arrowhead size, landing gap, content position and the
leaders. CADCraft dropped AutoCAD's on read and wrote none, so annotative
multileaders came back plain at the default scale's size, and AutoCAD showed
CADCraft's at one size at every scale.
Multileaders now go through the annotation scale contexts like text, MText
and dimensions: written at the default scale with AcadAnnotative xdata and a
context per scale (the entity writer's CONTEXT_DATA at that scale, with its
overall scale and landing gap set), read back at paper size. The DWG bridge
gives acadrust the CONTEXT_DATA{ group it reads the context after, and takes
acadrust's braces and marker out again.
Checked in AutoCAD: its own annotative multileader reads back at 1:2 and
1:10 at paper size, and the saved file reopens with text 0.18 / 0.9 as
before; one made in CADCraft opens with text 2.5 / 25 at 1:1 / 1:10, the text
moved with the scale.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: the current annotation scale is AutoCAD's CANNOSCALE variable
AutoCAD keeps the current annotation scale in the named object dictionary's
AcDbVariableDictionary, as a DICTIONARYVAR CANNOSCALE naming the scale.
CADCraft read only its own record, so AutoCAD's drawings opened at 1:1
whatever their scale (annotative objects then showed at their first scale),
and the variable was written back as read, so AutoCAD reopened a drawing at
its old scale after CADCraft changed it.
The variable is read when the scale is in the list (after CADCraft's record:
AutoCAD keeps that record as it was, so the variable is the newer one), and
the kept variable is written with the drawing's current scale. Annotative
objects are written at that scale.
Checked in CADCraft and AutoCAD: an AutoCAD drawing at 1:2 opens at 1:2;
switched to 1:10 and saved as DXF and DWG, AutoCAD opens both at 1:10.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF test: an annotative multileader has no *D block
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: AutoCAD's CANNOSCALE names the scale the contexts are written at
A CANNOSCALE naming none of the drawing's scales wrote that name to the
variable dictionary while the default contexts were written at 1:1; the
variable now names the resolved scale too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DWG: a multileader context's body closes (301 }) before the next record
As acadrust writes it; its reader stops at the next record either way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Annotative objects keep a position per scale; ANNORESET synchronizes them
An annotative object that supports several scales can now sit somewhere
else at one of them, as in AutoCAD: its position grip moves it at the
current annotation scale only, MOVE/ROTATE/SCALE/MIRROR/paste/CHSPACE move
every scale, and ANNORESET puts every scale back where the current one is
(it was a no-op). The offset is kept per scale name (Common::anno_moves)
and applied where an object is drawn at a scale (anno_placed), so drawing,
extents, explode and grips all see it. Grips now show where the object is
drawn at the current scale; a shape grip's edit is taken back to paper size.
What moves per kind: text, MText and block references as a whole; a
multileader's landing and content (arrowheads stay); a dimension's text.
DXF/DWG: each scale context is written at the object's position at that
scale, and a context placing the object elsewhere reads back as its offset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: an annotative multileader has annotation scale enabled (293)
The MULTILEADER entity's 293 after its CONTEXT_DATA block is the DXF
reference's "Enable Annotation Scale". CADCraft wrote 0, so AutoCAD kept
the multileader's per-scale contexts (and showed each scale's position)
but its ANNORESET passed the multileader over. With 293 = 1, as AutoCAD
writes for its own annotative multileaders, ANNORESET at either scale
moves the other context to the current scale's position.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Annotative grips and ANNORESET in a viewport use the viewport's scale
In MSPACE the renderer draws model space at the active viewport's scale,
while grips, grip stretches, the hot-grip preview, grip dimensions and
ANNORESET looked up the object at CANNOSCALE: with the two different, grips
sat on another scale's representation and a position grip moved the wrong
scale. They now take the viewport's scale (`DocState::anno_view`,
`Drawing::anno_draw_in`); CANNOSCALE still applies in model space and on
paper outside a viewport.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Annotative scales: import Vec2 after upstream's explicit-import cleanup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Docs: leave the parity docs to the maintainers (AGENTS.md: PRs don't edit them)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Docs: leave the parity docs to the maintainers (AGENTS.md: PRs don't edit them)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Docs: leave the parity docs to the maintainers (AGENTS.md: PRs don't edit them)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Annotative text contexts test: Dimension gains insertion_point on main
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* io: dxf_anno uses craft_dxf, as main's DXF crate now is
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* io: dxf_anno uses craft_dxf, as main's DXF crate now is
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* io: dxf_anno uses craft_dxf, as main's DXF crate now is
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests: the DWG annotation scale round trip waits for craft-libs#2005
Without the bridge's annotation context conversion, a text context read back
from a DWG has its fields from the wrong groups (at the origin), which per-scale
positions read as a move. Ignored until the pinned craft-dwg has the conversion.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fmt: dxf_anno's craft_dxf import in order
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fmt: dxf_anno's craft_dxf import in order
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fmt: dxf_anno's craft_dxf import in order
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* io: dxf_anno reads main's borrowed DXF sections (SectionRef)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Annotative positions: main's text editor box and extents take the placed object (AnnoDraw::Scaled carries its offset)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF writer: annotation scale planning in two helpers (main's tags_kept_for passed the complexity limit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Select: a blank MText frame is where its annotation scale places it (main's AnnoDraw use, with the offset)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF: a block reference moved in elevation takes its contexts along, at their own heights
block_contexts compared the reference with the one read in X and Y only, so a
reference moved only in Z kept its contexts at their old heights; and any
other change set every context's group 30 to the reference's Z, losing a
context's own height. Z is part of the change check now, and each context
keeps its offset from the reference as read, scaled with the reference's Z
scale as X and Y follow theirs.
FredApps on #1244.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests: the annotative block context tests join the io test binary (AGENTS.md rule 30)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests: the annotative text context tests join the io test binary (AGENTS.md rule 30)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests: the annotative position tests join the engine's test binary (AGENTS.md rule 30)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DWG: block reference contexts and the block's annotative flag stay DXF-only until the bridge converts them
The DWG bridge doesn't carry annotation scale contexts into a DWG yet
(storytold/craft-libs#2005): the DWG reader read them back as zeros, a
reference at scale 0 at its other scales. A save through the bridge now
leaves the kept block reference and attribute contexts out, as before they
were kept, and the block's AcadAnnotative flag too (without its references'
contexts AutoCAD would scale them by the annotation scale once more). DXF
keeps both.
The DWG round-trip test that waited for craft-libs#2005 (ignored,
a_reference_s_contexts_survive_dwg) is replaced by one that runs: a DWG save
leaves the contexts out and the reference reads back at its own scale. The
round trip of the contexts through DWG follows once the bridge converts
them.
FredApps on #1362 (rule 31).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DWG: annotative text, MText and dimensions keep their scales in CADCraft's record until the bridge converts contexts
A save through the DWG bridge writes no annotation scale contexts now: the
bridge doesn't convert them yet (storytold/craft-libs#2005), so CADCraft's own
record carries the scales, as for an older format. DXF from 2007 on writes the
contexts as before.
The DWG test that waited for craft-libs#2005 (ignored) now runs: the scales,
paper height and rotation come back through DWG from the record, and the DWG
holds no contexts. The contexts' own round trip through DWG follows with the
bridge.
FredApps on #1362 (rule 31).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests: the multileader's DWG round trip runs, through CADCraft's record
The multileader DWG test that waited for craft-libs#2005 (ignored) now runs:
its scales and paper text height come back through DWG from CADCraft's own
record, and the DWG holds no multileader contexts. The contexts' round trip
through DWG follows with the bridge.
FredApps on #1362 (rule 31).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DWG: per-scale positions travel in CADCraft's record; main's annotation_scales round trip runs again
A DWG save writes no annotation scale contexts while the bridge can't convert
them (storytold/craft-libs#2005), so an object moved at one scale alone would
lose that move through DWG. CADCraft's annotative record now carries each
object's moves next to its scales (only for scales it keeps, finite, at most
MAX_SCALES), as it does for formats before 2007.
The roundtrip/dwg annotation_scales test this PR had marked ignored (main's
own test) runs again, unchanged, and passes; the multileader moved-at-one-scale
DWG test runs too, through the record.
FredApps on #1362 (rule 31).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* DXF writer: the DWG bridge's context choice in contexts_for (finish passed the complexity limit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep annotative I/O fixture at normal text orientation
---------
Co-authored-by: Cody Vogt <18035288+codyvogt@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* Linux: native Wayland by default; CADCRAFT_X11=1 for XWayland
On a Wayland desktop CADCraft forced winit's X11 backend (XWayland)
whenever DISPLAY was set. The deb and rpm only recommend the X11
libraries, and without libxkbcommon-x11 winit panicked at startup:
"Library libxkbcommon-x11.so could not be loaded".
Run natively on Wayland instead: sharp at fractional scales, with
working input methods. File drops from the file manager work there too,
through storytold/winit's W15 patch. CADCRAFT_X11=1 opts into XWayland
as a fallback, and only when the X11 libraries load; otherwise it logs
what is missing and stays on Wayland. It is read with the other
variables in env.rs and replaces CADCRAFT_WAYLAND.
The deb and rpm recommend libxkbcommon-x11 (and rpm libX11-xcb) too.
Ported from WordCraft (storytold/wordcraft#3359).
* GNOME Wayland: draw the window buttons and resize edges in the app
GNOME's compositor offers no zxdg_decoration_manager_v1, so with native
Wayland it draws no frame for CADCraft. Where the protocol is missing,
the window opens without winit's frame and the app draws a title row as
GNOME's header bar: the drawing's name centred, and minimize, maximize
and close in the order GNOME's button-layout names (read once through
the XDG Desktop Portal). Thin zones along the window's edges resize it.
KDE, Sway, Hyprland, COSMIC and X11 keep the desktop's frame.
Options > Display > Use system title bar (OPTIONS key systemTitleBar)
brings back winit's frame at once. It is kept in workspace.json, which
is now read before the window opens. CADCRAFT_TITLEBAR=app or =system
overrides the detection. The new strings are translated in all 15
catalogs.
Ported from WordCraft (storytold/wordcraft#3361).
* Linux: decide the window frame from the backend winit runs on
On an X11-only session winit picks X11 without CADCRAFT_X11, so x11
stayed false and CADCRAFT_TITLEBAR=app drew the app's window buttons on
X11, whose window manager draws the frame. runs_on_x11 follows winit's
own choice (WAYLAND_DISPLAY or WAYLAND_SOCKET set and not empty).
* Linux: leave WAYLAND_SOCKET to winit; empty DISPLAY; TITLEBAR=app wins
Three CodeRabbit findings on #1853:
- The decorations probe connected with Connection::connect_to_env, which,
given WAYLAND_SOCKET, takes that descriptor, removes the variable and
closes it when the probe's connection drops, so winit had no Wayland
connection left. The probe now connects only to WAYLAND_DISPLAY's
socket (display_socket, found as wayland-client finds it); with only
WAYLAND_SOCKET it doesn't probe and the desktop keeps the frame.
- An empty DISPLAY counted as an X display, so CADCRAFT_X11=1 forced X11
with nothing to connect to. DISPLAY is now read as winit reads the
Wayland variables: set and not empty.
- CADCRAFT_TITLEBAR=app chose the app's buttons, but a saved Use system
title bar still kept winit's frame, at startup and in
CadApp::draws_window_frame. Both now decide with app_draws_frame, which
the override wins (CadApp::frame_forced), and Options doesn't offer the
setting while it's overridden.
Tests: display_socket and forces_app (decorations), an empty DISPLAY
(main), and titlebar_app_overrides_the_saved_system_title_bar.
* i18n: window button and title bar rows for bs, ka, pl and vi
These catalogs arrived on main after this branch added "Minimize",
"Maximize", "Use system title bar" and its tooltip to the others, so
every catalog now has all four rows.
* Drop the parity-doc edits; the rows go in the PR description
AGENTS.md: PRs don't edit ROADMAP.md or docs/ui-parity.md.
---------
Co-authored-by: bmh129 <11478682+bmh129@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Reverts the Merge #3580 commit (0d70d25f, first parent) and the landing fix that moved its
tests into tests/it (4ecd4aed). #3580 is not ready (changes still requested on 9bbe7b69) and lands
on its own. #3601, #3497 and #3503 stay.
Land #2825, #2347, #2350, #2103, #3164: PER, TAN and Center from anywhere on the object, Tab through every snap, CIRCLE tangents, viewport-frozen layers
Conflicts: crates/engine/src/session/cmdline.rs (lisp_answer keeps main's 3D point Z handling),
crates/ui-egui/src/i18n.rs (Hebrew registered next to Dutch and pt-PT; the legacy iw tag still
selects he through the new region-aware locale matching), crates/ui-egui/src/options.rs and
docs/localization.md (both language lists).
main's snap Z (#1511) records what each candidate lies on; collect_in, finish and finish_all
now carry those sources, so the hit chosen (or each Tab candidate) takes its object's Z:
gathered and intersection points from the gather, perpendiculars and tangents from the base
from their object, centers, deferred snaps and Nearest from their curve.
The TRIM, EXTEND, FILLET and CHAMFER changes for rays and xlines now live in
the split modules (cmd/modify/trim.rs, cmd/modify/fillet.rs,
cmd/modify2/trimext.rs, cmd/trimextend.rs). The tests move to the integration
suite (tests/it) and the parity rows are carried over.
Based on the conflict resolution and the added tests in
marcoarnulfo/cadcraft#1 by yohanesyuen.
Co-authored-by: yohanesyuen <4329125+yohanesyuen@users.noreply.github.com>
muda 0.22 takes Option<Arc<dyn Fn(MenuEvent) + Send + Sync>> in
MenuEvent::set_event_handler. Wrap the existing closure in Arc::new;
event delivery and the repaint wakeup are unchanged.
- A serving window publishes its connection again when the one the file
names has closed (two windows that started together both serve).
- The AI Agents tab shown with agent folders in force refuses every save
until the person shows it afresh, so a later unconfined pass (focus
loss) can't commit what an agent typed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- lisp_tick runs under the stored agent roots, so the slice right after
the request that started the routine (same logic call) is held too.
- The AI Agents tab says saving waits until the agent's work has finished.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mcp --when-closed: a typed parse error (ast-grep string-error).
- mcp honours --config-dir when it looks for the window.
- A second window with the same settings folder leaves the first one's
connection alone and takes over once that window has closed.
- An agent's LISP routine that runs past its first slice stays held to the
agent folders until it ends.
- The AI Agents settings refuse changes while agent folders are in force,
so an agent can't widen them by clicking in Options.
- Docs: a usable write folder still allows reads; the test dir is reset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ui.click, ui.key and ui.text are handled frames after the request, outside
its confinement; keep the agent's roots in force over logic and UI passes
until that input has gone through a UI pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While ArtCraft Launcher > Settings > AI agents names CADCraft, the open
window serves its control channel for agents (craft_automation's
AgentLink: token file, agent-connection.json, the switch, retries), and
plain `cadcraft-cli mcp` reaches it through the shared live client
(craft_control::agents::Live) with the challenge handshake; otherwise it
works headless as before.
- Agent requests in the window run inside the agent folders of the new
Options > AI Agents tab (the shared Agents page), like headless roots;
ui.render and ui.screenshot paths are checked too.
- The agent settings are saved in agent-settings.json for the CLI; no
command changes them.
- `mcp --headless`, `--when-closed`; `--connect` deprecated for a release.
- New `agent_folders` tool.
Closes#3769.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ArtCraft Launcher lists an app for AI agents only when <id>-cli sits
beside its executable, so on macOS CADCraft was left out. Copy the CLI
into Contents/MacOS and sign it before the bundle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>