---
title: Sewing Studio and Shared Factory Surfaces
description: Sewing workflows, shared document and drawing APIs, portable records, and verification boundaries.
updated: 2026-09-20
---

# Sewing Studio and Shared Factory Surfaces

Sewing Studio combines the OS Factory's document, drawing, file, and workspace services with sewing records and geometry. Open **Sewing Studio** from the OS app catalogue after unlocking an encrypted operator workspace. The app is registered as `os.sewing`, with the Factory part `app.sewing`.

Sources: `webgpu-os/apps/sewing/manifest.json`, `webgpu-os/factory/apps/sewing/SewingApp.js`.

**Create design** opens the installed v3 design gallery in the local source app. It offers 13 design families and uses the existing Factory vector editor, project history, storage and Engine WebGPU preview. The [v3 integration record](sewing-v3-integration.md) documents the installed capabilities, evidence and unfinished roadmap. No platform release bundle has been deployed by this integration.

From a make, **Edit design** returns to its recipe and curves. **Original, Pattern, Preview, Make, Journal, Materials, and Measurements & fit** remain inside one adopted Studio shell. Pattern edits and designer edits update the same source and undo history; saved originals remain separate. **Save preview** captures the shared Engine surface. Small OS windows use a Pattern/Preview toggle and an inspector overlay. Confirmed authored constructions display a merged Engine 3D assembly; legacy, imported, stale, and unconfirmed geometry remains a flat physical reference. Arranged geometry is a visual construction aid, not validated cloth settling or garment fit.

Printing remains in the shared document pipeline. **Print / PDF** opens the existing full-size, A4 and Letter options. SVG and basic DXF export current Factory geometry, including cutting labels and material roles. Inventories and artwork use the same cutting contours. Invalid contours block cutting export. Physical printer scale and sewn samples still require observation.

If encrypted storage is temporarily unavailable, **Retry opening** retains a real recovery screen. A successful retry runs the same startup routine as the first open: navigation, import jobs, search and keyboard controls become available together. Repeated failures keep the records closed. Closing during a pending open rejects late results. A missing externally requested file reports its error while leaving a readable library usable.

## Using the workspace

1. Add or import a pattern in **Pattern library**. Categories include garments, bags, quilts, homewares, and accessories. Attach PDFs, instructions, photos, and original editable assets. Record designer, views, sizes, tags, source link, and paper storage location.
2. Add people under **Measurements**. Each measurement entry creates a dated revision. Length entry defaults to centimetres, with millimetres and inches available; one inch is exactly 25.4 mm. Custom length fields use `name=value` lines.
3. Start a make and select its pattern and person. The make keeps a measurement snapshot, size selections, view, journal, fitting observations, material allocations, attachments, and checklist. **Make again** retains useful records while resetting completion.
4. An editable make uses **Original, Pattern, Preview, Make**, including calibrated imports and ordinary drafts. Original uses the shared PDF reader; Pattern edits geometry; Preview shows flat pieces unless authored assembly is available; Make restores the current physical operation. Projects without editable geometry retain the document desk and Sewing mode. Instructions may also be Markdown, text, DOCX, ODT, RTF, or sanitized HTML.
5. Keep designer body charts and finished dimensions in their separate tables. The fit view computes ease only from corresponding supplied body and finished measurements. A selected size does not resize or fit an imported PDF.
6. Use **Select patterns → More actions → Export selected** for a portable selection, including its referenced records and deduplicated attachments. **Workspace → Backup .sewpkg** exports the workspace within package limits. Large collections can use **Back up Sewing to a device folder**. **Review recovery** opens saved recovery copies. Import merges copies with new record IDs and remaps file references, saved PDF views, and tracing references.

Sources: `factory/apps/sewing/library.js`, `projects.js`, `forms.js`, `model.js`, and `store.js`, relative to `webgpu-os/`.

### Reusable designs and owned copies

**My copies** records paper envelopes, printed sizes, traced alterations and digital holdings separately from the library pattern. Each copy has its own location, sizes, notes and optional files. Search includes those locations and notes. A copy can pin a saved design revision; **Start a make** shows that choice and creates an independent editable draft with unfinished operations.

**Keep in library** in the adopted Sewing Studio captures an immutable design revision. It preserves the current make and earlier library revisions. Traced or manually altered geometry remains geometry-only; saving a drawing does not create parameter rules. Original-file, material and instruction references remain declared dependencies. Selected packages carry and remap the copy and revision together. Old repository heads without the new `patternRevisions` collection remain readable.

Library undo preserves revisions already pinned by later makes. Undoing a merge restores a later make to the owner of its saved revision and copy. If those would belong to different patterns, the operation rejects before changing records and stays on the shared Factory history stack. The same history fix preserves rejected entries for other consumers.

Sources: `factory/apps/sewing/pattern-records.js`, `pattern-records-ui.js`, `record-links.js`, `library-commands.js`, `repository-shards.js`; `factory/core/history/stack.js`.

### Calibrated import, cutting, and physical observations

**Import & calibrate PDF** and **Import pattern pages** open the existing shared Notepad PDF reader. Select pages and visible layers, check both physical axes, and place pages with explicit physical transforms. Original page references remain under editable geometry. The path inspector assigns cutting/sewing roles and attached dimensions explicitly; unsupported or clipped graphics remain a reference. Closing while an original is loading cannot mount into the next view. Portable import remaps all page references, including retained revisions. A reference-only import cannot pass cutting preflight.

Imported patterns and construction templates use the same Studio header and Make controls. Original PDF position, working geometry, read-only flat-preview position, and operation progress remain separate. **Add operation** can link a personal or original instruction to its source page and selected pieces. Opening that source uses the same project-owned document state. Done advances explicitly; Undo restores the operation cursor through the same project history used by drawing edits. Packages remap source links in live operations and retained revisions. **Make records** opens Journal, Materials, and Measurements & fit inside that same Studio instance. Sources: `factory/apps/sewing/studio/factory-runtime.js`, `studio-host.js`, `make-operation.js`, `project-controller.js`, and `projects.js`.

**Plan cutting layout** arranges all copies in one selected material group, with full cutting contours, marked grain direction, gaps, and fabric-edge margins. It reuses Engine's rectangle allocator, also used by the original GPU texture atlas. The conservative packing uses each oriented contour's enclosing rectangle. It does not stretch or resize pieces. Failed packing means this arrangement needs work; it does not prove no arrangement is possible. Fold-only pieces require explicit unfolding. Missing grain needs a user confirmation. A saved result is checked against the current geometry, quantities, material dimensions, revision and regenerated placements before download. The responsive preview uses screen styling; the downloaded SVG retains millimetres.

**Print & sample checks** records actual horizontal and vertical calibration measurements separately from sewn observations. Sample checklists differ for bags, quilts, bodice/trouser blocks, socks, gloves and bowl cosies. A passing sample requires a current passing print check, actual measured dimensions, the required observations, and cuttable geometry. Each observation retains its make, draft, revision, material context and optional photos. Editing the design or making another copy leaves earlier evidence historical. Automated fixture observations are not physical sample evidence. Thermal use remains unvalidated.

Sources: `factory/apps/sewing/pattern-import.js`, `pattern-import-ui.js`, `cutting-layout.js`, `cutting-layout-ui.js`, `physical-checks.js`, `physical-checks-ui.js`; `engine/core/math/RectanglePacking.js`; `engine/core/gpu/VGPUTextureAtlas.js`.

## WebOS appearance and window layout

Sewing inherits the active WebOS appearance through Factory's shared semantic tokens. OS accent pairs, dark/light surfaces, font family, corner radius, hover colors, and reduced-motion settings also reach the shared PDF and vector surfaces. It does not set an independent app accent. Factory retains its existing text-size scale and supports explicit consumer token overrides.

