Typed text always went into an existing span and took its reading and
warichu note with it: selecting all and typing, deleting everything and
typing again, or typing right after a reading extended it to the new
characters.
Text typed at either edge of a reading or warichu note now goes to the
neighbouring plain span, or to a new span with the same style and no
annotation. Inside a reading, including between spans that share one,
it keeps the reading. A span emptied by a deletion or an Enter at its
edge drops its annotation, and overtype at the end of a reading replaces
the text after it.
The editor export marks those spans with `d`, and the frontend drops
their `:ruby`, `:ruby-group` and `:warichu` when it merges the content.
Readings WASM does not draw, hidden ones or those the text language
leaves out, reach it as flag 8, so typed text stays out of them too.
AI-assisted-by: claude-opus-5-5
Opening a file showed a blank page until every font its texts use had
loaded, up to 3 seconds: the page reveal waited for all of them. Now the
page shows at once, and only a text whose font is still loading stays off
the canvas, until its own faces are stored or have failed. Past 3 seconds
from the first text held, every text shows, in a fallback face if its
font is still missing, and is laid out again when the font arrives.
WASM keeps the flag per shape and skips drawing such a text, its shadows
included, except in exports and thumbnails. Only a page load holds texts:
editing, thumbnails and component renders draw them as before.
The fonts of a page also start loading with each batch of shapes sent to
WASM, rather than after the whole page was sent and first drawn.
AI-assisted-by: claude-opus-5-5
The reading options of the whole text, in the Furigana group, sit among
the other rows of the language view and need no box. The box now marks
them only when the ⋮ button of a selection opens them below its reading
input.
AI-assisted-by: claude-opus-5-5
The language view follows the review of the demo build:
- A divider sets each group apart. Clearance is always a Layout option.
- The reading field takes the format's name as placeholder, an eye button
hides the readings, and its options open in place, two to a row, until
the button is pressed again or the selection changes.
- The readings group of the whole text takes the same style and shows
only while no text is selected. Japanese calls readings furigana, and
side reads Over / right or Under / left in both writing modes.
- Japanese tate-chu-yoko joins the writing mode row, with the digit
count in its own row; warichu and combine get labelled rows.
- Chinese emphasis marks are selection options only. Readings default
to zhuyin in Taiwan and Hong Kong while the selection can take it.
- Korean texts given the language break by word, now "By word". Texts
that already have a wrapping, or none, keep it.
AI-assisted-by: claude-opus-5-5
A vertical column was never narrower than 12px times the line height:
the largest font size of the paragraph was seeded with 12, so a column
of text from 4 to 12px measured the same, about 17px at a line height
of 1.4, where a horizontal line of 4px text measures 6px.
The largest span now sets the column alone; 12px is only the size of a
paragraph without spans.
AI-assisted-by: claude-opus-5-5
Setting `align` on a text range through the plugin API stored the value
on the range's spans, while the renderers read it from the paragraph, so
it was saved but never drawn, in horizontal and vertical text alike. The
range `direction` setter had the same fault and wrote a `:direction` key
that nothing reads at all.
Both now go to the whole paragraphs the range touches, as the language
already did, and their getters read those paragraphs: spans of a new
text carry the default values, which used to hide the paragraph ones.
AI-assisted-by: claude-opus-5-5
Pressing Escape in the text editor with the language options open left
the "Selected text" group on screen. Leaving edit mode renders the
options again while the WASM editor still holds its selection: the
editor component disposes it later, when it unmounts, and nothing
renders the options after that unless the text changed.
The WASM selection now only counts while the store still has the text in
edit mode, which Escape clears first.
AI-assisted-by: claude-opus-5-5
Converting a text to a path right after changing its font traced the
fallback face: the outline came from WASM while the new font was still
being fetched. Plugin `flatten` and the Flatten menu share this path, so
both were affected, with any font and any writing mode.
With the WASM renderer, the conversion now waits until the faces of the
texts it converts are stored or have failed, lays those texts out again
and then outlines them, reading the page as it is then. The wait gives up
after 10 seconds. It is tracked as `:font` reflow work, so
`waitForLayoutUpdate` and the MCP tools wait for the conversion. Without
a pending font the conversion still runs at once.
AI-assisted-by: claude-opus-5-5
A warichu sub-line stacked its upright glyphs by their horizontal
advance. A half-width digit is taller than it is wide, so `39` in a
note drew its two digits on top of each other. Kanji numerals are a full
em wide and hid the problem. Tate-chu-yoko never applied inside a note,
so `digits2` made no difference.
Each note glyph now advances by its upright flow advance, the rule
upright cells of the main text already used: the font's `vmtx` advance,
or else its horizontal advance floored to an em for Latin and digits. The
note's extent and its painter share the rule through
`ShapedRun::upright_cluster_advance`.
Tate-chu-yoko stays off inside a note: its digits stand one by one, as
kanji numerals do. A combined pair would leave each digit a quarter em
wide in a half-size sub-line, and could not cross the note's split into
two sub-lines.
AI-assisted-by: claude-opus-5-5
Upright vertical runs were shaped with both `vert` and `vrt2`. On top of
the vertical forms, `vrt2` swaps proportional glyphs such as Latin for
forms already turned on their side. Shippori Mincho and BIZ UDMincho map
Latin that way, so their Latin stayed sideways under text-orientation:
upright. Noto Sans JP and Noto Serif JP do not, which hid the problem.
Shape upright runs with `vert` only, as browsers do. Sideways runs are
rotated by the layout, so mixed text does not need `vrt2`. For Noto Sans
JP and Noto Serif JP the glyphs of kana, kanji and CJK punctuation are
the same with or without `vrt2`.
Add a Shippori Mincho subset as a test font.
AI-assisted-by: claude-opus-5-5
A text reflow signal keeps the text pending until a resize or
measurement starts, so a signal that no resize follows makes
`waitForLayoutUpdate` time out. The note names where the signal is
decided and the prop that a commit path laying out its own texts passes.
AI-assisted-by: claude-opus-5-5
A reading longer than its base grows the base to the reading's width,
and neighbouring readings get no overhang room, so per-character Pinyin
or Jyutping wider than its characters ran into the next reading
("gwong2dung1waa2").
A reading without upright characters that sits beside another reading
now claims an eighth of a ruby em at each end when its base grows, in
horizontal and vertical text. Kana and Han readings stay solid.
AI-assisted-by: claude-opus-5-5
Each language keeps the CJK attributes it does not render, so they come
back when the text takes that language again. The Plugin API accepted
and reported them without saying that they had no effect, such as
`textCombineUpright` on a Chinese text or `writingMode` on a text with
no language. Each member now names the languages that render it.
AI-assisted-by: claude-opus-5-5
A text update raised the text reflow signal whenever the text was
auto-sized before the update, and the wait then held the text until a
WASM resize started. Nothing resizes a text that the update makes fixed,
and a commit of WASM modifiers has already laid its texts out, so
`waitForLayoutUpdate` timed out after `Text.resize` or a drag resize.
- The signal reads the grow type after the update: only an auto-sized
text waits for a WASM resize.
- `apply-wasm-modifiers` marks its commit with `:text-reflow? false`.
AI-assisted-by: claude-opus-5-5
The editor overlay reserves a viewport of room for the text to grow
during an IME composition, and that room caught every pointer event, so
a middle-button pan or a click to the right or below the text never
reached the viewport. The overlay keeps its size, and its clip, which
also limits hit testing, now covers only the text.
AI-assisted-by: claude-opus-5-5
- The readings group of the Language view and its hide switch read
Pinyin, Zhuyin or, when a text mixes both, Readings, instead of Ruby.
- The options toggle of the pinyin input and the options button of the
text selection menu read Pinyin options.
- The text selection menu shows no presentation options for zhuyin,
whose size and position are fixed, as the sidebar already does.
AI-assisted-by: claude-opus-5-5
Mainland spacing trims the right half of a stop's em, where its font
leaves it blank. A Traditional Chinese face draws ,。:; centred, so
the trimmed stop drifted from the text before it and crowded the next
mark. The layout now measures where the font draws each stop and trims
a centred one by a quarter em on each side, as Hong Kong spacing does.
Add a Noto Serif TC subset as a test font.
AI-assisted-by: claude-opus-5-5
The blurred backdrop is drawn in page space keeping the scale of the
PDF canvas. Reset to identity, it was drawn about four times too small
at the page corner, so the blur did not show.
AI-assisted-by: claude-opus-5-5
The page reveal waits for the fonts its texts still load, lays the texts
out again and renders them, so CJK texts no longer show missing glyph
boxes on first paint. The wait ends after 3 seconds, and a page change
drops the reveal of the previous page.
AI-assisted-by: claude-opus-5-5
- Horizontal emphasis marks under the text attach to the em box, not
to the tight rect, which CJK faces stretch past it. They were drawn
about a line low and seemed to mark other words.
- In vertical text, Chinese commas and stops of a font with no vertical
forms stay upright: centred for Taiwan and Hong Kong, in the top
right corner for Mainland. Colon and semicolon are centred.
AI-assisted-by: claude-opus-5-5
- The Layout group of the Language view shows the writing mode,
orientation and Distribute row, as the Text section does.
- The reading item of the text selection menu reads Furigana for
Japanese, Pinyin or Zhuyin for Chinese, with a glyph that matches
(あ, 拼, ㄅ) instead of the hiragana for every language.
AI-assisted-by: claude-opus-5-5
- Exports lay out the active CJK content, as the workspace does, so
attributes the text language does not use are not rendered.
- Vertical text paints only its silhouette, widened by center and outer
strokes, in the drop shadows of its container, and renders its inner
shadows. The SVG renderer paints it opaque in container shadows.
- Horizontal text keeps its top-left corner when its size changes;
vertical text keeps the edge its vertical alignment sets, also when
the draft-js editor commits its size.
AI-assisted-by: claude-opus-5-5
Text shapes and text ranges read and write the CJK attributes, among them
the language (`lang`), writing mode, orientation, readings and emphasis
marks. Update the plugin types, the changelog and the API test suite.
AI-assisted-by: claude-opus-5-5
- The Text section shows writing mode, orientation and Distribute when
the text has a CJK profile.
- A Language section picks the profile of the selected texts. Its
options open in a view of their own, grouped in Selected text, Layout
and Ruby.
- A compact menu at the selected text opens readings, emphasis marks and
other options of the selection.
- File and Preferences menus and the account settings set the file and
the default profiles. New texts take the last profile used, else the
file one.
The board size presets share the new grouped dropdown. Add English,
Spanish and Japanese translations.
AI-assisted-by: claude-opus-5-5
The WASM text editor works in vertical text: the caret, selection and
arrow keys follow columns, the cursor and the resize handles match the
writing mode, and auto-width and auto-height texts grow toward the block
end. The IME input surface sits on the caret so candidate windows open
beside the column on each platform, and compositions update the text as
they change. Undo history and selection styles keep readings and other
CJK attributes.
The `ime` debug option shows composition bounds and both carets.
AI-assisted-by: claude-opus-5-5
Serialize the CJK attributes of paragraphs and spans for the WASM
renderer, load CJK fallback fonts by script, and relayout text when they
arrive. The SVG and HTML text renderers, the exporter, the CSS code
generation and the clipboard keep the language, writing mode, readings
and emphasis marks.
AI-assisted-by: claude-opus-5-5
Add vertical writing (`vertical-rl`) to the renderer: characters set in
cells along columns, upright or sideways orientation, vertical glyph
alternates and metrics, tate-chu-yoko, kinsoku and JLREQ squeezing across
columns, and readings and emphasis marks beside the column.
AI-assisted-by: claude-opus-5-5
Add the CJK layout engine and use it for horizontal text:
- Line breaking with kinsoku rules that depend on the language: Japanese
JLREQ, Chinese per region (Mainland, Hong Kong, Taiwan) and Korean
word or syllable wrapping. Indivisible units stay together in narrow
boxes.
- Justification and squeezing that follow JLREQ, and distributed
alignment that keeps lines inside the box.
- Readings over the text (ruby, pinyin and zhuyin), emphasis marks,
warichu and CJK underlines, attached to the ideographic em box and
included in the export bounds.
- Shared glyph shaping, font tables and CJK fallback fonts.
`docs/cjk-layout.md` describes the design. Test fonts cover the locl,
vertical metrics and pinyin cases.
AI-assisted-by: claude-opus-5-5
Texts get the attributes of CJK layout: the language of each paragraph (a
BCP 47 tag), the writing mode and orientation, readings (ruby, pinyin and
zhuyin), emphasis marks, warichu, tate-chu-yoko, line breaking rules and
distributed alignment. `cjk-layout` holds their values and defaults and
tells which language family a tag belongs to.
Files keep a language profile in their options: the language new text
layers take when the user has not picked one. Profiles keep their own
default, and new files start with it. A new change type sets the file
profile, and the `cjk-support` feature gates the whole work.
Range styling joins spans left with the same style, since tate-chu-yoko
and readings work per span.
AI-assisted-by: claude-opus-5-5
Some IMEs (Fcitx Pinyin) end the composition before Escape is released,
so the key-up no longer looks like part of it and Escape left the text
edition. Remember when a key-down belongs to a composition and ignore
the Escape release that follows. Escape still leaves the edition or
closes the menu otherwise.
AI-assisted-by: claude-opus-5-5
Starting an IME composition over a selection deletes it, and cancelling
the composition left it deleted. When the IME ends with an empty text,
restore the content and the UTF-16 selection from before the
composition, keeping styles, the selection direction and redo. The
cancellation is not recorded as an edit.
AI-assisted-by: claude-opus-5-5
While a text was being edited, undo and redo did not reach the editor.
Keep a bounded content and selection history for each editing session.
Group committed compositions and styled insertions, leave IME previews
out, and start over when another change replaces the content.
Route keyboard shortcuts, native history input and the Edit menu to the
editor. The menu takes the focus, so focus the editor before restoring.
Restore UTF-16 selections through a new WASM binding.
AI-assisted-by: claude-opus-5-5
Font fetches are shared per URL, so a text that asks for a face already
being fetched gets no fetch callback. process-pending only relaid out
text after its own callbacks, so such a text kept its fallback-font
layout. Auto-grow text recovered through the reflow resize, but fixed
text stayed wrong until another change.
Wait for the text's pending faces to be stored or to fail before the
relayout, whoever started their fetch.
AI-assisted-by: claude-opus-5-5
The repair of :variant-not-main removed a variant main that had only
lost :main-instance, with its children. Its component still pointed to
the removed shape and validation reported nothing after it. When the
live component still names the shape as its main, the repair now sets
:main-instance back; it removes only shapes no component claims.
The :ref-shape-not-found repair of the same pass now leaves a main
alone, so it does not give the restored main a :shape-ref.
The repair of :nested-main-not-allowed moved the shape to the page root
every time. It now moves it only when a main surrounds it; a main in a
plain board keeps its place and gets :component-root.
Closes#13257
AI-assisted-by: claude-opus-5-5
* 🐛 Validate copies of unlinked libraries like the backend does
Copies of components from a library that is no longer linked failed
plugin validation with component-not-found and ref-shape-not-found,
while the backend accepted every save on them. The validator skips
copies whose library is not in the map it gets, but the plugin passed
the whole :files state, which also holds dashboard entries without
data. A library in the same project then looked present but empty.
The plugin validate, and the debug validate and repair, now pass only
the file and its linked libraries, the same set the backend uses. The
debug repair would otherwise detach those copies.
resetOverrides in the plugin API now refuses, with a message, when the
main component of the copy cannot be found or is deleted. Before, it
emitted a reset that changed nothing. The workspace menu already hides
the option in that case.
Closes#13323
AI-assisted-by: claude-opus-5-5
* ✨ Fix MR findings
* 🐛 Hide the path edition options when the edited path is gone
The design panel showed the path edition options whenever a path edit
state existed for the edited shape. The shape can leave the page while
that state stays, for example when another user deletes it or an undo
removes it. The panel then rendered the measures of a missing shape,
with a nil type, and crashed with "No matching clause".
The panel now shows the path edition options only while the edited
path is on the page.
AI-assisted-by: claude-opus-5-5
* ♻️ Name the edited path check apart from its result
The helper and the local that holds its result were both called
path-editing?, so the name meant a function in the namespace and a
boolean inside design-menu*. The helper is now editing-existing-path?.
AI-assisted-by: claude-opus-5-5
* ✨ Accept explicit shared keys from files
Backend, exporter and media processor now read a service shared key from a
`*_FILE` variable when the direct environment value is absent. Blank or
missing files fail closed instead of disabling the credential. Backend also
persists an autogenerated master secret in `server_prop` so tokens survive
restarts without operator configuration.
The derivation from `PENPOT_SECRET_KEY` stays as a fallback; the shipped
Compose defaults are unchanged. Each service can now receive its own key,
while backend resolves all four.
AI-assisted-by: hy4-flash-free
♻️ Require an explicit secret key and tighten key files
Backend no longer persists or autogenerates the master secret: startup now
requires PENPOT_SECRET_KEY or PENPOT_SECRET_KEY_FILE. A blank service key is
disabled, while key files are trimmed, unwrapped, size-capped and fail closed
with named errors. Exporter, media processor and admin console follow the same
contract, and the admin console file reader moves to shared-utils.
AI-assisted-by: hy4-flash-free
* 🐛 Align service secret key configuration
Reject blank exporter keys without falling back to another source.
Allow the exporter and media processor to derive their service keys from
a master key file, and document the upgrade and security requirements.
AI-assisted-by: gpt-6.1-terra
* 🐛 Normalize key files consistently across services
Reject empty master key file paths when selected and apply the same
Unicode whitespace rules to backend, exporter and media processor.
Document the compatibility impact on existing secrets and tokens.
AI-assisted-by: gpt-6.1-terra
Adding an SVG with several variants selected, or dropping it on an empty
area of a variant board, put a plain group straight into the board. The
backend rejected the save with :main-instance-not-a-variant and the
workspace undid the change. The SVG upload now picks its parent with
get-first-valid-parent, as drawing and add-shape do, so it never lands
in a variant board or a component copy.
Validation reported any non-variant child of a variant board as a main
that should be a variant. Its repair set :variant-id on plain shapes,
which made a fake variant that a later repair deleted with its children.
Such a child now reports :variant-container-child-not-main, and its
repair moves it out, right after the board. A main that lost its flags
but is still claimed by its component keeps the old code.
Closes#13338
AI-assisted-by: claude-opus-5-5
* 🐛 Keep fill children of hug boards from collapsing to 0.01 px
A flex or grid board that hugs an axis has no free space for fill
children on that axis: along a flex direction any fill child, across it
only when every child is fill, and in a grid any fill child. The layout
shrank them to the 0.01 px minimum and the commit saved it. In component
copies, the new render engine then wrapped their text one character per
line.
The rule lives in common as fix-child-sizing, with tests, and now covers
grid boards. Every action that reaches this state applies it:
- Resize board to fit content fixes, in the temporary objects only, the
fill children that the hug would collapse.
- The hug toggle changes the direct children only. It fixed fill sizing
on all descendants, which froze collapsed grandchildren as overrides.
Setting a child to fill inside a hug grid turns the grid to fix.
- A fill shape that arrives in a hug board by paste, move, canvas drag
or create variant turns fix at its size, and the board keeps hugging.
A move used to turn the board fix instead, which still collapsed the
shape when the board fitted its children.
- When delete, hide, show or make absolute leaves only fill children,
the board turns fix at its size, as moving a child out already did.
This covers all the hide and show paths and deletes on other pages.
- The plugin API sizing, hidden and visible setters go through the same
events as the design panel, so plugins and MCP get the same guards.
Files saved with collapsed sizes are not repaired by this change.
Closes#13353
AI-assisted-by: claude-opus-5-5
AI-assisted-by: claude-sonnet-5-5
* 🐛 Repair collapsed layout children
Add migration 0040 to restore collapsed layout children from exact sizes and
reflow the repaired boards. Guard singleton space-between layouts and require
all collapsed descendants to be repaired before a board can hug.
Closes#13353
AI-assisted-by: gpt-6-luna
* ✨ Fix MR findings
Add the release notes slides for 2.20: an intro and four slides on the
MCP server, WebGL rendering by default, design tokens, and safer saves.
Point the "0.0" release notes to 2.20.
Signed-off-by: elhombretecla <delacruzgarciajuan@gmail.com>
* 🐛 Keep the bool type of a moved copy when its main becomes a group
:type is synced with the geometry group and :bool-type with the content
group. When the main bool became a group and the copy had its geometry
touched, the copy kept :type :bool but lost :bool-type, and the backend
rejected it as an invalid shape.
Sync :bool-type with the geometry group, next to :type and the path
content it defines.
AI-assisted-by: claude-opus-5-5
* 🐛 Sync the bool type of a copy with the type it ends with
From the review: moving :bool-type to the geometry group stopped a new
bool operation of the main from reaching any moved copy, and dropped the
operation overrides stored as content-group touched.
Keep :bool-type in the content group. In update-attrs, work out the
type the copy ends with (its own when the geometry group is touched):
a bool never loses its :bool-type, and any other type gets none. Tests
cover a moved copy when the main becomes a group, a new operation
reaching a moved copy, a moved group copy when the main becomes a bool,
and an operation override on a copy.
AI-assisted-by: claude-opus-5-5
Any signed-in profile can push events with any allowlisted name through
the browser endpoint and point them at any organization or member. The
admin console consumer forwarded those rows like real ones, so a user
could add forged entries to another organization's audit log.
The consumer now forwards an allowlisted row only when its source is
"backend". Browser rows count as skipped, so the cursor still passes
them. Every allowlisted name has a backend producer; the six names the
Admin Console browser used to send are recorded by its server now
(penpot/penpot-nitrate#901).
AI-assisted-by: claude-opus-5-5
* 🐛 Shape drop shadows by the alpha of image fills
* 🐛 Shape exported drop shadows by the alpha of image fills
* 🐛 Cast child silhouettes for image-fill frame drop shadows
Image-only fills can leave transparent holes, so the direct container
drop-shadow path must not skip descendant silhouettes. Exclude those
frames from the fast path and from the covering check, and cover the
gate with unit tests.
AI-assisted-by: composer
* ♻️ Drop unreachable image branches from frame shadow fast path
AI-assisted-by: claude-opus-5-5
* ⚡ Size raster export image shadow masks to the output resolution
AI-assisted-by: claude-opus-5-5
---------
Co-authored-by: Alejandro Alonso <alejandroalonsofernandez@gmail.com>
With auto width or height, the fr unit is the largest size / value of
the flex tracks. A 0fr track divided by zero, so the fr was infinite,
the track size became NaN and so did the position of every child. The
backend rejected the shape and the save. Skip tracks with no fr value
when computing that minimum, in common (SVG renderer) and in
render-wasm (WebGL renderer). A 0fr track keeps the size of its
content, as in CSS.
Closes#13255
AI-assisted-by: claude-opus-5-5
* 🐛 Keep typed values within the limits of editable selects
A number editable select passed no :min or :max to its input, so only
the arrow keys kept the value in range. A typed guide size of 0 or less,
or a typography font size out of range, reached the backend, which
rejected the shape and the save. Pass the limits to the input, which
already clamps the typed value.
Closes#13250
AI-assisted-by: claude-opus-5-5
* 🐛 Keep values unchanged when leaving a number input untouched
The number input clamped its value on focus, so with the new limits
leaving an Auto grid size without typing saved 1, and leaving a field
with an old value out of range rewrote it. Focus now keeps the current
value; only typed and stepped values are clamped.
The grid size field is also nillable now: Auto shows its placeholder
instead of 0, and clearing the field goes back to Auto.
AI-assisted-by: claude-opus-5-5
* 🐛 Keep untouched and mixed number inputs unchanged on leave
The keydown handler stored the clamped value for every key, so Tab or
Escape on a font size of 2 saved 3 with no typing. Store it only for
arrows and Enter; typed text is stored by the change handler.
A mixed value has no number, so leaving the field fell back to the
default 0 and saved a font size the backend rejects. Leaving a field
that is not nillable without a value now saves nothing.
AI-assisted-by: claude-opus-5-5
* 🐛 Fix the pointer-map read and write contracts
fdata/objects-map is consolidated, so the server stops negotiating it:
get-file and get-file-snapshot no longer convert it for a client that
does not declare it. Converting it rewrote the page map, and doing that
on a page that is still a pointer produced a fresh fragment id with no
row behind it (a read never persists), so the client got a 404 for
every page.
The save path now reattaches unchanged pages after migrating, like the
read path: a save that triggers a pending migration keeps the fragment
ids of the pages the migration does not change.
A pointer carries its file id in its metadata and the fragment loader
resolves with it, so it no longer depends on a per-file binding. That
makes libraries lazy (they were materialized in full on first access),
removes the file-id argument from the loader macros and the extra
arities of realize-pointers, and lets the snapshot preview resolve
without the live file id. A pointer without the field raises instead
of falling back: the feature has never been enabled in production.
Also use with-untracked in the validation and repair sites, cover
enable-objects-map with the encode-file tracking binding, document the
fragment contract, and delete two dynamic vars that have had no
readers since 2024-01-17.
AI-assisted-by: deepseek-v4.1-flash
* 🐛 Fix the pointer-map review findings
The snapshot preview no longer materializes the objects map when it has
to apply a pending migration: it realizes the pointers only, so an old
version and an already-migrated one return the same shape. The preview
stays read-only.
`wrap` now lets the bound metadata win, so the `:file-id` of the file
that writes the fragment row is authoritative, and the ns docstring
records that pointer metadata is changed with `vary-meta` (it merges
over the current map and keeps the file id) rather than `with-meta`.
Also bind the fragment loader in `srepl/main/validate-file-schema`,
remove a leftover argument from a test, and add the two missing tests:
the public RPC rejects a marked fragment while the internal loader
reads it, and the id plus the metadata survive the fressian and transit
round-trip.
AI-assisted-by: deepseek-v4.1-flash
* 🐛 Avoid orphan fragments during save migrations
Skip pointer tracking only while pending migrations run. Reattach unchanged
pointers after tracking resumes; verify stored fragment references in tests.
AI-assisted-by: gpt-6-luna
* 🐛 Prevent save migration tests from masking failures
Use one non-migrating file read for post-save IDs and migration state, so
a later read cannot mask a missing migration record.
AI-assisted-by: gpt-6-luna