Fix whitespace reported by check-fmt:clj in files/variant.cljc,
logic/variant_properties.cljc and logic/libraries.cljc.
AI-assisted-by: claude-opus-5-5
prepare-restore-component and generate-delete-shapes fall back to other
data when the changes builder has no library data, objects or page. Use
an if on the has-*? check instead of (or (when ...) ...), which is
easier to read.
AI-assisted-by: claude-opus-5-5
apply-changes-local and the page index worker drop the :validate-shapes
changes with the same inline filter. Move it to
app.common.files.changes as skip-validate-changes, next to the
:validate-shapes change, so it is easy to find every place that skips
the validation if it changes in the future.
AI-assisted-by: claude-opus-5-5
generate-update-shapes only validates changes made on a page, and it
checked that with (and page-id ...) after pcb/get-page-id. The getter
now asserts that a page-id was given, so the check could never be false
and changes on a component container would fail on the assert instead of
skipping the validation.
Add pcb/has-page-id? and check it before calling the getter.
AI-assisted-by: claude-opus-5-5
generate-make-shapes-no-variant now validates the main instances it
takes out of the variant. Only those main instances change. The old
container is not validated, as callers such as generate-relocate call
this function before they move the shapes out of it.
Check with thf/validates-shapes-last? that the function validates the
expected page and shapes.
AI-assisted-by: claude-opus-5-5
The changes builder getters now assert that their context was given,
but prepare-restore-component and generate-delete-shapes relied on them
returning nil to fall back to other data. The workspace restores
components with changes that carry no library data, so restoring a
main component or a variant from one of its copies failed.
Add has-library-data?, has-objects? and has-page? to the changes builder,
and check them in those fallbacks before calling the getters.
Add tests that restore a component, and a variant whose container was
deleted, with changes that carry no library data, as the workspace does.
AI-assisted-by: claude-opus-5-5
generate-reorder-variant-poperties now validates the variant container
when the reorder changes something. All the components of the variant
change, so validating the container checks every main instance and that
all of them keep the same order of properties. A reorder that changes
nothing still returns the same changes, with no validation.
Check with thf/validates-shapes-last? that the function validates the
expected page and container.
AI-assisted-by: claude-opus-5-5
generate-set-variant-error now validates the main instance of the
component once its :variant-error is set or cleared. The change only
touches that main instance, so there is no need to validate the whole
variant container.
Check with thf/validates-shapes-last? that the function validates the
expected page and shapes.
AI-assisted-by: claude-opus-5-5
When a variant is renamed to a name that is not a valid properties
formula, rename-shape-or-variant passed an empty map as the updated
properties. The variant functions now assert that properties are a
vector or nil, so the rename failed. Pass an empty vector instead,
which means the same and keeps the order the properties have.
Add a test that renames a variant to an invalid name through a test
store and checks that it gets marked with :variant-error.
AI-assisted-by: claude-opus-5-5
generate-update-property-value now validates the main instance of the
component once the new value is set. The change only touches that
component and its main instance, so validating the whole variant
container would also check the variants that did not change.
Add thf/validates-shapes-last?, a test helper that checks that the last
redo change is a :validate-shapes change for the expected page and
shapes, and use it to test the function. Register
variant-properties-test in the runner so that it also runs on JS.
AI-assisted-by: claude-opus-5-5
The page index worker applies the same changes to its own copy of the
pages, which has no file id and no components. :validate-shapes changes
then always failed there, so the worker logged "error updating page
index" and stopped updating the snap and selection indexes of that page
after any validated change. Drop :validate-shapes changes before
applying them in the worker.
AI-assisted-by: claude-opus-5-5
apply-changes-local replays the pending redo changes on a local copy of
the data, so that later builder calls can read up-to-date values. It
replayed :validate-shapes too, so the validator ran on that copy, which
has no real file id and no libraries, and reported false errors such as
:component-main-external. This broke Ctrl+K on a component when it
duplicates the main instance and resizes the variant container.
Skip :validate-shapes when applying changes locally.
AI-assisted-by: claude-opus-5-5
transform-in-variant (Ctrl+K on a component) runs a chain of events,
each one committing its own changes. It set the variant-id on the main
instance before setting it on the component, so the shape validation
of that step saw them out of sync and rejected the change.
Set the variant-id on the component first, and give the main instance
an empty variant-name, which is what the validator expects while the
variant has no properties yet.
Add a test that runs transform-in-variant through a test store.
AI-assisted-by: claude-opus-5-5
* ✨ Add nitrate methods to bring owned teams into an organization
Nitrate lets an organization owner add the teams they own, outside any
organization, from the Admin Console. Three management methods give it
what it needs:
- get-owned-teams-detail lists the owned, non-default teams of the
current profile with the get-teams-detail fields plus member ids, so
Nitrate can count members new to the organization.
- count-organization-team-invitations-for-non-members counts, per team,
the pending invitations for people outside the organization.
- send-organization-setup-sso-emails-for-team sends the SSO email to
the people an added team brings in, as add-team-to-organization does.
get-teams-detail now shares its row query with the new method.
AI-assisted-by: claude-opus-5-5
* ♻️ Rename the team detail row helper apart from its method
The private helper shared by get-teams-detail and get-owned-teams-detail
had the same name as the get-teams-detail RPC method, which read as one
calling the other. It is now get-teams-detail-rows.
AI-assisted-by: claude-opus-5-5
* 🔧 Test empty lists in the invitation count
Cover count-organization-team-invitations-for-non-members at the
method boundary: an empty team-ids list gives no counts, and an empty
member-ids list, or one whose profiles give no email, counts every
pending invitation of the requested teams.
AI-assisted-by: claude-opus-5-5
* 🐛 Keep trailing spaces in WASM text bounds
Skia's longest_line() and line widths leave out the spaces at the end
of a line, so auto-width texts lost their trailing spaces in the
selrect, and the tight text bounds cut them off too. Fonts that draw
a glyph for spaces, like Zilla Slab Highlight, showed the gap.
- Measure auto-width text with max_intrinsic_width(), which keeps
trailing spaces.
- Extend each line's tight bounds with the rects of its whole range,
trailing spaces included.
Closes#12998
AI-assisted-by: claude-opus-5-5
* 🐛 Paint trailing spaces in WASM text
Skia lays out the spaces at the end of a line but never paints them.
Fonts that draw a glyph for spaces, like Zilla Slab Highlight, lost
those glyphs on the WebGL renderer.
- End each paragraph that ends in whitespace with a zero-size
placeholder. The spaces are no longer trailing, so Skia measures and
paints them with the right glyphs and paints.
- Add it to the fill and stroke builders alike, so their layouts match.
- Leave it out when it would wrap onto a line of its own in a fixed or
auto-height box, which would add an empty line. A probe layout per
paragraph decides this, cached per content version and box width.
Closes#12998
AI-assisted-by: claude-opus-5-5
Point the public CSS export to the generated file and test its build.
Clarify component restoration and cover the deleted-file path. Update
integration test documentation for the release bundle.
AI-assisted-by: gpt-6.1-terra
Add `gh.py create-pr` to create pull requests with automatic base detection,
optional issue linking and support for project and draft options. Normalize
and validate detected base branches, and report the created URL if issue
linking fails. Update the skill and workflow documentation, and cover the
command and base detection with tests.
AI-assisted-by: hy4-flash-free
* 🐛 Restore the WASM stack pointer after a failed call (#12978)
A failed render-wasm call traps without popping its shadow-stack frames.
Each failure leaked stack until it overwrote static data, and from then on
every call trapped as wasm-critical. h/call now saves the stack pointer
before the call and restores it on failure.
Closes#12977
Related to #12906
AI-assisted-by: claude-opus-5-5
* 🐛 Fix render-wasm panic when an auto layout has only absolute children
An auto flex or grid layout whose children were all absolute shrank to
zero, and a rotated shape below it got a matrix that cannot be inverted,
which panicked in `_propagate_modifiers`. Skip auto-size when there is
no content, as CLJS does. A matrix that still cannot be inverted is now
a recoverable error, which shows a toast instead of the error page.
Closes#12763
AI-assisted-by: claude-opus-5-5
* 🐛 Count hidden children in render-wasm grid auto-size
A grid takes its size from its tracks, so, like CLJS, it skips auto-size
only when every child is absolute. Flex still skips hidden children,
since its line building leaves them out.
Refs #12763
AI-assisted-by: claude-opus-5-5
Hovering a grid frame requested a full render. That clears the
canvas and walks every visible tile even though the overlay is
only UI. show_grid and hide_grid now re-present the last frame.
Warn that recovery may discard unsaved edits instead of implying that
reopening is the only recovery path. Update the API docs and test.
AI-assisted-by: gpt-6.1-terra
Correct session, upload and validation boundaries and consolidate
related testing and frontend recovery guidance by task.
AI-assisted-by: gpt-6.1-terra
Distinguish removing shape assignments from removing cells and clarify
the development overlap helper's actual empty-map check.
AI-assisted-by: gpt-6.1-terra
Build legacy migration fixtures from the datafied library to avoid
ClojureScript inference warnings without changing the test cases.
AI-assisted-by: gpt-6.1-terra
Show the existing interactive test command in help and documentation,
and check that help only names package scripts that exist.
AI-assisted-by: gpt-6.1-terra
Distinguish detaching a token source from absorbing its library and
record when a direct set change clears active themes.
AI-assisted-by: gpt-6.1-terra
Keep the save lifecycle guidance together under a direct name and
update references across the client and server guidance.
AI-assisted-by: gpt-6.1-terra
Unify token model and workspace behavior, update activation semantics,
and keep general schema coercion in a separate memory.
AI-assisted-by: gpt-6.1-terra
Document preview cleanup on gesture end and unmount alongside commit
and cancellation boundaries in a directly named memory.
AI-assisted-by: gpt-6.1-terra
Keep construction, application, compaction, and schema validation in
one memory and update frontend and backend references.
AI-assisted-by: gpt-6.1-terra
Bring geometry invariants and numeric precision together while keeping
component sync comparisons in the component memory.
AI-assisted-by: gpt-6.1-terra
Bring component and variant behavior, referential repair, and diagnosis
together while keeping schema validation and change mechanics separate.
AI-assisted-by: gpt-6.1-terra
Keep touched and geometry boundaries and document the live shape lookup
that prevents swaps from acting on stale positions.
AI-assisted-by: gpt-6.1-terra
Split common file change and repair rules into focused memories and
link each topic directly from the common module guide.
AI-assisted-by: gpt-6.1-terra
Keep runtime selection, state lookup, and temporary instrumentation
constraints without assuming a specific MCP integration is available.
AI-assisted-by: gpt-6.1-terra