The library shows actual record counts, category filters, and a full-width empty state with a filter reset. Navigation remains selected while opening a pattern, make, or draft. Make cards show checklist progress. Sewing mode keeps documents and next steps visible, with less-used metadata under **Pattern & make details**.

At smaller window sizes the navigation becomes a horizontal strip. **Make details**, **Steps & details**, and **Sewing tools** reveal dismissible panels without reducing the document width. The shared drawing editor has an **Objects** inspector, contextual text controls, and a tool area that scrolls when height is constrained. Paper, artwork, and physical dimensions remain independent of chrome colors.

PDF **tools** groups Find, Scan and Print settings in a keyboard-accessible disclosure. Page navigation, zoom, Rotate, Layers and Pages remain directly available. Escape and outside clicks close the tools. **Layers** and **Pages** expose their active states and use overlay panes in narrow surfaces. Page navigation disables unavailable directions. Layout verification covers 1400×900, 1024×768, and the app's 720×520 minimum, plus a shared drawing surface at 500×250. The compact Original view retains at least 124 pixels of visible paper in the recorded fixture.

Sources: `factory/sdk/ui/tokens.js`, `kernel/ThemeEngine.js`, `factory/apps/sewing/styles.js`, `forms.js`, `SewingApp.js`, `factory/components/drawing/`, and `factory/apps/notepad/pdf-document-surface.js`.

## PDF preparation

The controlled PDF surface uses pinned, locally served PDF.js 6.3.289. It supports page navigation, bounded thumbnails, text search, rotation, zoom, authored optional-content groups, and multiple visible sizes. Flat PDFs explicitly report that they contain no layers. Layers expose visibility; raster layer painting, locking, and ordering are unavailable for PDF groups.

**Prepare print copy** offers A4 or Letter, original page ranges, margins, overlap, and a 100 × 100 mm calibration sheet. Print copies flatten the selected PDF layers at 300 DPI. The display selection explicitly overrides print-intent defaults in the PDF. Native vector exports retain lines and cubic curves in PDF operators. Both outputs use the same physical tiling and registration-mark functions.

Original PDFs remain separate attachments. Download the original A0 document for copyshop printing. Print at actual size / 100%, disable fit-to-page, and physically measure both calibration axes. Browser tests verify file dimensions and raster parity; they cannot verify a physical printer.

Notepad consumes the same `createPdfDocumentSurface` implementation. Its **Layers, scan & print** button switches from the browser reader to the controlled reader. Scanning, print-copy paper, page ranges, calibration, and layer controls are consequently available in Notepad as well as Sewing Studio.

Sources: `factory/apps/notepad/pdf-document-surface.js`, `pdf-print.js`, `pdf-vector-export.js`, and `NotepadApp.js`.

## Drafting and generators

**Draft a pattern** includes:

| Template | Inputs and output |
| --- | --- |
| Interactive gusset tote, zipped pouch, and pillow | Finished dimensions and seam allowance drive connected panels, material components, seam relationships, cutting lists, and the merged Studio construction view. |
| Boxed tote | Finished width/height/depth, handle cut length/finished width, seam allowance, lined or unlined construction; matching panels, handles, quantities, and assembly steps. |
| Interactive patchwork quilt | Square, four-patch, or nine-patch block; finished block size, integer row/column counts, seam allowance; connected physical cells, exact A/B cutting quantities, seams, and grouped assembly order. Legacy quilt drafts remain supported. |
| Circle skirt | Full or half circle; explicit waist, ease, skirt length, waistband height, closure overlap, seam and hem allowances; two panels and fixed waistband with zipper instructions. |
| Native dartless bodice and sleeve | Separate front/back chest and waist arcs, vertical balance, shoulder slope, arm measurements and explicit wearing ease. Matched sleeve-cap and side-seam lengths; neckline and armhole controls remain drafting estimates. Experimental muslin block. |
| Native dartless trouser block | Separate waist/seat arcs, seated rise, leg levels, circumferences, wearing ease and explicitly chosen front/back crotch extensions. Named front/back leg seams are checked. Experimental muslin block, without waistband, fly or pockets. |
| Saved Bella and Titan drafts | Earlier FreeSewing geometry, source SVG and recipe remain editable and exportable. Regeneration through the retired runtime is unavailable; create a new OS fitting block separately. |
| Darted bowl cosy | Flat stitching-square dimensions, dart intake/depth, seam allowance, two shells and batting, paired dart legs, and assembly instructions. Experimental; thermal use is unverified. |
| Stretch sock and gloves | Two-panel sock, fingerless glove, and five-finger glove with explicit body dimensions, circumference reduction, measured fabric extension in two directions, seam allowances, and open-edge handling. Experimental; physical fit and recovery require samples. |
| PDF trace | Selected original page under a physical-size vector drawing; no automatic reconstruction or fitting. |

The shared vector editor provides retained paths, cubic controls, connected paths, freehand annotations, text, object transforms, node coordinates, color, undo/redo, physical rulers, grid, overview navigation, pan, and zoom. Paint exposes this same editor through its **Vector drawing** lens and saves its model with its editable package and GPU autosave. Raster history is separate from vector history.

Sewing adds seam allowances, grainlines, notches, cut quantities, material labels, path-length comparison, lengthening/shortening, and slash-and-spread. Curve length and contour flattening use a 0.05 mm tolerance. Slash-and-spread produces separate portions for repositioning and retracing. Unstable offsets, self-intersections, stale template allowances, and malformed contours block cutting export.

Parameter regeneration adds a revision. Connected Studio gestures preview changes before committing one authored revision; explicit **Regenerate from recipe** creates another draft and preserves manual alterations in the original. Manual alterations retain the generated model and reset physical sample verification. Altered drafts direct the cutting list to the current contour instead of advertising original template dimensions. The **Record physical sample** action records user-supplied results; digital tests never set this flag.

The owned fitting blocks use shared vector curves, physical seam offsets and cutting-contour checks. Their versioned recipes keep measurements, wearing ease and chosen curve parameters distinct. They are dartless balance blocks: bust-cup shaping, waist darts, seat shape and final garment details require manual development on a muslin. The trouser generator requires explicit crotch extensions because circumference does not uniquely determine them. Unsupported proportions, incompatible curve lengths and invalid allowances fail with a diagnostic. Numerical checks do not establish fit or equivalence to an earlier Bella or Titan draft.

Native recipe version **1.0.1** preserves validated measurement provenance and the submitted source revision through the actual worker. Its numerical check belongs to the authored recipe, named seams, match marks and outlines. A manual edit marks that check stale. **Check native dimensions & seams** rechecks the retained authored state; changed relationships or outlines require a new pattern revision and cannot reuse the original successful check. **Cutting list & assembly** calculates its seam table again when opened, showing each pair's lengths, intentional ease and remaining difference, or the current correction issue.

The measurement dialog changes units only after every entered length converts successfully. If one entry is unfinished, its values and previous unit remain intact and an alert explains the correction. Angular measurements keep degrees; changing length units does not edit a saved body profile. Dialogs open at the first field or their heading, and assembly instructions retain sequential numbering through Notepad's shared Markdown renderer.

Earlier FreeSewing default drafts contain short allowance self-intersections in Bella's front and Titan's front. Saved invalid contours remain visible as references; native cutting export is blocked until corrected and checked. **Original generated SVG** preserves the stored source output for inspection. Keeping a legacy draft does not require loading its archived generator. Sew garment muslins and tote/quilt samples before treating their recipes as physically validated.

Sources: `factory/apps/sewing/generators.js`, `construction.js`, `accessory-generators.js`, `geometry.js`, `drafting.js`, `fitted-adapter.js`, `fitted-blocks.js`, `fitted-generator.js`, `fitted-worker.js`; `factory/components/drawing/`; `factory/apps/paint/app/vectorWorkspace.js`.

## Connected construction Studio

The interactive tote, pouch, pillow, and patchwork quilt open the adopted Studio with **Original**, **Pattern**, **Preview**, and **Make** views. Choose a **Dimension to change**, then type a physical value, use its slider, or move the corresponding handle. Locks constrain the same domain command. A gesture commits once; cancellation restores the prior geometry. Each draft has its own Factory history, so switching drafts cannot apply another draft's undo snapshot. Saved authored revisions and current derived results retain their source revision.

The connected quilt expands the existing generator's squares into named physical cells and pairs actual neighboring edges. Row and column controls require whole numbers; block size remains a physical length. **Choose layer fabric** can assign the current Fabric A or Fabric B group in one undoable change. **Hold quilt top corners** holds the outer corners of the whole quilt. Backing, batting and binding remain separate material requirements; the pieced top does not automatically invent a completed layered quilt. Construction additions check the actual shared mesh budget before committing, including vertices introduced by inset openings.

The construction inspector connects material components to actual cut pieces. Lining, mesh fabric, interfacing, foam, appliqué, inset pieces, and inserts have separate roles and quantities; artwork changes appearance without adding a cut piece. An inset creates an opening and a matching insert. Too-small, overlapping, and touching inset openings are rejected before changing the draft. Compound allowances expand outside contours and reduce openings at the sewing line. A mesh-fabric component is distinct from the editable triangle mesh used by the preview.

**Compare seams** follows oriented arc length and authored ease on both selected edges. Manually changed pieces require their connections to be checked again. **Confirm connection** records the chosen edges, direction, and ease; equal length alone does not approve a construction. **Make** shows the current operation, participating pieces and materials, right/wrong sides, seam allowance, and active seam diagram. Back, Done, and Undo are explicit actions. Draft-specific instructions, completion, and position survive switching drafts and saved reloads.

The shared mesh preview supports a merged authored assembly, exploded components, material filtering, selection, framing, and camera navigation. It claims an assembly only when every sewn panel and seam endpoint has confirmed placement; otherwise the same surface shows a labeled flat reference. Pattern and Engine selections stay synchronized and persist with the native draft. **Edit design mesh** supplies physical Grab and one-pass Smooth tools, exact numeric movement and explicit seam cuts. Grab retains a connected radial region; nearby disconnected sheets remain separate. Paint's grid sculpting and the shared mesh brush consume the same radial falloff. A gesture creates one undoable edit; Escape, lost capture and close cancel it. Compact Mesh settings and Pattern checks disclosures leave the canvas and action footer visible.

**Weave / Smooth** changes the selected cloth layer on that same preview. Woven mode shades separate warp and weft directions from the panel's saved millimetre chart and grainline. Plain, twill, and satin crossings use the Engine's shared woven definitions; fiber presets adjust roughness, anisotropy, and sheen. A material profile can retain authored, sourced, measured, or estimated appearance evidence. Direct appearance edits become explicit estimates. Foam, batting, inserts, and printed artwork remain smooth; interfacing and structural layers show threads only when their assigned material records a woven appearance. The renderer reduces unresolved thread detail at distant zoom levels to prevent aliasing. This is a directional surface view, not individual-yarn geometry, cloth mechanics, a thread-count measurement, or fit evidence.

Mesh editing retains the original printable drawing while a changed mesh is an unverified concept. The physical-panel solver accepts bounded eligible topology, preserves an existing valid 2D chart, and checks candidate contours and material distortion. It can diagnose missing cuts or failure to converge. Adopting a current result creates a manually altered pattern, retains the previous printable model, and marks affected seam connections for review. A stale result or a result from another panel cannot replace the selected piece. This is not universal flattening of arbitrary sculpted shapes.

**Pattern checks: grain, seams and material limits** supplies the authored grain angle and confirmed matching seam lengths to that same solver. Intentional ease retains its sign on each side. Seam chains use stable vertex identities and explicit physical 2D correspondence; an orphan or unmapped chain is a correction issue. The dialog can use recorded fitting limits, explicit estimated/measured/sourced limits, or leave suitability unknown. It never derives acceptable strain from the endpoints of a response curve. Changing settings invalidates the previous result; adopted panels retain the settings and grainline, and their sewing connections require reconfirmation. Sources: `factory/apps/sewing/panel-derivation-inputs.js`, `freeform.js`, `construction-cloth.js`.

**Fabric drape (experimental)** runs the project-owned triangular cloth worker on supported construction panels. The caller chooses an explicit estimated woven or stretch preset and a pin/table arrangement. Foam uses an explicitly selected thickness proxy. **Rest on table** adds a declared support plane below the lowest initial material surface, with estimated friction. The simulation reports convergence and material assumptions separately; an attractive or converged preview does not verify fit, fabric suitability, thermal use, or a sewn sample. Failed attempts offer **Show saved design**, while **Preview details** retains technical diagnostics. Unsupported manual geometry must have its construction relationships rebuilt before simulation. Cancellation and revision checks prevent late previews from replacing a newer design.

The existing drape controls are shared by Sewing construction adapters through `cloth-preview-ui.js`. Preparation, progress and publication belong to one view and authored revision. Cancel, undo, a newer run or closing the view disposes delayed workers and rejects their results. A successful numerical result retains its declared material estimates; **Show saved design** restores the authored arrangement explicitly. Nine browser ownership checks use actual Engine workers, including cancellation while executing and late preparation after a replacement.

The adapter reuses Engine's plane-intersection functions to align supported lining corners and carries nested attachments onto the adjusted assembled surface. These changes preserve the original 2D cutting coordinates. `buildConstructionClothDescriptor` and `createConstructionSimulation` accept `supportMode: 'free' | 'table'`; `pinMode: 'none' | 'top-corners' | 'rim-corners'` remains a separate, explicit inspection fixture. Four-rim support is available only for the gusset tote and labels its four welded degrees of freedom with `RIM_CORNER_SUPPORT`; the earlier two-front-clip and table arrangements remain selectable. The current production-default lined tote with mesh pocket, 120 mm resolution and four rim clips converges in 89 steps (approximately 9.6 seconds), with 60 stable steps, 0.430024 mm/s final speed and 0.005257 mm final correction. The lined pouch at 80 mm resolution and two front clips converges in 177 steps (approximately 16.7 seconds), with 60 stable steps, 0.172279 mm/s final speed and 0.016726 mm final correction. Both preserve the authored draft and stay inside the unchanged 30-second/1,200-step gate. The existing unlined tote, unlined pouch, pillow and quilt fixtures also remain accepted. Separated assembly seeds preserve cutting dimensions and are labeled as starting poses. A freely hanging tote with only two front clips remains a more mobile diagnostic mode and is not substituted for the explicit four-rim inspection fixture. These are numerical fixtures using declared estimates; neither support mode establishes physical material behavior, garment fit or sewn-sample validation.

Static settling uses bounded kinetic relaxation; dynamic stepping retains its separate behavior. The solver records observed speed before any damping reset and keeps `maximumProjectionCorrectionMm` separate from the complete final iteration's residual `finalCorrectionMm`. Sixty consecutive stable steps still require speed below 1 mm/s, final correction below 0.05 mm, valid materials, and matching attachments. Exact seams share physical degrees of freedom through Engine's UnionFind while retaining separate cutting vertices. Fresh swept contact checks still gate every accepted substep; cached contacts only refine candidate positions. Contact broad phase uses an exact, bounded sweep-and-prune path for up to 768 interactive features and the shared Engine `AabbBvh` used by MorphField for larger meshes. Randomized-order parity tests require both paths to emit the same ordered candidates and final contact result; diagnostics identify the selected path, comparisons, overlaps and eligible pairs.

**Use graphics acceleration (experimental)** selects the scoped `webgpu-hybrid` backend. The reference `javascript-reference` backend remains the default. Shared GPU advection and constraint operations retain their multipliers; precise contact and acceptance remain in the JavaScript worker. Contact-coupled substeps use CPU elastic/contact refinement to avoid repeated GPU readbacks. The result records the actual backend and operation counters. Deterministic fixtures compare complete steps with the reference, while each construction must still pass its own settling check. This is a hybrid backend, not a claim that contact runs on the GPU.

Sources: `factory/apps/sewing/studio/factory-runtime.js`, `studio/native-adapter.js`, `studio/preview-model.js`, `construction.js`, `project-controller.js`, `construction-record.js`, `freeform.js`, and `construction-cloth.js`; `factory/components/mesh/`; `engine/sim/cloth/triangular/`.

Accessory **Preview arrangement → Every cutting copy** meshes the actual curved outlines and expands every cutting quantity. Copies occupy separate flat rows, initially viewed from Front with a light cutting-paper fill. Saved ink and geometry remain intact. This view is labeled as cutting copies and does not claim assembled shape or physical fit. The shared `createPhysicalContourMesh` retains source coordinates, edge identities and internal constraint paths. Bowl dart legs and sock cuff folds remain real mesh edges with fabric on both sides. Crossed, dangling or incompatible constraints fail explicitly. The adapter uses the existing cancellable Factory generation worker lifecycle and a whole-accessory 30-second budget. **Walk accessory seams** follows the recorded sewing intervals without drawing across gaps between them. Revision changes regenerate the preview; a closed view rejects late workers.

**Assemble glove in cloth preview** opens the existing Engine cloth controls from the same Studio shell. The adapter uses the real contours, confirmed seams, shared Engine seed checks, and Factory worker lifetime. The current accessory-cloth suite passes 21/21 checks. Fingerless assembly includes an accepted physical step, mirrored second copy, required material estimate, cancellation and stale-revision rejection. Fingered gloves at both covered measurement scales now pass material admission and advance a dynamic step within the same bounded Engine defaults. Complete glove settling and physical fit remain separate gates; the UI labels the cloth preview experimental and does not approve fit. Flat master and cutting-copy previews remain available independently.

Factory's shared input forwards native `min`, `max` and `step` before assigning the initial value. Seam sliders therefore retain their 0–1 interval and one-percent keyboard steps. Shared preview markers use themed text labels with collision-separated positions and leader lines; the physical marker locations remain unchanged. Both improvements also apply to the original shared-surface consumers.

Sources: `factory/components/mesh/contourMesh.js`, `contourConstraints.js`, `factory/apps/sewing/accessory-meshes.js`, `accessory-mesh-generator.js`, `accessory-preview.js`, `accessory-cloth.js`, and `studio/native-tools.js`.

The shared mesh surface also accepts `featureHandles` and `onFeatureEdit`, with `setFeatureHandles()` for updated parameters. Each handle has an identity, physical 3D position, unit direction, bounds, value and optional parameter-to-distance scale. Dragging and arrow keys produce begin/preview/commit/cancel events through the same Factory transaction as typed values. Enter commits; Escape cancels. Disabled or removed handles cancel an active edit. Handles use 44-pixel targets and themed surfaces. **Dimensions** (`setFeatureHandlesVisible()`) can hide handles to clear a small preview; hiding them cancels an active edit. The camera menu retains Front, Side and Top, and **Help** exposes pointer and keyboard instructions. Ghost geometry cannot be selected and stays within the shared mesh resource limits. `setMarkers()` displays source-positioned seam cursors; exploded or manually changed arrangements do not invent a correspondence.

**Compare revisions** uses two existing Factory drawing viewports and synchronizes the physical center and zoom. It compares original, current, variation and retained authored states. Below the space needed for two 420-pixel views, a position-preserving selector displays one revision. Resize notifications are separated from authored pan/zoom changes. Both viewports dispose when the dialog or owning view closes.

**Materials → Fabric behavior** records mass per area, thickness, bending rigidity, friction and directional response curves with individual measured/sourced/estimated provenance. A preview estimate fills missing properties only after explicit selection. Ordinary cutting does not require these advanced fields. **Choose layer fabric** keeps a project-owned snapshot and updates the panel thickness. Regeneration retains that snapshot; later library edits do not silently change an existing make. The cloth adapter passes the same physical record through Engine's `normalizeClothMaterial`, rejects thickness disagreement and retains material evidence in saved simulation results. Compression curves remain recorded reference data: current foam/batting behavior is a fixed-thickness approximation.

Fabric behavior can also store the optional woven surface appearance separately from physical response curves. The 3D inspector exposes fiber, weave, warp and weft preview density, colors, grain direction, and evidence. A 44-pixel **Weave / Smooth** toolbar action provides the common one-step switch. Renderer diagnostics distinguish preparing, active WebGPU weave, and solid fallback; the fallback remains selectable and interactive without implying that CPU drawing reproduces the thread shader.

Optional fitting limits record lengthwise and crosswise compression/extension plus maximum shear, with evidence for each. All five must be supplied together. Percentage entry stores engineering strain as a fraction; these fields remain distinct from traction and compression-response curves. An estimated limit keeps the material marked as containing estimates. Body-measurement and fitted-block forms share staged unit conversion: incomplete fields preserve the original units and values, and custom named lengths convert atomically with the standard fields.

Sources: `factory/components/mesh/preview.js`, `factory/components/mesh/gpu-preview.js`, `factory/apps/sewing/revision-comparison.js`, `material-appearance.js`, `material-profiles.js`, `material-profiles-ui.js`, `studio/woven-preview.js`, `construction-cloth.js`; `engine/render/mesh/ClothMeshRenderer.js`, `engine/sim/cloth/FiberMaterials.js`, and `engine/sim/cloth/triangular/materials.js`.

## Shared ownership and public API

The public authoring entry is `webgpu-os/factory/sdk/index.js`. `loadFactorySurfaces()` lazily returns the document, drawing, chooser, and generation exports in `sdk/surfaces.js`. The existing Factory registry also contains reusable component manifests:

| Manifest | Implementation |
| --- | --- |
| `component.documentEditor` | Notepad's `createCodeEditorSurface` |
| `component.pdfDocument` | `createPdfDocumentSurface` |
| `component.vectorEditor` | `createVectorEditorSurface` |
| `component.drawingViewport` | `createDrawingViewport` |
| `component.drawingLayers` | `createLayersPanel` |
| `component.meshPreview` | `createMeshPreviewSurface` |
| `component.meshEditor` | `createMeshEditorSurface` |
| `component.fileChooser` | `createFileChooser` using Files' directory listing helpers |

`registerStudioParts()` registers these alongside ordinary app parts. Sewing's trusted host is a bounded facade over the OS's existing compositor; it does not create a second registry or mount whole Notepad/Paint apps. The Desktop host checks the captured operator scope before mounting and after readiness.

```javascript
const { createVectorEditorSurface } = await loadFactorySurfaces();
const surface = createVectorEditorSurface({
  model: { schema: 'factory.vector.v1', unit: 'mm', items: [] },
  bounds: { x: 0, y: 0, width: 210, height: 297 },
  onChange(model) { saveOwnedDrawing(model); },
});
hostElement.append(surface.root);
await surface.ready;
```

The example's `hostElement` and `saveOwnedDrawing` are caller-owned. The surface does not acquire file authority or save into another app's recovery state.

`compositor.mountPanel(panelId, slots, query, options)` accepts `host`, `ctx`, `signal`, `instanceId`, `parts`, and `slotQueries`. Supplying a host mounts an owned body there without creating a window. Caller context reaches child parts; lifecycle signal, entity identity, and selected variant remain managed. `ready` awaits asynchronous mounts. Idempotent `destroy()` awaits child teardown and leaves the caller's host intact. Existing window mounting and first-use lazy loading remain supported.

A slot may specify `fill: true` to receive its flex host's remaining space, with shrinkable minimum dimensions. Shared Studio surfaces use this contract so their canvases survive actual host resizing without an app-specific CSS fix. Existing slots retain intrinsic sizing unless they opt in. Host lifecycle and resize contracts verify both modes.

The vector surface accepts injected bounds, reference element, selection/change callbacks, and history. `onSelectionChange(id, item)` receives a detached snapshot after canvas selection, layer selection, or a committed edit. `setModel(model, {preserveInteraction, preserveHistory})` allows domain overlays to update without ending a connected path or resetting undo. Paint and Sewing use shared color, coordinate-conversion, fit, measurement, and layer-hierarchy functions. PDF layer rows use the shared layers presentation with restricted capabilities.

The same public surface boundary exports `normalizePhysicalMesh`, `editPhysicalMeshVertices`, `cutPhysicalMesh`, `analyzePanelTopology`, and `derivePhysicalPanel`. Generic topology, camera interaction, and panel derivation remain Factory capabilities. Sewing supplies panel identities, grain directions, material assumptions, seam relationships, and adoption rules. The shared camera implementation is also consumed by RealmForge; each mounted surface owns its view state and lifecycle. Factory's `components/mesh/physicalMesh.js` imports `HalfEdgeMesh`, `buildVertexAdjacency`, and `buildVertexFaceAdjacency` from the existing `engine/kaolin/ops/mesh/MeshOps.js`. Sewing and Paint consume that same Engine implementation; this work does not replace or remove it.

`createPatternGenerator({workerUrl, validateRequest, version, signal, onLog})` supplies the shared cancellable worker lifecycle. The caller supplies its domain validator and worker URL. Sewing's `fitted-generator.js` selects its own `fitted-worker.js`; measurements and drafting rules remain in Sewing. Each request owns its worker, terminates on cancellation, and has a 60-second limit. `generate`, `cancel`, and `destroy` preserve the existing service boundary.

Sources: `factory/sdk/index.js`, `sdk/surfaces.js`, `components/studio-parts.js`, `components/studio-host.js`, `components/pattern-generation/index.js`, `apps/sewing/fitted-generator.js`, `compositor/`, `shell/Desktop.js`.

## Storage and lifecycle

Records use `webgpu-os.sewing`, version 1. Canonical drawing geometry and lengths use millimetres; angular generator measurements use degrees. The encrypted app sandbox publishes a small `sewing-workspace-v2` head over verified immutable chunks, retaining the original `sewing-workspace-v1` during migration. Original files live below `/user/documents/Sewing/Assets/` through operator-scoped OS storage. Jobs, extracted text and learned glyph models have separate records. Content-addressed chunks use distinct payload and descriptor keys; earlier unsuffixed chunks remain readable.

Saves use conditional sandbox tokens and strict readback. A stale window cannot replace a newer workspace. Failed saves attempt a separately verified encrypted `sewing-recovery-v1-*` record; **Workspace → Review recovery** exports it or merges copies into a freshly loaded workspace. If both save and recovery fail, the app reports that state and instructs the user to keep the window open and export a backup. Closing drains pending saves through the existing scoped authority before disposal; operator changes cannot grant the old app a new operator's storage rights.

On a normal view transition or app close, the current drawing's final pan and zoom are captured while the shared surface is still alive. View teardown then cancels its lifetime and awaits owned surfaces before the workspace closes. A mount that finishes after its view starts closing cannot publish a new surface into that retired view.

Imports verify file hashes and stored readback. Packages use the existing OS ZIP implementation, exact entry allowlists, bounded decompression, and schema validation. File names and stored paths are checked before access. Package limits are 64 MiB per attachment or metadata entry, 256 MiB total payload, and 1000 unique attachments. A selected package follows declared record dependencies and shares duplicate bytes without merging record identities. The device-folder backup streams Sewing's own records, extraction data, and assets, verifies written files, and publishes its manifest last; it does not back up unrelated apps or raise the in-memory ZIP limit. PDF output is limited to 128 sheets per copy.

Sources: `factory/apps/sewing/model.js`, `store.js`, `storage-portable.js`, `SewingApp.js`, `storage/StorageWorkerClient.js`, `packages/Zip.js`.

## Browser-only distribution

No Node.js or npm build is added. `tools/vendor_sewing_pdf.py` verifies archive-pinned PDF.js, pdf-lib 1.17.1, and fontkit 1.1.1 for the existing shared Notepad reader and output services. The owned fitting generator runs through Factory's cancellable module-worker lifecycle. FreeSewing source, archives, licenses and preparation tooling remain on disk for historical provenance; current fitting-worker deployment does not include those generator assets.

`bundler/site.py` copies the native runtime closure into both supported OS site layouts. It follows the owned Sewing fitting worker, OCR worker and Engine triangular-cloth worker's actual module imports, alongside the shared PDF modules, fonts, CMaps, codecs and profiles. The graph validator checks deployed import edges and copied bytes. Third-party notices remain in the repository `NOTICE.md` and original vendor license files. This change retains the PDF backend and Engine's Kaolin integration.

The native-worker packaging tests compare every staged asset with its source bytes, retain the original shared PDF assets and Engine mesh operations, and reject a missing fitting, OCR or cloth import. They also verify that archived FreeSewing provenance remains unchanged while its distribution is absent from the current runtime closure. These focused checks validate asset staging; they do not establish a complete OS release, successful cloth settling or physical pattern fit. (Source: `bundler/tests/test_webgpu_os_runtime_assets.py`.)

## Verification

With the Python development server serving the repository on port 9001:

```powershell
python tests/sewing/run_workspace_contracts.py --screenshots
python tests/sewing/run_ui_review.py
python tests/factory/run_app_parts_contract.py
python tools/vendor_sewing_pdf.py
python bundle_engine.py --target webgpu-os --no-site --dry-run
```

The browser suite covers complete UI workflows, two independent mounts, real PDF layers/display/print/reopen parity, stored measurement revisions, real ZIP/hashing, save conflicts/recovery, source replacement, cancelled generation, physical geometry, original-app regressions, Factory ownership, and live ThemeEngine inheritance. The UI review checks visible surface bounds, navigation, search, dialogs and collapsible panels in real OS themes. Screenshots written under `tmp/sewing-verification/` use isolated test data; makeover views are in its `makeover/` folder. Test backends are confined to `tests/`; production requires the actual OS sandbox and storage services.

September 12 source verification includes 43 scoped-GPU worktable checks, 19 connected-quilt checks, 18 cutting/material/physical-record checks, 49 calibrated-import checks, 20 reusable-library-record checks, 36 accessory worktable checks and 11 shared GPU-preview checks. Twelve shared-control/history checks include rejected undo/redo and native slider bounds. The original Notepad smoke passes 199 checks, the shared PDF reader 31, and Paint physical editing nine. A separate captured Sewing build passes ten browser checks against its staged workers, reusable records and shared PDF implementations; this is an entry-only build, not a published full-OS release.

The current shared cloth suites pass 34/34 reference checks, 9/9 hybrid/lifecycle checks, 10/10 GPU checks, 12/12 construction-cloth checks, 16/16 unified-construction checks, and 21/21 accessory-cloth checks. Actual workers verify the production-default lined tote and lined pouch inside their 30-second budgets, alongside the unlined tote, unlined pouch, pillow and quilt fixtures. Accessory cloth verifies admitted dynamic steps, lifecycle and revision ownership; it does not establish complete sock/glove/bowl settling or physical fit. No physical samples have been supplied. Contract passes do not substitute for sewn samples or an intended user's usability trial.

The browser software scope now includes the unified Studio, complete gallery/native creation routes, bounded construction previews, cloth workers and physical-panel derivation. Family-specific sewn samples, garment-fit observations and calibrated material behavior remain physical acceptance work. Projector calibration, marketplaces and automatic fitting of arbitrary PDFs remain outside the plan.

## Project-owned image scanning

Recognition and training use Engine pixel analysis and AGI's supervised glyph learner in browser JavaScript. The existing scoped WebGPU compute service can accelerate matrix scoring. The scanner has no external OCR runtime, external pretrained OCR model, language package, Python recognition process, or cloud endpoint. The shipped bases are trained by the project's developer tools; Python remains repository packaging and source-data tooling, not the recognition runtime.

`DocumentImageMath.js` reuses Engine image sampling, luminance and statistics. It composites transparency onto paper, detects polarity, thresholds ink, estimates small page skew, groups connected components into lines and words, and extracts 580-value glyph features. Bounding boxes, quadrilaterals and transforms retain original image coordinates. Graphics exclusions and resource limits are explicit. This does not reconstruct sewing geometry.

The OS ships the developer-trained `document-glyphs-2026-09-v2` base: 10,485 unique supervised examples from 10,552 authored samples. The recipe retains the eight earlier requested families with normal/bold/italic styles, 28/40 px clean renderings and seeded degraded 40 px renderings; adds their clean bold-italic examples; adds clean Arial Narrow and Palatino Linotype examples; and adds 24 document symbols in the earlier eight families. Degradation includes blur, reduced contrast, a lighting gradient and pixel noise. `tests/sewing/train-ocr-base.html` generates and exports this base entirely in browser JavaScript, using Canvas font metrics, Engine atlas packing, Engine seeded randomness and AGI fitting. It does not use customer documents or benchmark text. Requested fonts describe the training environment; they do not prove the exact font used by a scanned document.

Normal scanning loads the bundled learned examples directly; it does not generate fonts or fit a base model on the customer's behalf. The compact model uses existing OS BinaryPack and gzip codecs, with bounded decoding, SHA-256 verification and exact f32 feature preservation. Its immutable identity accompanies saved models. A compatible old personal model upgrades to the new base while retaining non-baseline examples, including explicit corrections; failed persistence preserves the old durable record. A 94-character legacy record is validated against its original alphabet before widening to 118 characters. Invalid or arbitrary alphabets cannot gain permission to introduce labels by claiming migration. Records already carrying the current base identity retain their revision without repeated migration.

`createGlyphRecognizer()` remains a supervised exemplar classifier, not a trained neural sequence recognizer. Its optional `geometryWeight` gives the four geometry features explicit weight in the cosine comparison; the printed profile uses 6 and the handprint profile uses 1. Portable learned feature bytes remain unchanged. CPU batches reuse prototype tiles, and the scoped GPU path uses the same weighted vectors. Similarity scores are uncalibrated, not probabilities. The printed alphabet includes ASCII plus `¼½¾⅛⅜⅝⅞×÷°±−–—‘’“”²³•→←↔`. Alphabet coverage does not guarantee accurate segmentation or recognition of every instance. Joined letters, decorative fonts and damaged scans still need review. Synthetic font fixtures do not establish accuracy on real pattern envelopes.

Each glyph may retain its nearest learned font exemplar as `fontMatch`, explicitly a candidate. Accepted glyphs vote within a line; at least three matching votes and half the eligible votes are required before publishing `fontEvidence`. Its `support` and `count` are integer winning/eligible counts, and `fraction` is their ratio. This is a closest style sample, not exact source-font identification or a calibrated probability. Original PDF font metadata remains stronger evidence where the source supplies it. User corrections do not invent font identities.

Engine's `analyzeDocumentRegions()` consumes the same thresholded mask, gray pixels and deskew transform as OCR. It exposes bounded line, closed ink-boundary and artwork candidates with original-pixel geometry and source provenance. Closed contours retain outer/hole roles; they are not certified cutting lines. Continuous-tone or dense-ink regions identify areas to inspect, not photograph subjects. The shared worker and `math.image.document-analysis@1` use this same helper when `regions: true`; optional `regionOptions` limit its work independently. No second segmentation framework or image-recognition dependency was added.

Word spacing uses repeated character advances when supported by regular-line evidence; short lines require every eligible gap to agree with the inferred advance. Oversized joined-ink candidates cannot establish an advance. Otherwise, clearly separated gap groups may lower the earlier height-based boundary without erasing an already clear space. It does not insert sewing vocabulary or alter source coordinates. Engine line records expose the selected method in `spacing`.

Compact fractions, equality bars and division dots can be assembled from independently detected ink components before recognition. Geometric evidence and original component identifiers survive on the resulting glyph; the recognizer still chooses the label and may abstain. This avoids publishing overlapping numerator, slash and denominator crops as three readings. Ordinary baseline fractions such as `1/2` retain their separate characters.

The printed profile also evaluates conservative two-letter alternatives for selected wide, connected ink components. Engine's `documentGlyphPartitions()` retains the intact crop and tests bounded vertical cuts without erasing, duplicating, or inventing ink. Factory scores the child crops with the existing model. Both letters must have strong, sufficiently separated scores and improve on the intact reading; confident intact readings and ambiguous alternatives remain unchanged. Accepted alternatives still require human review. Original-coordinate evidence, parent/child identities, and lifecycle cancellation survive worker and GPU transfer. The optional work is capped at 32 parents, six cuts each, and 384 child feature rows. `recognize(input, {joinedPrint: false})` retains the intact comparison path; the handprint profile does not use printed-letter splitting.

The September 2026 quality benchmark contains 14 deterministic authored images, 458 reference characters and 81 digits. It separates unseen font configurations, four font families excluded from the training recipe, small print, noise, rotation and segmentation challenges. The report retains image/model hashes, exact case-sensitive character edits, number preservation, source coordinates, runtime failures and timing. Initial comparison reduced exact character error from 56/458 (12.23%) to 36/458 (7.86%); digit retention remained 79/81. Exact numeric runs improved from 10/14 to 11/14 cases. This is a measured improvement on synthetic fixtures, not production accuracy certification. The model recipe was fixed before the comparison.

The document-glyph v2 scanner measured 28/458 character edits (6.11%). The current joined-print increment, `OCR_VERSION` 1.3.0, measures **24/458 edits (5.24%)** on the identical 14 images, expected strings, and learned base. Exact readings increase from 1/14 to 3/14; two cases improve and none regress. Digit retention remains 79/81, exact numeric runs remain 12/14, and the four excluded font families remain at 10/121 edits. Three of 291 accepted glyphs are wrong. Joined alternatives remain review-required and therefore do not inflate the accepted-glyph denominator.

The separate nine-image style/symbol diagnostic is unchanged: 30/199 character edits, 3/9 exact readings, 23/24 digits, 6/9 exact numeric runs, and 11/119 wrongly accepted glyphs. Its three exact images are the fraction, measurement-expression, and arrow/operator rows. The joined-print change does not solve script fonts or every typographic symbol. These measurements are not handwriting accuracy or a general 95% collection-organization claim.

A separate authored joined-ink evaluation contains 48 connected positive pairs and 96 negative examples. Actual scoped GPU evaluation improves exact positive readings from 1/48 to 27/48 with 26 changes and no positive regression. No negative example is falsely split. Only 32 negatives are geometrically eligible and 20 actually receive child scoring; the remaining 12 are excluded by cut admission or confident intact recognition. The result establishes conservative recovery on these fixtures, not a measured false-split rate for real documents. The receipt records all image hashes, 376 scored feature rows, model identity, timing, and released jobs/buffers. Sources: `tests/sewing/ocr-quality-benchmark.html`, `ocr-style-symbols.html`, `ocr-joined-evaluation.html`, and `ocr-joined-service.html`.

### Separate handprint and connected-text experiments

**Text style to scan** chooses printed text or handprinted letters and numbers. The handprint profile has its own bundled base, learned records, sample ownership, alphabet, and validation thresholds. It uses actual NIST EMNIST Balanced source images, with a 47-class alphabet and explicit uncertainty for the 15 classes that combine uppercase and lowercase. It is intended for isolated or separated handprinted characters. It does not establish cursive reading, full case recovery, or a writer-disjoint evaluation of the published NIST split.

The separate isolated-character model evaluation reads 2,600/3,760 held-out source images correctly (69.15%). Its validation-selected thresholds admit 510/3,760 candidates, with 16 wrong; this is 13.56% coverage before Factory's additional case and group uncertainty checks. Validation and test images are separate, but the NIST writer separation is not verified. This model-level result is distinct from end-to-end document recognition.

The browser service diagnostic reads 36/47 held-out single-character source crops exactly, with all 47 retaining the expected crops and using actual GPU scoring. Five authored pages assembled from genuine held-out handwritten characters contain 20/100 character edits. The original three page fixtures improve from 38/67 to 10/67 edits after segmentation and spacing corrections. These composed pages are not naturally written words or lines. Their source indices and original ink coordinates remain visible, and every uncertain reading remains available for correction. Sources: `engine/core/text/HandprintDataset.js`, `tests/sewing/train-handprint-base.html`, `handprint-service.html`, and `handprint-lines.html`.

Connected handwriting is a separate experiment. `agi/vision/CtcMath.js` implements connectionist temporal classification (CTC) loss, gradients, and greedy decoding. `HandwritingSequenceRecognizer.js` consumes shared AGI trainable dense layers, temporal context and TensorOps. The new optional `SpatialHandwritingEncoder.js` adds an owned learned stroke convolution using shared Engine spatial operations. Fourteen CTC checks and six spatial checks cover gradients, actual GPU parity, cancellation, variable-width input and resumable optimizer state. The original voice trainer consumes the same extracted AdamW implementation. `HandwritingSequenceDataset.js` retains the DHSD whole-writer split; photographed English examples have an image-disjoint split because writer identities are unavailable. These capabilities do not establish a production sequence model or connect cursive recognition to the normal scanner. No customer training is required.

The first connected-handwriting training run exhausted its 20-minute budget without producing a model. The revised developer recipe uses batches of 32 and at most 30 epochs within a 12-minute optimization budget, reserving the remaining total budget for evaluation. Validation-selected checkpoints explicitly remain `checkpoint-not-test-evaluated` until held-out test results exist.

The revised run completed held-out evaluation after 725.4 seconds and 18 training epochs, selecting epoch 17 by validation error. Its five held-out writers produced **9,733/11,832 character edits (82.26%) and 0/802 exact words**. Validation was also poor: 9,580/11,843 edits and 0/803 exact words. The optimization budget ended before 30 epochs, but the evaluation did finish. This experiment does not provide useful connected-handwriting recognition. Its model remains a developer artifact and is not registered with the normal scanner. Sources: `tests/sewing/train-connected-handwriting-worker.js` and its downloadable evaluation receipt.

Later developer runs remain distinct from that historical test. The DHSD continuation selected a checkpoint with 5,522/11,843 validation edits (46.6267% CER), 12/803 exact words. English adaptation selected epoch 9 of 12 with **9,792/14,860 validation edits (65.895% CER), 300/3,538 exact words**; its DHSD validation error rose to 47.1502%. The existing frozen test partitions remain sealed for these later candidates. Neither result meets reliable handwriting requirements. The new spatial frontend separately memorized eight real training words after 175 updates, which proves trainability only. Its unseen-writing accuracy has not been established.

Research-driven `prepareHandwritingRaster` now preserves grayscale strokes, rectified source proportions and invertible source coordinates, using 64/128/256/512-pixel width buckets. Blank, oversized and over-wide inputs produce explicit issues. The developer corpus preparation uses original-resolution bounded word crops, publishes a separate version and preserves old artifacts. A matched one-epoch continuation from the same v5 weights completed with 29,220 shared training examples and 1,827 updates per arm: original preparation reached 64.9192% English validation CER (344/3,538 exact words), versus grayscale 69.8183% (275 exact). DHSD validation was 46.1285% versus 54.0910%. The grayscale path remains experimental. This short continuation from legacy-trained weights does not establish a from-scratch winner, and neither candidate was added to normal scanning. See [the research, measured comparison and next experiments](../agi/ocr-improvement-research.md).

Further recognition work should evaluate the owned sequence experiment against held-out natural handwriting and the existing printed baseline. Narrow punctuation gaps and visually indistinguishable strokes still expose limits of independent glyph matching. Synthetic text generation and visual augmentation are supported by [Jaderberg et al.](https://arxiv.org/abs/1406.2227) and [Atienza](https://arxiv.org/abs/2108.06949); [CRNN](https://arxiv.org/abs/1507.05717) and [CTC](https://www.cs.toronto.edu/~graves/icml_2006.pdf) address sequence recognition without requiring pre-segmented character labels. These references do not imply that the current temporal dense model implements CRNN or has passed real-collection accuracy gates.

The Factory SDK's `loadFactorySurfaces()` exposes `createOcrService({signal,compute,modelStore,handprintModelStore,onProgress})` with `recognize`, `learnGlyph`, `exportModel`, `importModel`, `cancel`, and `destroy`. Recognition and model operations accept `profile: 'printed' | 'handprint'`, defaulting to printed for existing callers. Independent scoped model adapters keep profile bases, corrections, exports, and sample identities separate; cross-profile imports and lessons are rejected. Apps supply `syscalls.compute`; the scanner does not acquire an unscoped GPU adapter. JavaScript workers run segmentation. AGI scoring shares Engine's `MatmulKernel.js` with `TensorOps.matmul` and `math.matrix.multiply@1`.

**Scan text** in Sewing image attachments and the shared controlled PDF reader opens `createOcrReviewSurface`. The customer workflow is **Scan → review or correct text → Save**. Saving reviewed text updates Sewing's extraction record and search index. Late background scans preserve reviewed pages. Customers do not train the recognizer, and editing text never changes the model or original bytes.

### Review and save scanned text

The review opens directly in the same text editor as Notepad. **Save text** (or Ctrl/Cmd+S) saves reviewed words. The header keeps the unsaved state visible. Normal app surfaces contain no training controls, training instructions, or clickable glyph-training targets.

The shared surface defaults to `allowTraining: false`. Developer and test callers may explicitly pass `allowTraining: true` to inspect selected glyphs, exercise `learnGlyph`, and check model changes. That opt-in retains the existing expert tools and saved lessons without exposing them in Sewing or Notepad's normal workflow. This is a developer verification capability, not a customer setup step. (Source: `webgpu-os/factory/components/ocr/review.js`.)

The original preview uses Factory's shared drawing viewport, with zoom, fit, keyboard overview navigation and the original coordinate overlays. At widths up to 760 px, **Original preview** switches surfaces without losing text or selection. The first opening fits the page; subsequent switches retain framing. Controls use the OS theme and 44 px action targets. The enlarged image retains the paper's original appearance.

**Detected content** is collapsed inside the original preview. Its native selectors filter text or shapes/artwork and frame a chosen source area. The inspector explains candidate font styles and the limits of detected ink geometry. Saving corrected text preserves the evidence and its separate candidate status; it cannot approve a contour, assign a photograph subject or teach the recognizer.

### Next scanning priorities

1. Broaden and evaluate the source-linked information extraction described below against real pattern envelopes and instruction layouts. The current conservative grammars do not establish collection-wide semantic precision.
2. Establish page layout, table cells and explicit diagram annotations before assigning grainline, fold, notch or seam roles. An arrow glyph or a closed outline alone does not establish a sewing relationship.
3. Train and evaluate the owned CTC experiment on natural, transcribed handwriting with separate writers before exposing a connected-handwriting mode. Keep the printed and isolated-handprint profiles separately evaluated; a script font is still printed type. Customers should not have to train it.
4. Distinguish photographs, illustrations and repeated fabric motifs through a separately evaluated vision capability. Current artwork regions provide source locations, not garment or fabric identification.
5. Evaluate on a held-out collection of real envelopes, scans and photographs before claiming automatic-organization precision. The user's collection was not available during this work.

Windows Character Map is useful for choosing character coverage. It is not a source of OCR labels for arbitrary pixels. We render authored characters directly through browser fonts for developer training; customers do not open Character Map or enumerate local fonts. Unicode distinguishes character identities from their font-specific glyph shapes, and browser Local Font Access is permission-gated. See the [Unicode font FAQ](https://www.unicode.org/faq/font_keyboard.html) and [Local Font Access specification](https://wicg.github.io/local-font-access/).

### Source-linked pattern information

The existing organizer now retains page numbers, exact bounded excerpts and text offsets for individual suggestions. A stable candidate ID identifies each proposed value. Explicit native-text labels can still populate scalar details during initial intake, but conflicting identity values require review. OCR and corrected scan text never establish an automatic pattern identity. Rechecking saved text only prepares suggestions; it does not apply native-text values behind the review dialog.

**Review suggestions** shows current details alongside proposed changes. Selecting one scalar value excludes its competing alternatives. Measurements, fabric requirements and instruction references are additions, so independent rows can be selected together. An existing conflicting size-chart measurement must be edited explicitly. **Show source** opens the original attachment at the cited PDF page while preserving the pending selection. **Recheck saved text** reuses durable extraction records without rerunning OCR or asking the customer to train anything.

Supported structured sources are deliberately explicit:

- Fabric requirement lines containing labeled width, length, stretch and optional size, with semicolon or vertical-bar separators. Printed material roles such as outer and lining remain distinct. Lengths use the shared exact physical-unit parser, including fractional inches, metres and yards.
- Body or finished measurement tables with a declared role, explicit units and tab or vertical-bar delimiters. One unambiguous value must correspond to each size and measurement. Unlabeled grids, ranges and reconstructed visual table layout remain unsupported.
- Explicit instruction page ranges and numbered steps. A page number printed in the instructions is separate from the source page on which that reference appears.

Applied rows retain their original source reference and exact quantities. Editing an imported chart measurement updates its exact value and marks it as a user measurement; the prior source evidence remains historical. Fabric discovery keeps missing quantities, material roles and size selections visible as checks, and still cannot promise that a cutting layout fits the available fabric.

Applying suggestions uses existing Factory history and awaits verified workspace persistence. A failed write retains the review with **Retry save**, which retries persistence without applying the rows twice. Undo restores only the information changed by the command and preserves evidence arriving later. Pending and accepted source references remap to the copied assets during portable package import. Saving corrected OCR text refreshes affected suggestions; if that later refresh fails, the already saved text remains durable and the interface explains how to retry.

Extraction is bounded to 2,000 pages, four million text characters, 50,000 lines and 512 candidates per asset analysis. Long or ambiguous rows stay available in the original. These authored-document contracts are not handwriting recognition, arbitrary table reconstruction, garment identification or evidence of 95% automatic organization precision. (Sources: `factory/apps/sewing/pattern-information.js`, `organizer.js`, `intake.js`, `library-view.js`, `library-commands.js`, `model.js`.)

Verification pages include `tests/sewing/pattern-information.html`, `pattern-information-intake.html`, `suggestions-ui.html`, the existing `collection.html` and `storage-extraction-concurrency.html`. They exercise explicit versus uncertain fields, compound units, conflicting editions and chart rows, partial adoption, source navigation, cancellation, concurrent edits, save failures, undo and portable provenance.

The September 2026 information increment passed 24 extraction, 21 intake/persistence and 13 UI browser checks, alongside the existing collection, storage-concurrency, OCR-intake, workspace and Sewing-domain regressions. A separate reviewer scored ease/discoverability, guidance without customer training, source preview/navigation, recovery/accessibility and architecture/WebOS consistency **8/10 each**. The reviewer audited source and the lead's browser evidence; these are engineering assessments rather than trials with the intended user. The compact modal is measured against its owning app and preserves its action footer when the app narrows.

Closing a review with unsaved text offers **Keep editing**, **Discard text**, and **Save and close**. A failed save keeps the text available. Callers use the surface's asynchronous `requestClose()` before voluntary navigation; `hasUnsavedText()` exposes the text state. Sewing's navigation, attachment Close/Escape, and rescanning use this guard. The PDF adapter shares it with Notepad's document transitions. Authority revocation and forced disposal still cancel work immediately.

The library keeps bulk actions under **Select patterns**, with optional **Filters & view** and **Library tools**. Opening a pattern starts at its heading; returning restores the library's scroll position and original Open button. File buttons identify the attachment, and optional measurement/material tables stay collapsed until needed.

`tests/sewing/ocr-review-ux.html?review=1` mounts the actual scanner and customer review with 720 × 520, 360 × 520 and desktop previews, plus production dark/light/contrast/motion themes. Its checks verify that customer surfaces contain no training controls and that preview interaction cannot train the model. It also checks original pixels, first-reveal framing, text preservation, keyboard paths, reachable controls, and failed-save recovery. Explicit expert fixtures retain separate teaching regressions; `&training=1` opens that developer test mode. These are engineering usability checks, not target-sewist trials or OCR accuracy certification.

An earlier September 2026 independent usability review scored the library/OCR workflow **8/10** in each of five categories: everyday ease, training clarity, source preview/navigation, accessibility/responsiveness, and WebOS consistency. Baseline scores were 5, 5, 4, 6 and 8 respectively. Those ratings preceded the removal of customer training controls. The reviewer personally inspected the baseline; revised ratings used independent source/test review and the implementation team's browser evidence after the reviewer's browser became unavailable. The ratings exclude OCR accuracy and unfinished construction/cloth previews.

The document-glyph v2 follow-up independently scores everyday ease, customer setup burden, preview/navigation, accessibility/responsiveness and WebOS consistency **8/10 each**. It combines a separate source audit with the lead's actual 26/26 browser interaction checks at 720 × 520 and 360 × 520. It is an engineering review, not target-user research. Opening Detected content frames the first selected area after layout; closing restores the prior zoom/pan. Recognition accuracy remains separately reported above.

The shared viewport also fits a surface first mounted in a hidden panel when it gains usable dimensions. Resizing preserves explicit user pan/zoom. `tests/sewing/notepad-ocr-ux.html` checks actual Notepad scan transitions, including retaining text on cancelled tab/mode/new-document changes and preserving the same review during preference updates.

`createScopedModelStore({sandbox,key,signal,assertCurrent})` supplies `load()` and `save(snapshot,{signal})` over the same verified `EncryptedRecordChunks` used by Sewing's repository. Strict compare-and-swap and readback protect learned revisions. Cancellation before the model head commits prevents publication; successful committed saves finish verification. AppSandbox enforces operator scope. Sewing borrows one OCR service for intake and PDF review. Apps keep independent saved models.

Browser verification pages include `tests/compute/document-image.html`, `tests/agi/glyph-recognizer.html?gpu=1`, `tests/agi/tensor-matmul.html`, `tests/sewing/document-ocr.html`, `tests/sewing/learned-model-store.html`, and `tests/sewing/ocr-intake.html`. The joined-print increment also passed 28 Engine document-image checks, seven shared OCR joined-service checks with actual GPU scoring, and nine profile-isolation checks. They cover actual pixels, child sample ownership, large-source coordinate mapping, cancellation, corrections, storage integrity, and independent owners. Real-collection OCR evaluation remains outstanding.

Sources: `engine/core/math/DocumentImageMath.js`, `engine/core/text/GlyphRasterSource.js`, `agi/vision/GlyphRecognizer.js`, `factory/components/ocr/`, `factory/core/storage/EncryptedRecordChunks.js`, `factory/apps/sewing/intake.js`.

## See also

- [Improving owned text and handwriting recognition](../agi/ocr-improvement-research.md)
- [OS architecture](architecture.md)
- [App catalogue](app-catalog.md)
- [AppForge contracts](appforge-contracts.md)
