# Changelog The phase-by-phase record of battuta, newest first: what each phase set out to do (plan + exit criteria, moved here from [PLANNING.md](PLANNING.md)) and what actually landed (moved here from the README's old Status section). The open phase — extension architecture, with reference layers and OMR folded into it — stays in [PLANNING.md](PLANNING.md); its running record — one bullet per decision, one per slice as it closes — is each release's section below, and changes since the last tag gather under *Unreleased*. ## Unreleased Phase 12 — hardening ([PLANNING.md](PLANNING.md)): no feature; what a review of 1.3.0 found on 2026-11-20, slice by slice, each with the test that would have caught it. No version has moved and `@battuta/api` is untouched. - **Slice 1: the corpus in the repository, the properties in CI (2026-11-20).** The four sample-encodings scores the tests read are committed (the user's decision; 5 MB) and `.gitignore` names them. Each file's own `` says the encoding is in the public domain and that the sources it was made from may be under copyright; the sample-encodings repository's own licence was not checked. On a clean checkout — CI's — the core suite had skipped seven tests without saying so: the round-trip sweep ran on the one hand-made fixture and the three property tests not at all. The corpus tests no longer skip; a missing file fails. The property suite (`property.test.ts`) was made to mean what it says: the generator stopped at 33 under a `% 35` switch, so the last case (`SplitEvent`) was never drawn — every number is a case now and an unknown one throws; the snapshot is the whole ``, not its measures (a revert that left a `scoreDef` changed passed); nine commands it never built are in the pool (`ChangeDuration`, `ToggleEndRepeat`, `SetSyl`, `CycleDynam`, `RemoveControl`, `CycleStaffGroup`, `SetTempo`, `RegenerateIds`, and `SplitEvent` by number); it runs on three documents — the chorale, the context fixture and a small score written in the test for what those lack (a chord, a tuplet, rests, marks, an ending, attributes in an unusual order); redo is a property of its own (undo one by one, redo one by one: every state comes back, ids included); and a last, deterministic test finds for each of the 43 kinds an edit that changes each document, holds it to revert and redo to the byte, and names any kind that applied nowhere — in one sample of 300 runs before, three kinds had thrown on every attempt: being in the pool was not being tested. (A kind is a number of the pool; three of them build one of two classes.) Failures print where two documents part, not two whole scores. `BATTUTA_PROPERTY_RUNS=4000` hunts longer (100 by default). Strengthened before anything was fixed, it failed for the two reasons below and no other. - **Slice 2: redo is the same edit (2026-11-20).** `apply()` runs again on every redo and minted new ids each time, so a redo rebuilt its elements under other ids and the commands after it — which address what it made by id — missed: a note entered and then sharpened came back from undo, undo, redo, redo without its sharp, the undo depth still saying 2; other pairs threw on the second redo and the command left BOTH stacks. 25 of the pool's kinds did it. Each command that creates elements now holds a `MintedIds` (`ids.ts`, internal to core): rewound at the top of `apply`, it mints on the first apply and hands the same ids back, in the same order, on each later one — the order is the same because a redo runs on the document the first apply ran on. The commands that left the session to identify what they made (an inserted or duplicated measure's staves, an added staff or voice, a pasted staff, an inserted `scoreDef` or clef, a new beam) identify it themselves from the same source, so nothing is left for the session to name differently the second time; its own pass after each command stays, as a net. `CommandStack.undo` and `redo` leave a command that throws where it was instead of dropping it, and the editor's undo and redo keys say "redo refused: …" for one. Gates: the redo property; three stack tests; `apps/editor/test/session-redo.test.ts` — seven pairs through the session itself (enter, insert, paste, duplicate, add a staff, make a chord, each followed by an edit of what was made), which fail on the old core and pass on this one (the session parses with `@xmldom/xmldom` there, a dev dependency the editor now declares; the core's tests already used it). - **Slice 3: revert restores the order of attributes (2026-11-20).** Five commands deleted an attribute on apply and wrote it back on revert, which puts it last: `left="rptstart" n="1"` came back as `n="1" left="rptstart"`. `ToggleRepeat`, `ToggleEndRepeat`, `ToggleVolta` (its barlines), `ToggleArtic` and `SetTempo(null)` now keep the element's attributes whole and put them back whole. Gates: `revert-order.test.ts`, one case per command with the attribute first in source order (on the corpus alone the fuzz met one after 1,477 runs, in the one hunt that counted); the properties at 4,000 runs each. - **Slice 4: saving does not lose work (2026-11-20).** The user's decisions: a restored tab whose file changed while battuta was closed is settled at restore, not at its first save; the stored session stays `v1` with a field added. Six things, each a case of `spikes/verify-save.mjs` — the built editor in a throwaway browser, the shell's file commands an in-memory stand-in; 22 checks, 17 of which fail on the code before this slice. Nothing of it ran in the real shell. (1) The stored session keeps each tab's file time (`mtime`, the shell's `file_mtime`), and a restored tab holds it: before, a restored tab knew no time, the save guard compared against nothing, and the tab saved over a file that had changed meanwhile without a question. At restore each tab's file is looked at (`restoreCheck`, `sessionStore.ts`): unchanged, nothing; changed and the tab has nothing unsaved, the tab takes the file's content unasked — nothing to lose, and nobody working through a folder of scores is interrupted; changed and the tab has unsaved changes, one question, *load the file from disk?*, whose Cancel keeps the tab (its save then asks before overwriting); gone, the tab is the only copy, says so and counts as unsaved. A session 1.3.0 stored has no time and is trusted once, as before. The tab is judged as it is when the shell answers, not as it was stored: one edited meanwhile asks. That a tab with nothing unsaved reloads WITHOUT a question is this session's reading of "at restore", for the user to confirm. The shell answers a new command for it, `read_score` (the text at a tab's path — given any path it reads it, as `save_score` writes and `file_mtime` looks: slice 5 holds the three to what the user granted). (2) A save writes beside the file and renames over it (`write_replacing`, `lib.rs`; `save_score` and `save_score_as`): `std::fs::write` truncated first and wrote after, so a crash or a full disk mid-save left the only copy cut short. The new file takes the old one's permissions, a link is written through, and where no file can be made beside the score the save happens in place as before; a hard link to the score no longer follows it, and extended attributes are not carried over. Android's tree paths save through the content resolver as they did. Four Rust tests. (3) The session is restored document by document: one that no longer parses is named in the error line and the others come back — it used to delete the whole stored session; when it had unsaved changes or no file of its own, its text is offered as a file to repair (a question the slice did not name). (4) A session the storage refuses is said, once, when it starts being refused — it was swallowed, and a large score was simply not recovered after a close. (5) A file is open once: the open dialog and a launch argument focus the tab that has it. (6) A save marks the tab clean for the state it wrote, not for the state when the write returned: an edit landing in between is not in the file and the tab stays unsaved. The initial chunk is 408.8 kB of 450 (406.0 after slice 3). Not done here: the Windows path forms and the single running instance (untested leads of the review), and the storage's size itself — a session past the quota is said, not kept. - **Slice 8: two findings of the phase (2026-11-20; the user put them here).** `ChangeContext`, given a key and a clef on a staff the score does not have, wrote the key, threw on the clef and left the document changed with nothing to undo: `planContextChange` now refuses a clef on a missing staff, and the command takes back what it wrote before it throws. A tile was not drawn again after a staff-group change — the definitions it is drawn from changed (`bar.thru`, the brace), its cache key did not: the key now carries a hash of the definitions as drawn, the row header's too. Gates: an example test each (`context-edit.test.ts`, `tile.test.ts`), seen to fail first; the property pool now and then builds the refused change and holds it to "threw, wrote nothing" (2,000 runs); in the browser, a brace over two staves redraws the tile beside it (run on the fixed code only). - **Slice 5: what the editor renders, and what the shell accepts (2026-11-20).** The user's direction: as VS Code does it — nobody working in a cloned folder of hundreds of scores is blocked or interrupted; the design was proposed and accepted the same day. Hardening only; four parts. **The engraving passes an allow-list** (`src/render/sanitizeSvg.ts`), once, where the render pool receives it from a worker: what is cached, shown in the edit view, streamed to the page view and exported is the filtered drawing. Verovio's SVG is put on the page as markup, and a score can carry markup of its own that Verovio copies into its output as it stands (an `` in a page header's figure); the list keeps shapes and text — the elements and attributes Verovio 6.2 was seen to emit over the corpus, the guide's excerpts and a score with every mark the editor writes, plus the plain shapes and paint attributes of the same kind — and drops everything else: images, links, scripts, foreign content, animation, any attribute not named (so every handler, and `style`), and a reference that does not point inside the drawing. It works on the parsed document, and says in the console what it removed, once each, so a legitimate attribute missing from the list shows. Gates: `sanitizeSvg.test.ts` on the real toolkit (the corpus and the editor's marks pass whole; a score carrying marked markup comes out as shapes and text; the rules one by one) and `spikes/verify-render.mjs` in a browser with the browser's own parser — the five corpus scores node for node the same after the filter, the marked score in the editor's two views, and the cost: about 0.1 ms a tile (7 kB), 5 ms a page (190 kB). `verify-app`, `verify-phase3` and `verify-phase5` pass unchanged. **The shell answers only for what the user granted** (`lib.rs`, desktop): `save_score`, `read_score` and `file_mtime` took any path the page gave them and `workspace_open_folder` admitted any folder. The shell now keeps its own record — the files opened or saved through a native dialog or handed over at launch, and the folders picked, with everything inside them at any depth — in `grants.json` in its data folder (the most recent 1,000 files and 200 folders; in memory only on a run with `BATTUTA_EPHEMERAL_STORAGE`). Only a dialog, a launch argument or a pick adds to it; the page cannot. A path on neither list is refused with an error ("not granted…" — never "no time", which the page reads as a file that is gone), and a save that meets it opens the save-as dialog, which grants. Nothing asks: a picked folder and its hundreds of scores read and save as before. **One thing a user will see, once:** the record starts empty, so on the first launch after this version the folder view asks for its folder again, and a restored tab's first save names its file again — the shell cannot take the page's word for what was picked before, that being the point. Five Rust tests (a granted file, a folder at depth, a neighbour, `..`, a link leading out, a file that is gone, a new file in a picked folder, the store across a restart, a broken store, the lists' size). **A content security policy** for the desktop shell: its own scripts and WebAssembly, no script written into the page, no code built from text, nothing off the machine, the shell's bridge; styles inline as before (Verovio's and React's). It is one text in `tauri.macos.conf.json`, `tauri.linux.conf.json` and `tauri.windows.conf.json` (`shell-config.test.ts` holds them to one), so the tablets keep the shared file's `csp: null` until it is tried there; `devCsp` is the dev server's. A debug shell logs what the policy blocks (`csp: …`), and the smoke gained probe9: the policy is in force, and blocked nothing of what the smoke drives (tiles, the page view and playback, the folder view, the PDF reference — not the importers, the pitch reference or the stylus). An image in a header figure is no longer drawn; the web editor has the allow-list and no policy. **The test hooks left release builds:** the smoke's variables are read by a debug shell only, `bench_report` writes nothing in a release one, and the page hangs its test handles (`window.__SESSION__`, `__HOST__`) in a dev page or a debug shell, not in any shell. Run on this Mac: `sh spikes/verify-tauri.sh`, all 17 checks — the real shell with the policy, the record and slice 4's write (save, the folder view watching, rename, create, the PDF reference, playback) — and a dev-server launch, tiles drawn and nothing blocked. NOT run: Windows and Linux (the policy's `http://ipc.localhost` and the record's path forms there), and the tablets, which this slice leaves as they were — their commands gained no gate, the system's sandbox and pickers being the scope there. Found on the way, for slice 7: `verify-overlays.mjs` fails on the committed code too ("disposing removes every layer"), and the older e2e scripts default to another machine's path (`BATTUTA_ROOT`). - **Slice 6: the loader keeps what it reads (2026-11-20; built at the user's word, described in PLANNING.md after).** The round-trip sweep compared a saved file with a second parse of ITSELF, so what the first parse dropped was missing from both sides. Compared with its SOURCE — each read by a parser that is not the core's (`source-fidelity.test.ts`) — three of the four corpus scores had lost something: in their headers, `Kennedyallee 40 Bonn Germany` came back as `Kennedyallee 40BonnGermany`. `fromDom` dropped every text node that was only whitespace. It now keeps one as text when it is under `xml:space="preserve"`, when its parent or an element above it has text of its own, or when it has no line break (a space between two inline elements: `in C` was saved as "inC"); whitespace with a line break between elements is still indentation; and in the music's own structure none is ever text, since the commands address children by position. A no-break space is text (it went with `String.prototype.trim`). A file that writes MEI with a prefix (``) was saved as `` in no namespace — not an MEI file any more: it is saved with MEI as the default namespace, an element of another namespace keeping its prefix. Characters XML cannot carry are not written (a title pasted from a PDF could hold one; the saved file then opened nowhere, and took the stored session with it before slice 4); a carriage return, and in an attribute a line feed and a tab, are written as references instead of being read back as something else. The escaping tests a string once and returns it when it holds nothing of interest — most ids and numbers — where it ran four replacements. `ensureIds` no longer counts a comment or a processing instruction. Gates: the sweep of the five corpus scores against their sources and a case per rule (21 tests), three through the session, the properties at 1,500 runs, and the browser scripts (`verify-app`, `phase4`, `phase5`, `formats`, `lyrics`, `save`, `render`). Checked in Chromium on the way: a byte-order mark at the start of a file parses. - **Slice 7: the gates CI did not have, and the documents (2026-11-20).** The user's decisions: the two new browser checks into CI; the overlays check fixed, the overlays needing a verification of some kind; the generated schema file untracked; the README restructured as a welcome, not a development log. `test.yml` now runs, after the build, `verify-save.mjs`, `verify-render.mjs` and `verify-overlays.mjs` in headless Chromium, and a second job, `shell`, runs `cargo test --lib` (13 tests) on Ubuntu — written here and not yet run on GitHub. `verify-overlays.mjs` had failed on the committed code since 1.3.0, by two checks that were stale and not a fault of the editor: "disposing removes every layer" counted every layer on the page, and the Add measure plugin draws one of its own since 1.3.0 — it now counts the rehearsal plugin's and asserts the other's stays; "the caret lands on the note clicked" read the caret before it had moved — it waits for the move. The twelve older `verify-*.mjs` scripts found the repository at another machine's path unless `BATTUTA_ROOT` said otherwise: they find it from where they are. `.gitignore` names `apps/editor/src-tauri/gen/schemas/acl-manifests.json`, which every build of the shell rewrites with what that build contains (`git rm --cached` it once: left to the user, with the commit). The README is a welcome — what battuta is, where to get it on each platform, what it does, how to run it from source, what is where — and what it held for builders moved to a new `BUILDING.md` with a section on the tests, its stale parts corrected on the way (the layout without the api and the plugins, "Tauri shell later", a packaging section dated 0.0.1, an icon-cache block twice, unsigned-build advice beside a notarized release). The README and the guide's policy page now say that the store apps are published from the maintainer's machine — "nothing that ships is built on a developer's machine" was true of the desktop bundles only — and that the Windows installer is unsigned (the user, the same day), verified by the SHA-256 GitHub shows beside each release file. DESIGN.md's record of the phase was written after the tablet pass (*What the editor does not take on trust*). - **The tablet pass (2026-11-20; once, at the end, as the user asked).** One debug build for each tablet from this tree, installed over the developer builds that were there (nothing uninstalled). In it, for debug builds on a tablet or a phone only, the shell's probe10 (`PHASE12_PROBE`, `lib.rs`): the policy in force; a score saved twice to a file of the probe's own in the app's TEMPORARY folder, the shorter one read back with `read_score`, its time asked; a prefixed score with an inline space opened and saved by the WebView's own parser; and the engraving on the page off no allow-list — a line each to `shell.log` and logcat. **Galaxy Tab S8 Ultra (SM-X906B):** `verify-android.mjs`, 25 checks, all passing — its own, and since this phase a second save of the run's score (the first creates the file; this one is the write that replaces it, nothing left beside), `read_score` giving it back, the four probe lines, the policy having blocked nothing the run used (read from the shell's own `[js] csp:` lines, the probe's refusal among them as proof the log works: the WebView's own refusals do not reach logcat), and the stored session listing the tabs it listed before; then, read-only, a score of the user's in a PICKED folder read through `read_score` and `file_mtime` (the document-tree branch: the text the tab holds, the time the session stored), a MusicXML conversion through the formats plugin's worker, and playback in page view — a note lit — with no violation. **iPad Air 11" (M4):** launched on in-memory storage (`BATTUTA_EPHEMERAL_STORAGE` through `devicectl`: a blank `untitled-1`, not the user's session), the four probe lines ok, granita's 13 of 13; then a normal launch, the user's own session back as it was (`untitled-2 *`) and the same four lines. All of it in DEBUG builds: the store apps are release builds, with no probe and no violation log. The policy, tried here as an uncommitted edit, is adopted: `tauri.ios.conf.json` and a new `tauri.android.conf.json` carry the desktop's text, and `shell-config.test.ts` holds the five to one. NOT tried, for the user's hand: on the iPad a score in a picked folder saved twice (the write beside the file inside a security-scoped folder; it falls back to writing in place where no file can be made beside it); on both, the pen, the PDF reference, the pitch reference and the share sheet under the policy; a restored tab whose file changed while battuta was closed. ## 1.3.0 — 2026-11-12 (Phase 11 — The stylus) The Apple Pencil and the S Pen write on the score — battuta's first native plugin, in three parts as the user set them out on 2026-10-29. First, notes with the pen: a cross at the tip, which since 2026-11-12 unfolds into two rulers, every length across and every step of the staff down, and chords with the Pencil's squeeze or the S Pen's button. Second, ABC music written by hand with ML Kit and PencilKit — dropped by the user on 2026-11-01 after feedback. Third, symbols written by hand and read in the app by **granita**, a glyph classifier of battuta's own (vibetuned/granita; v10, trained with the replies of its test shells): accidentals, articulations, the augmentation dot, fermata, fingerings, ornaments, dynamics, notes, clefs and the repeat marks, the quarter rest as the eraser, each reading shown as engraved with a ✓ ✗ and a chooser; and a third mode that draws slurs and ties. The readings the user confirms are kept on the tablet as a dataset, train the classifier's last layer on the device and can be shared. Around it: the score grows at its end as notes are entered and the *Add measure* plugin's **+** adds a measure by tap, the PDF reference turns a page (⟳), and *Screencast keys* shows the keys and notes for videos. On iPhone and iPad battuta now needs **iOS / iPadOS 18**, the floor of the multi-function Core ML package that lets the classifier train on the device. The plan is in [PLANNING.md](PLANNING.md) (Phase 11). The application, the shell, core and the docs carry 1.3.0. `@battuta/api` has had a line of its own since its 1.3.0 of 2026-10-29 — a patch for every addition the user approved, 1.3.12 at this release — and the plugins keep theirs: Stylus 1.4.0, Screencast keys 1.3.0, Add measure 1.0.0 and the rest 1.2.0, each `engines` range at the api it needs. - **Part 3 planned: handwriting read by granita (2026-11-01).** After the user tried v7 of granitanet on both tablets with granita's test shells (a notehead on the staff for a real context; the size rule calibrated by hand to 3.0 staff spaces per canvas), the plan went into PLANNING.md (Phase 11) with the user's decisions: the mode is a status-bar item the plugin contributes, cross ↔ handwriting; marks are written through one message, `core.mark { eventId, mark }`, a closed union; the model's files are copied into `battuta-mobile` and tracked; when the model is unsure a chooser of its top three is tapped with the pen; and the heuristics the model cannot learn (the augmentation dot right of a note, accidentals left of one, fingerings and dynamics never inside the staff, clefs and rests only inside it) run over its top five. The user approved the API 1.3.5 ceiling: `StylusScorePoint` with the staff, the measure and the nearest notehead in page px, `ctx.stylus.at(x, y)`, `ctx.stylus.recognize` with the native side building granita's vector, and `core.mark`. - **API 1.3.5: the symbol's context, the classifier and `core.mark` (2026-11-01).** The approved ceiling, in full. `StylusScorePoint` gains `staff { space, middleY }` (from the staff's lines), `measure { left, right }` (where its lines begin and end) and `nearestNote` (the notehead within 8 staff spaces, a chord's note its own, with its head's centre), all in page px; `ctx.stylus.at(x, y)` reads any page point the way the events' `at` are read (null before the service has loaded — the first `capture` or `on` loads it); `ctx.stylus.recognize({ strokes, staffSpace, context })` sends a symbol to the shell's `stylus_recognize` and answers the classes by confidence (the shell's half comes with the model, M2). `core.mark { eventId, mark }` puts one of the keyboard's marks on an event through the same commands the keys use — accidental, articulation, dot (the session's in-place re-entry), fermata, dynamic, fingering, a pedal from the event to `endId` (the core refuses a pedal on one event: "a pedal needs two different events", as the keyboard's spans a selection — the one shape the approved list did not spell out), a clef at the event's measure and staff (G on the second line, F on the fourth, C on the third), a rest entered over the event — each checked at the door and copied, one undo step, the caret going to the event (`writtenBy`). `core.enterNote`'s command is now the same `EntryCommand` as the rest's. - **M3: handwriting in the stylus plugin (2026-11-01).** A second mode, switched by the status-bar item the plugin adds at runtime (✎ cross / ✎ hand; a declared item would show on the desktop too) and its one command, `battuta.stylus.mode`. In it the strokes that follow each other within 600 ms and two staff spaces are one symbol (`handwriting.ts`, pure, the plugin keeping the one clock); when the clock runs out the symbol's centre and its head are read with `ctx.stylus.at`, the place in staff spaces goes with the strokes to `ctx.stylus.recognize`, and `rules.ts` — one entry per class of granita's sidecar: its name, where it may sit, what it writes — takes the first answer by confidence whose place fits: the dot right of a note is the augmentation dot and above or below one a staccato, an accidental goes on the note to its right, fingerings and dynamics never inside the staff, rests and clefs only inside it with a clef at the measure's start; a drawn note is `core.enterNote` over the event under its head (the end with more of the pen's samples) at that pitch with the class's duration, everything else `core.mark`. A label says what was read (`sharp · 93 %`, 1.5 s); under 50 %, or with nothing fitting, a chooser of the top three appears beside the symbol, tapped with the pen (the plugin matches the tap to the buttons' page rectangles, since the pen is captured) or a finger. What the editor cannot write yet is a notice: the double flat, the ornaments (the editor only cycles them), the pedal (it needs the event it ends on), a barline; a whole rest is written as a half (one class for both). The plugin is 1.4.0 on `^1.3.5`. **Tried by the user on the Galaxy Tab the same evening** (a fingering written by hand landed on its note at 94 %), with four findings, each fixed: the strokes were invisible — the pen is captured, so the plugin now draws them in blue until the symbol is read (an `ink` overlay); the chooser was cut off by the next measure — the next tile's layer covers what spills right, so the chooser and the label now stay inside the symbol's measure, to its left near a barline and no lower than six spaces under the staff's middle; the chooser came up too much — what is written at 50 % and over now shows a ✓ ✗ for three seconds, ✓ by default, ✗ undoing it (the host's `undo` action) and offering the other readings; and the heuristics seemed absent — they ran (the fingering went through them), but the API's one `nearestNote` picks the wrong note when two are close, so the plugin now reads `ctx.stylus.at` just left and just right of the symbol too: a dot goes on the note BEFORE it, an accidental on the note AFTER it, a mark above or below on the note in its column. 40 tests. And (the user, the same hour) the nearest note must be measured by its whole engraving, not its head: under a stem-down note a mark is near the stem and far from the head, and the neighbour with the stem-up head would win. The host now measures the distance to the note's box — head, stem and flag; a chord's, for a chord's note — and still reports the head's centre, which is what granita's context is trained on; `nearestNote`'s documentation says so, and the changed meaning is API 1.3.6 (the user had committed 1.3.5 by then, so the report script asked for the bump). Then: "I still get fingering 2 in the list even if the drawing is in the middle of the measure" — the chooser offered the classifier's top three whatever the place; now only the readings that belong there are offered, for the chooser and for the ✗, and when none belongs a notice names the best reading ("nothing that belongs here — read as fingering 2 (61 %)"). Next morning (2026-11-02), two more from the user: the chooser has a last row, *none of these*, that discards the symbol (a tap elsewhere still dismisses it, and is a stroke); and the reach within which the next stroke joins a symbol is no longer two staff spaces flat but proportional to the drawing — half its larger side, at least half a space (`marginOf`) — so a staccato written right after one on the next note is its own symbol and small glyphs can follow each other quickly, while a sharp's four strokes still join. 41 tests. - **API 1.3.7: the ornaments by name, the mark under the pen and the eraser (2026-11-02).** The user's decisions after the class review: the arpeggio was missing because `Mark` had no ornament and the core only cycled them, so `Mark` gains `{ kind: "ornament", ornament }` — arpeggio, trill, mordent and **turn, new to the core** (`OrnamentCycleCommand` takes the ornament to go to, off when the event has it, and the `w` key's cycle gains the turn after the mordent: the keymap label and the guide say so); the quarter rest becomes **the eraser** — rests are what notes do not take, so no rest is written by hand — through `StylusScorePoint.nearestMark` (the dynamic, fingering, fermata, ornament or repeat mark nearest the point, by its engraving, with its id) and `core.erase { id }`: a note or chord deleted to rests as the Delete key does it (the core's `DeleteToRestsCommand` now names the rests it left, for the caret), a mark that stands on its own removed whatever its state (the core's new `RemoveControlCommand`); a rest, a pedal and the marks that are attributes of their note are refused. Found on the way: the pen's `nearestNote` names a chord's note, which the event index does not hold, so every `core.mark` on one was refused ("target not found") — the host now resolves a chord's note to its chord for the marks that go on the event, the accidental staying the note's (`ChordNoteAccidentalCommand`), and `core.erase` on it erases the chord. The classes the user is dropping from granita — the barline, the pedal, the double flat, `m` and `z` alone, every rest but the quarter — left the plugin's table (a reading the current model still gives for them is not offered; coda classes are coming, with a repeat-mark kind to approve). The eraser's target: the mark within two spaces of the symbol's centre and nearer than the note's head, else the note in the column when the symbol is in the staff or on the head. Core 64 (entry), host 2 new, plugin 44 tests. - **granita v8 in the shell, API 1.3.8 (2026-11-02).** The user retrained granita on the list above as its **battuta variant** (43 classes: granita commit 54ea42f, run `battuta_v8_ctx`; `copy-granita.sh` now reads `models/battuta`, and no longer exits on a clean working tree) — the turn kept, the double sharp and the 32nd and 64th notes out as well, and the **repeat marks** in: the coda and segno signs, Fine, D.S. and D.C. The model's context changed with it: the nearest note is measured by its **body** (head, stem and flag; a chord's as one; without accidentals, dots or articulations) and the vector carries the body's size, the above/below/left/right flags read against that box within half a space. So: `StylusScorePoint.nearestNote` gains the body's `box` (the host takes Verovio's `g.notehead` and `g.stem` boxes, the chord's for a chord's note — the whole engraving before), `StylusSymbolContext` gains `noteW` / `noteH`, the Swift, Kotlin and Rust context code follows granita's shells, the debug probe sends the new fields, and `Mark` gains `{ kind: "repeatMark", mark }` — coda, To Coda, segno, Fine, D.S., D.C. — with the core's `ToggleMarkCommand` setting one by name where the coda key cycles (the same again takes it off). The plugin's place rules read the body too (a staccato over a stem's end is above its note; "on the note" is inside its body), the repeat marks go on the event under them above or below the staff, and the table lost the double sharp and the short notes. The plugins README gained the rows for the stylus API (1.3.0–1.3.8) and `enabledByDefault`, at the user's request. Core 249, editor 179, plugin 45, API 21 tests; the initial chunk 398.7 of 400.0 kB. **On the tablets, the debug probe over granita's 13 v8 fixtures:** the Galaxy Tab 13 of 13 top-1, 20.6 ms per symbol, max |Δ confidence| 0.197 (the "dot above the staff" fixture, 85 % against PyTorch's 65 %: a 2-px blob, where Android's Canvas and Pillow differ by a pixel); the iPad 12 of 13, 8.9 ms, the **quarter rest read as an arpeggio at 50 %** where PyTorch says quarter rest 66 %. A Mac harness built from the plugin's own Swift against the IPA's compiled model (the scratchpad's `harness-v8`) shows the model is not at fault — on the fixtures' own pixels Core ML matches PyTorch within 0.01 on all 13 — and the pixels are: Core Graphics draws this zigzag with 91 ink pixels to Pillow's 74 (4 pixels far off), and PyTorch itself reads those pixels as an arpeggio at 51 %. The rasteriser is granita's iOS one, lifted as is; the user's call. The quarter rest being the eraser, real handwriting on the iPad is the test that counts. - **The shells draw like Pillow now (2026-11-02).** The user: "the erase has really low score on iPad". Measured against Pillow at the 96-px stage with primitives (a line of span 48 at fraction 0.5 maps 1:1 onto the canvas), Core Graphics and Android's Canvas draw every stroke fatter than granita's `render_strokes`: Pillow's wide line is a polygon offset by `(width - 1) / 2` ROUNDED TO WHOLE PIXELS on each axis, so a 5 px pen is 5 px thick upright and 2.8 px thick at 45°, and its `joint="curve"` is a pie slice of radius `width / 2 - 1`; the platform canvases, anti-aliasing off, ink every pixel a 5 px stroke touches (+14 % ink on the 13 fixtures, +24 % on 87 synthetic shapes) — no setting draws the same pixels. So `StrokeRaster.draw` is now a port of Pillow's own `Draw.c` in Swift and in Kotlin, no Core Graphics, no Canvas: `draw_wide_line`'s polygon, `polygon_generic`'s scan conversion (rows from the lowest to the highest vertex inclusive, crossings in single precision, each span from the crossing rounded up to the one rounded down, its corner-joining quirk included), the joint's pie slice on the unrounded points, the dots as ellipses in a box of whole pixels (those approximated: the pixels whose centre lies within the box's ellipse, a hair in). On the Mac, against Pillow: the primitives differ by one pixel in 19 shapes, the synthetic set by none, the fixtures by three at 96 px; what is left at 32 px (the sharp, fingering 3) is the fixture file's rounded `fraction` — Pillow itself reproduces those two only with the exact one. **iPad, the probe over the 13 v8 fixtures: 13 of 13, max |Δ confidence| 0.018** (0.156 and a miss before), 7.7 ms per symbol, the quarter rest at 66 % as PyTorch has it; **the Galaxy Tab: 13 of 13, max |Δ confidence| 0.017** (0.197 before), 25.6 ms. The same port went into granita's two test shells at the user's request, with their READMEs and the fixture tests' comments (their pixel guard, the user's, unchanged). - **Slurs and ties by pen, API 1.3.9 (2026-11-02).** The user: a third state of the ✎ item that lets the pen draw a line from a note (or chord) to another, "a slur if the note is different and a tie if it is the same note". So the item cycles cross → hand → **slur**; in that mode a stroke landing on a note's body (a space to spare) starts a bow, its ink drawn as it goes, and the lift on another note writes it at once with handwriting's ✓ ✗ — a tie when the two notes' written pitches are the same, accidental included, a slur otherwise — ✗ undoing it and offering the other kind. API 1.3.9: `Mark` gains `{ kind: "tie", endId }` and `{ kind: "slur", endId }`, and `nearestNote` its written `pitch` (the session's new `pitchOf`, a chord's note its own). The host orders the pair, so a bow drawn backwards is the same bow; a tie between neighbours is the tie key's command, between notes further apart the key's chain over the run (every event between a link — the core refuses a run with another pitch in it, as it refuses a tie between different pitches); a slur is the slur key's command. `bow.ts` holds the pure half (the note under the pen, the kind, the stroke into a bow); the plugin's `Reading` now carries how a choice is written, the rules' way or the bow's. Editor +1 test, plugin 51. The initial chunk came to 409,822 bytes, 222 over the 400.0 kB ceiling — the synchronous message table again — and the user raised the ceiling to **450 kB** (460,800; `budget.json` says why), to look at reducing it later. Then, from the user: "we should draw all over the row" — the ink was the landing measure's overlay only, so a bow into the next measure vanished at the barline. Every stroke event carries its sample's place with the tile's frame, so the writing and the bow now keep the page origin of every tile the pen crosses (`origins`), and each tile's ink layer draws the strokes in its own frame: a bow or a symbol shows all over the row, in handwriting too. Plugin 52 tests. - **The replies and the training on the device, API 1.3.10 (2026-11-02).** granita's test shells had proved it first — a reply saved as musicset's contribution record, and the model's last layer retrained on the tablet from those replies — and the user: "let's start the work in battuta". Decided with the user: a reply is **explicit only** — ✓ tapped, a chooser's pick, ✗ then a pick; never the silent ✓, never a bow; the replies live **in the app's private data** (`stylus/replies.jsonl` beside `shell.log` on the iPad, under the app's files on Android; one record a line, snake_case: `label`, `writer` — this install's UUID — `staff_space`, the `strokes` as the pen gave them with time and pressure, the `context`, `fraction`, `predicted`, `device`, `app`, `time`) with a **share action**; and the training is **plugin commands** — *Stylus: train on my replies*, *reset the training*, *share my replies* — each ending in a notice. API 1.3.10: `ctx.stylus.reply({ label, strokes, staffSpace, context, read })`, `train()` (a `StylusTraining`: replies, buffer, anchors, loss, accuracy, drift), `resetTraining()`, `shareReplies()`; `StylusReply` and `StylusTraining` — and nothing else. The natives are the shells' lifted whole: `Head.swift` / `Head.kt` (the layer, the replay buffer of the newest eight a class, the anchors' answers held by their KL, the L2 anchor, thirty epochs), `Annotations.swift` / `.kt` (the record and the file), the loader through the package's `personal` function / the tflite's `personal` signature with the layer as inputs and the features out, a trained layer saved as `stylus/head.json` and loaded with the model from then on. granita's export (commit 2230dde, the same run) and its `anchors.json` (152 drawings of the val split, four a class) copied by `copy-granita.sh`. **battuta's iOS floor is 18** now, from 15 (the user's decision, 2026-11-02): the multi-function Core ML package needs it (`MLModelConfiguration.functionName`) — `tauri.ios.conf.json`'s `minimumSystemVersion`, which the CLI compiles the plugin's Swift against, `project.yml` and the package's floor. The handwriting keeps every sample of a symbol (`Writing.samples`) for the reply; the `Reading` carries what was written and how to reply. Plugin 55 tests; the initial chunk 400.9 kB. - **The replies in the plugins page, API 1.3.11 (2026-11-02).** The user, on trying it: the ✎ item belongs **with the other plugins' buttons** (the header, beside 🎹 and the panels' toggles — it was in the status bar); a **train button and the replies' numbers in the plugins page**, "as plugin settings"; the shells' replies copied onto both tablets to test with (70 each, `models/battuta/replies`, into the app's `stylus/replies.jsonl`); and a **delete replies** button. API 1.3.11: the **`pluginSettings` slot** — an item a plugin adds renders under its own row in 🌣 shortcuts → plugins (`` draws one plugin's items; a runtime item now remembers its plugin); `ctx.stylus.replies()` (a `StylusReplies`: the replies kept, how many the buffer would take, the training in use or null); `ctx.stylus.deleteReplies()` — and nothing else. The plugin's section: the counts, the layer reading, four buttons — train, reset, share, delete replies (it asks first; the layer keeps what it learnt until a reset) — the same four commands, and the numbers re-read after a reply, a training, a reset or a delete. The natives keep the last training beside the layer (`stylus/training.json`) so the page shows it after a restart. Plugin 56 tests. - **Engraved symbols in the label and the chooser (2026-11-02).** The user, after the plugins page: "replace the selection text by engraved symbols". The label and the chooser now show each reading as it is engraved — ♯, 𝅘𝅥, 𝄞, 𝆑𝆑, a quarter note wearing its staccato, a dotted quarter for the dot, a digit for a fingering, Fine / D.S. / D.C. bold italic — from Unicode's musical symbols in **Noto Music**, which the editor already bundles behind the interface font; the mordent and the two bows, which Unicode lacks, are drawn (`glyphs.tsx`). The name stays on the button's title and in the notices. Checked glyph by glyph in the WebView on the Galaxy Tab. No API change; plugin 59 tests. - **PDF reference: ⟳ turns a page (2026-11-05).** The user: "we need a button to be able to rotate the reference considering landscape and reversed images". **⟳** in the panel — the strip's toolbar and the drawing editor's — turns the page shown a quarter clockwise, **⟳ all** every page: the page image itself (a lossless canvas turn, no original kept), the annotation files' boxes with it in their own frame, the scans and the strip following. The turns are kept with the PDF's drawing (`rotations` in `drawing::`) and given back to the pages on the next load. A drawing is made on the turned page: a turn empties the page's drawn systems, with a word, since every tap is a quarter and a system cannot lie on its side. Exported annotations describe the pages as turned. A turn re-encodes the page, a second or two at 254 dpi on the Galaxy Tab, so turns queue and the buttons wait (two taps during a turn netted one quarter at first). No API change; pdf-reference +7 tests. - **The score grows as you write, and a + after the last measure — API 1.3.12 (2026-11-05).** The user: "the editor will create a new measure if a note (midi or keyboard) is input and we are at the end of the score … then the plugin will add a gray measure with a + in the middle of the staff … to add measure without the need of the keyboard, specially handy when writing with the stylus". The editor: a note entered from the keyboard or MIDI on the last event of the score appends a measure and the caret goes into it (`DocumentSession.advanceAfterEntry`; a voice that merely ends before the last measure stays put; the note and the measure are two undo steps). The new plugin, **Add measure** (`battuta.add-measure`, on by default, woken at startup): a gray measure with a + in the middle of the staff after the last tile in edit view, drawn at the last tile's staff heights — one button, pressed by a finger, a mouse or the pen. API 1.3.12: the overlays point's **`end`** tile (`OverlaySpec.end`, `EndOverlayProps { measureCount, width, height, staves }`; the host packs it after the last measure, a typical tile's width, in the last row — alone in a row it takes the row before it) and **`core.appendMeasure`** (a measure after the last, as ⊞+ makes one; the caret goes to its rest) — and nothing else. The pen: the shell captures it over the whole score, so the host presses, for a pen tap on nothing of the score, the button under it that asks for the pen (`data-pen-tap`, `PenTap` in `host/stylus.tsx` — not a new host module: that is an architecture decision); a plugin never touches the DOM, the first draft of this in the stylus plugin failed the boundary test. Editor +9 tests (the message, the session's flow, the pen tap), the plugin 4. - **Gradle 9.8, the Android Gradle plugin 9.5 and Kotlin 2.4 (2026-11-12).** The user, having moved midi-stroke: "I think we can do the same here". The Android project (`src-tauri/gen/android`) takes midi-stroke's changes: the Gradle 9.8.2 wrapper (its jar and scripts, the distribution's checksum), the plugin 9.5.0 in the root and in `buildSrc`, Kotlin's 2.4.10, the Rust build step running through Gradle's `ExecOperations` (`project.exec` is gone in Gradle 9), `android.builtInKotlin=false` and `android.newDsl=false` while Tauri's own Android libraries — and battuta-mobile — still apply the `kotlin-android` plugin, the app on Java 8 (the plugin's default became 11) and `tauri.build.gradle.kts` applied through `file(…)`, which the release lint does not follow. battuta-mobile keeps its consumer rules (midi-stroke's library dropped a line naming a file it did not have). **Found on the way:** the plugin 9.5 brings Kotlin's Gradle plugin 2.2.10 into `buildSrc`, whose classes win over the root script's, so the 2.4.10 asked for there was never loaded, and a 2.2 compiler cannot read LiteRT's Kotlin 2.4 metadata (granita's classifier): `buildSrc` asks for 2.4.10 too. Gradle 9.8 starts from Android Studio's own Java 25, which 8.14 refused; the daemon still runs on JDK 21, and the comments that said otherwise (`mobile.sh`, `settings.gradle`, the README) are corrected. The project needs Android Studio 2026.2.1 or later. Debug and release builds pass; the release one is unsigned here, without the upload key. - **The stores for 1.3.0 (2026-11-12).** The user: "you forgot the release notes and the screen shots of the cross for the store". The listing (`apps/editor/store/listing.md`) gains 1.3.0's notes — Google Play's (459 of 500 characters) and the App Store's *What's New*, which says iOS and iPadOS 18 — with 1.2.0's kept below, and a bullet in the full description for the pen. Then the user: "you cannot mention google play or android in the apple store so we should also avoid mentioning the apple store or ios devices in the android version" — the bullet had named the Apple Pencil and the S Pen in the text both stores share, so it is two sentences now, the App Store's (the Apple Pencil on iPad) and Google Play's (a stylus such as the S Pen), and the listing states the rule. The store answers' device line says iOS / iPadOS 18. `npm run store:screenshots` gains a sixth scene on the two tablet sets, `06-pen`: the Melodie zoomed in all the way, the pen landing on the second measure of the first row, dragged a length longer and two steps up, photographed with the pen down and cancelled. A browser has no pen, so the script answers the stylus's commands and replays the stroke through the shell's `stylus` event, as it stages the folder view's list: the cross and its rulers are the app's. Two findings on the way: the **end tile was a `.tile`** — the Add measure plugin's **+** — so everything counting or finding tiles as measures counted one more (the script's transcribe scene waited forever for 38 tiles; five end-to-end scripts count `.tile` the same way): it is now `.end-tile`, laid out the same. And the **ruler's letters stopped at 13 px**, too small for a store image even zoomed in: they now grow with the staff up to 16 px, their distance from the column with them. - **The cross unfolds into rulers (2026-11-12).** The user: the cross was covered by the measures around it, as the handwriting's label had been, and should become "a smaller cross" that past a threshold "will unfold like an unfolded cube or a crossword puzzle", every change with "a note of the corresponding length for the x axis and a letter of the pitch for the y axis". The touch now shows a small cross and the ghost notehead; past 12 px of drag (`UNFOLD_PX`, the gesture's new `unfolded`) it opens into two rulers that cross like a crossword's words: across, above the staff, a cell for every length engraved in Noto Music, one drag step apart, so each sits where the pen chooses it; down the landing's column, a letter for every step of the staff at its height, the lines' letters left and the spaces' right, sized to the staff. The choice is lit in both, the pitch with its octave, and pulses at every change; a chord gets the letters only. A first version opened into five cells showing the next step each way; the user meant a ruler. A ruler is wider than a measure and each tile's frame clips what spills, so the overlap's fix is that every tile of the landing's row draws its own part: the plugin reads where each tile starts when the pen lands (`ctx.stylus.at` along the reach) and lays the rulers out in the row's coordinates. Checked in Chrome on the Mac over a row of clipped measures; plugin 75 tests. - **granita v10 in the shell (2026-11-12).** The user retrained granita's battuta variant with the 140 replies the test shells recorded (run `battuta_v10_replies_ctx`, granita commit b6f4a5a); `copy-granita.sh` copied it. The classes, the input, the context and the tflite's names are v8's, so no code changed for the model itself. granita's notes asked for the Core ML package, exported on Linux, to be checked on a Mac: on the fixtures it gives PyTorch's top-1 13 of 13, the logits within 0.036 on both functions, on the CPU and on every compute unit (fp16; granita's bar is 0.1). **A trained layer belongs to its model**: a layer trained on v8's features reads wrong on v10's, and the sidecar names every release alike, so the natives keep beside the layer the release it was trained for (`stylus/head.model`, a fingerprint of the release's own last layer) and forget a layer trained for another one when the model loads. The replies stay: *Stylus: train on my replies* again. - **M2: granita in the shell (2026-11-01).** `plugins/battuta-mobile` carries granita's released model, copied by `scripts/copy-granita.sh ` and named in `granita/VERSION` (granitanet v7, granita commit 80f50d6): the Core ML package in `ios/Resources`, which the iOS project compiles into the app (`gen/apple/project.yml`, regenerated), the LiteRT model and the sidecar in `android/src/main/assets` (stored uncompressed, `noCompress` in the app's Gradle), and `granita/fixtures.json`. The Swift and Kotlin `StrokeRaster`, `SymbolContext` and `GranitaModel` are granita's test shells' (3.0 staff spaces fill the canvas; the vector built natively from the raw facts); `stylusRecognize` runs them on a queue of its own, the model loaded on the first symbol; the shell's `stylus_recognize` command answers `ctx.stylus.recognize`. Android's build moved to Kotlin 2.3.21 (LiteRT 2.3.2's API carries Kotlin 2.4 metadata, which the 1.9.25 compiler refuses) and the app's `kotlinOptions` to the `compilerOptions` DSL. Debug builds run the fixtures through the real path once the page is up, a line per symbol to `shell.log` and logcat: on the Galaxy Tab S8 Ultra, 13 of 13 classes agree with PyTorch, the confidences within 0.047, 22 ms per symbol with the model's load in the first — while the tablet's screen is on; dozing, the WebView suspends the page's timers and no probe fires. The iPad build succeeded (the model and sidecar in the bundle) but `devicectl device install` hung three times that evening, as it had earlier in the day (CoreDevice on the Mac, the device listed as connected; the installs that worked took seconds), and the simulator build wants the iOS 27.2 simulator runtime, not installed; so the iOS half was checked on the Mac instead: the plugin's three Swift files compiled unchanged with a 40-line harness, against the `.mlmodelc` from the iPad app bundle and the same fixtures — 13 of 13, the confidences within 0.093 (Core Graphics draws a wide line less like Pillow than Android's Canvas), 0.5 ms per symbol on the CPU, as the plugin runs it. - **The bundle ceiling raised to 400 kB (2026-11-01), the user's decision.** `core.mark`'s mapping sits in the host's synchronous message-to-command table, which cannot load lazily: the main bundle measured 395.2 kB against the 392 kB ceiling of 2026-10-29. The user chose 400 kB over 396, leaving room for the next host-side slice; the plugin and the stylus service stay lazy. `budget.json` says the same. - **Native capture first, in 1.3.0 (2026-10-29).** The user's choices: the shell's native code captures the stylus and hands it to the core, rather than the page reading pen pointer events; and it ships in 1.3.0, after 1.2.0's store release. The native code lives in the shell's `battuta-mobile` crate. Plugins stay TypeScript and will reach the stylus through `@battuta/api` 1.3.0 (`ctx.stylus`, still to be designed with the user). - **The pen writes, fingers scroll (2026-10-29).** The user's rule: while capture is on, every stylus touch is battuta's and the page never sees the pen; fingers still scroll, zoom and tap. A probe on both reference tablets (iPad Air M4 with an Apple Pencil Pro, Galaxy Tab S8 Ultra with an S Pen) showed why the capture has to be native. On Android the WebView turned a drawn line into a scroll after 57 ms and a long press into a context menu, and gave the page about 100 samples a second against the pen's 575. The Pencil's roll and squeeze, the hover height and the S Pen's side button reach native code only. - **Slice 1 — the bridge (2026-10-29). CLOSED.** `StylusCapture.swift` (a Pencil-only gesture recognizer) and `StylusCapture.kt` (a touch listener taking every gesture the S Pen begins) send what the pen does down a Tauri channel, and the shell re-emits it as `stylus` events: strokes, their samples batched once per screen frame (page pixels, ms, pressure, altitude, azimuth, roll); a hold, the tip within 8 px of where it landed for 0.5 s (a held pen wobbles, so never path length); hover with its height; the buttons. A new host module, `host/stylus.tsx` (the user approved it), reads a point against the score — the tile under it, the nearest staff, the pitch from that staff's lines and the clef in force — and in debug builds a readout follows the pen. On iPadOS the recognizer stops the Pencil from scrolling, but WebKit still hands the page its strokes, so the page also stops pen events itself while capture is on (`shieldFromPen`). Checked on both tablets by the user: the pen neither scrolls nor taps the page (the on-screen keyboard included), fingers do both, and every gesture reached the readout. While capture is on the pen presses no control at all, so when capture turns on is a question for the plugin API. - **Part 1's design, and `@battuta/api` 1.3.0 (2026-10-29).** The user's four answers. The pen writes only on the score; everywhere else (the toolbar, the panels, the on-screen keyboard, a menu open over the score) it taps like a finger. A tap writes the pitch under the pen at the duration last chosen with the cross, a quarter until one is. A held cross previews the note, which is written once, on lift: one undo step. And the API gains `ctx.stylus`, the `core.enterNote` message and the `"stylus"` capability as a ceiling, nothing else. `core.enterNote` maps onto core's existing entry command (`ReplaceEntryCommand` in the unbeam wrap, the keyboard's own), so core is unchanged; the new plugin is `packages/plugins/stylus`. - **The pen writes the input's length (2026-10-29).** After trying part 1 on the Galaxy tablet the user changed the tap's length: not the last one the cross chose but the input's, the one digits pick, dots included; and the cross's length becomes the input's, as a digit would make it. So `@battuta/api` 1.3.1 (the user approved each): `ctx.editor`'s `entryDur` and `entryDots`, `core.enterNote`'s `dots`, and `ctx.setEntryLength`. - **The Pencil's lift, found (2026-10-29).** On the iPad the cross stayed up and no note was written. The `[stylus]` lines in the debug log showed every stroke's down and every hold, and never a lift. The shield's `preventDefault()` on the Pencil's `touchstart` makes WebKit fail every native gesture recognizer that waits on its own, the shell's Pencil recognizer included. So the shield now only stops the pen's events, and prevents just the mouse events and click a tap becomes. A recognizer reset with the Pencil still down now ends the stroke as a cancel. On the way, the iOS side stopped dropping an event silently: a NaN in a sample made Tauri's JSON encoder throw, and `try?` lost it. Checked by the user on both tablets. - **The cross at the touch (2026-10-29).** Waiting half a second for the hold was too slow (the user, after trying it on both tablets), so the cross comes up as the pen lands, and a tap is a lift where it landed. Every stroke on a staff now steers the cross, so handwriting (part 2) will need a mode of its own. - **Chords with the pen, and `@battuta/api` 1.3.2 (2026-10-29).** The user's request: the Pencil Pro's squeeze or the S Pen's side button "as a shift". The user's choices: a press arms the next stroke (a second press disarms it), and that stroke's pitch joins the note under the pen, at its length. The API gains `core.addChordNote`, which maps to the keyboard's chord command (`AddChordNoteCommand`, Shift + a letter). - **The caret goes to the pen's note (2026-10-29, `@battuta/api` 1.3.3).** The user: "the caret should move to the added or edited note". The host now puts the caret on what `core.enterNote` or `core.addChordNote` wrote (the note, or the chord it joined), for any plugin, as keyboard entry leaves it where it looks. There's no new API member; the two messages' documentation says so, hence the patch bump. The bundle is now exactly at its ceiling (390.6 kB): trimmed to fit, not raised. - **Screencast keys, a plugin off by default (2026-10-29, `@battuta/api` 1.3.4).** The user asked for one "mainly for the desktop, disabled by default, like the Blender add-on", for video demos and screenshots, MIDI included. It shows the keys pressed (modifiers first, with the action each ran: `Ctrl Z · undo`) and the notes played (`♪ C4 E4 G4`) in the window's bottom-left corner, each fading after a few seconds (`packages/plugins/screencast-keys`). The user's choices: keys with their action, and physical keys and MIDI only (not the on-screen keyboard's buttons). The API gains, as approved: `ctx.keys` (each key press the editor's handler takes, as data, with the action it ran; never a key typed into a field), a `float` panel side (over the bottom-left corner, taking no pointer events), and the manifest's `enabledByDefault: false`. Checked in a browser: the keys, their actions, a chord, the fade. Fixed after the user's first try on the desktop (2026-10-30): macOS composes Option+key into another character, so Alt+B showed as "Alt SS" ("ß" upper-cased) and Alt+E as "Alt €". With Alt held, a key that did not come out as a plain letter or digit is now named by its physical key, as the editor's keymap already reads alt bindings; only a–z is upper-cased. - **The bundle ceiling raised to 392 kB (2026-10-29), the user's decision.** Measured 401,374 bytes. The host side of the stylus and of the screencast keys sits in the main bundle by design: `ctx.stylus`'s proxy (the service itself stays lazy), the enter-note and chord messages, the input length, the caret on what they wrote, `ctx.keys`, the float area and `enabledByDefault`. Both plugins stay lazy. Trimming came first; `budget.json` says the same. - **No text selection outside the score (2026-10-29).** On the iPad a long press or a double tap with a finger selected a button's label. Only `main` was unselectable; now the whole page is, except fields and the texts meant to be copied (an error, a notice, the about box's addresses). - **Fixed: native commands that answer nothing failed (2026-10-29).** `resolve()` with no data sends `null` from Swift and from Kotlin, and the plugin's Rust side refused it ("invalid type: null, expected struct Nothing"). The stylus capture reported that error each time it turned on, and so did Bluetooth MIDI pairing, shipped in 1.2.0, in a notice once its sheet had opened, on the iPad and on Android. The Rust side now takes `null` or an empty object. - **Debug builds keep line numbers only (2026-10-30), the user's decision.** `src-tauri/target` had reached 46 GiB: debug and release builds for the desktop and six tablet targets (four Android ABIs, the iPad, the simulator), and the leftovers of every earlier build, which cargo never removes. `cargo clean` emptied it. `[profile.dev] debug = "line-tables-only"` now applies to every crate. Backtraces and breakpoints keep file:line, but variables can't be inspected. A fresh desktop debug build is 1.3 GB, against 1.9 GB with full debug info. The other three Android ABIs come from Android Studio's *universal* flavour, which builds all four in debug too. It stays the default, for the store bundle. - **The guide's home page links the stores (2026-11-01).** battuta is live on the App Store and Google Play. The home page now opens with three buttons: the App Store and Google Play badges, and a GitHub Releases button for the desktop builds (`docs/src/components/Downloads.astro`, after midi-sink's). The badges are the stores' own files, unaltered: Apple's from its badge service, Google's PNG from play.google.com, and GitHub's white Invertocat from brand.github.com. The App Store badge comes first and the Google Play badge is the same height, as their guidelines ask. Apple's trademark credit sits at the foot of the page. The install page, which still said "battuta is a desktop application", shows the same buttons. A new section, "On a tablet or a phone", gives each store's link and minimum system: iOS and iPadOS 15, Android 7.0. It notes the App Store name (*battuta: Score Editor*) and that the app is free, with no purchases or ads. It covers what a touch screen adds (the on-screen keyboard, battuta's own folder, Bluetooth MIDI pairing), and warns that uninstalling deletes battuta's own folder. The desktop part follows under "On the desktop". ## 1.2.0 — 2026-10-29 (Phase 10 — iPhone, iPad and Android) battuta on tablets and phones from the same shell — the iPad and Android tablets first, then the iPhone and Android phones — with its files in a folder of its own or any folder picked, a share sheet, MIDI by USB and Bluetooth (and the iPad's virtual source), an on-screen keyboard made for touch, the about box with every notice, and the stores' listings, questionnaires and screenshots; the plan, milestone by milestone, is in [PLANNING.md](PLANNING.md) (Phase 10). Before it, since 1.0.0: the PDF reference — the start of the facsimile — the folder view writing files, sounding accidentals in the file (`@accid.ges`), MIDI spelled by the key, ties between chords, and tenuto. Every package — application, shell, core, docs, `@battuta/api` and the nine plugins — has carried 1.2.0 since 2026-10-11 (the user: "don't hesitate to make a new version"), each plugin's `engines` range staying at the api it needs; 1.1.0 was never tagged, and what it added ships here. - **The App Store name: battuta: Score Editor (2026-10-29).** "battuta" alone was taken on the App Store, whose names are unique (the user: "the battuta name was stolen"). The listing is **battuta: Score Editor** — the user's choice — its subtitle *Music notation in MEI*, and the keywords drop the words the name and subtitle now carry; the name under the icon stays battuta, and Google Play, already in review, keeps *battuta* (`apps/editor/store/`). - **The iOS icons without an alpha channel (2026-10-29).** The upload to App Store Connect stopped on "Invalid large app icon … can't be transparent or contain an alpha channel": `tauri icon` writes RGBA PNGs, and the logo's are opaque (alpha 254–255) but still carry the channel. All 18 icons in `AppIcon.appiconset` are flattened onto the icon's white (`#ffffff`) as RGB PNGs (ImageMagick), the picture unchanged; the README's icon recipe gains the step, so a regeneration does not bring the channel back. - **Android's 16 KB pages; the site's apt repository on Ubuntu 26.04 (2026-10-29).** Building the release in Android Studio, the user met "Some libraries have LOAD segments not aligned at 16 KB boundaries": Google Play requires 64-bit native libraries aligned for 16 KB pages of apps targeting Android 15 and later, and NDK 27 links Rust's `libbattuta_lib.so` for 4 KB (`llvm-readelf -l`: every LOAD at 0x1000). `src-tauri/build.rs` now asks the linker for `-z max-page-size=16384` on 64-bit Android, as Vibetuned's midi-stroke does — in `build.rs`, not a `.cargo/config.toml`, because the Tauri CLI sets its own `RUSTFLAGS`, which would override it; desktop, iOS and 32-bit Android link as before. Rebuilt: arm64-v8a and x86_64 at 0x4000; the device suite 15/15 on a Pixel 9 Pro (Android 17), the first phone it ran on. Its render check now counts the tiles inside its wait: a separate count afterwards once caught them mid-redraw ("0 svg in 4 tiles", every later check passing on those same tiles). And the pages workflow's apt repository step broke when `ubuntu-latest` moved from 24.04 to 26.04, whose image no longer ships `apt-ftparchive`: the step installs `apt-utils` itself now. - **The PDF reference's drawing: zoom below 100%, systems resized by their corners (2026-10-29).** The user, using the two-finger pan: "we don't have negative zoom in this plugin this is needed specially in landscape" and "we cannot resize the systems". **Zoom:** − now goes on past the panel's width to 75, 50 and 25% — most of a page at once in the wide, short panel of a tablet held sideways — the page centred in the box; the editor still opens at 100%. **Resize:** with the systems tool, each system shows its four corners; dragging one (mouse, pen or one finger) moves that corner's two edges, the box shown as it goes; `drawing.ts`'s new `resizeSystem` keeps the barlines and splits where they are on the page and drops those the new box leaves out or brings too near its edge, clamps to the page, and keeps the systems top to bottom. Other tools show no corners, so a tap in a system is still a barline or a split. A gesture that ever had two fingers resizes nothing, as it draws nothing. **The × and the corners** are HTML over the page, placed in percent of it and sized in screen pixels — the × was an SVG circle in the page's units, about 2 px across at 25% — so a finger hits them at every zoom; the × sits just off its system's corner, clear of the corner's handle. Tests: the plugin's 46 (`resizeSystem`'s rules; the lifecycle resizing a drawn system and the scans following; the zoom steps below 1); the PDF reference e2e 53, its new §10c (− to a quarter, centred, the × still 24 px; a corner dragged by mouse and by finger; no corners with the barline tool; two fingers with one on a corner pan and never resize). - **The PDF reference's drawing on a touch screen: two fingers move the page (2026-10-29).** The user, on a tablet: drawing systems or the rest, "we can not scroll to move around the image as we always draw the system … maybe a two finger scroll is better". The editor's page takes every touch (`touch-action: none` — a finger must be able to drag a box), so nothing could move it. Now one finger draws and two move the page: the fingers' midpoint drags the editor's scroll, set from where the pan began (stepping it by each move's delta drifted — the browser rounds every assignment: 120 px moved 128); a gesture that ever had two fingers draws nothing — the box its first finger began is dropped, and the barline, split or × under a lifting finger is left alone. A mouse, its wheel, a trackpad and a pen are as they were; the drawing bar says "two fingers move the page". Plugin code only, element refs and pointer events — no window, no new API. Tests: the plugin's 45 and its rules; the PDF reference e2e 46, its new §10b driving real multi-touch through the DevTools protocol (two fingers move the zoomed page by exactly their drag with the systems and the barlines tool and draw nothing, one finger still draws, a tap on × removes). Installed on both tablets for the user to try with real fingers; the Galaxy Tab's device suite 15/15 — its first run since the Gradle 8.14.5 / AGP 8.13.2 upgrade of 2026-10-22. - **Tenuto (2026-10-22).** The user: "a small thing we forgot, the tenuto keyboard shortcut". battuta read tenuto (`@artic="ten"`) and played it full length since the playback work, but nothing wrote one. Now `=` toggles it on the target — a line, and the same key on QWERTY and AZERTY (`-` is AZERTY's unshifted digit-6 key, the duration row in input mode, and numpad − deletes a measure) — in or out of input mode, like marcato and staccatissimo, beside whatever articulations the note already has. The on-screen keyboard shows it as *ten –* in its marks group (generated from the keymap; its caption added). The keymap snapshot gained the row in both layouts and nothing else; the marks guide, its key table and its figure have it. Tests: editor 156, the keyboard's 48, phase 5's e2e 224 (= adds a tenuto beside marcato and staccatissimo, Verovio draws SMuFL's tenuto, = again takes it off), the keyboard's e2e 34. - **Phase 10, M4 — midi-stroke's Xcode and Android Studio fixes, applied (2026-10-22).** The user: "in my last commit in midi-stroke I fix some issues with android studio and xcode can you check if we have the same issues here". All of them were here (midi-stroke 5b43383, read, not touched). **Xcode** (`gen/apple/project.yml`, the project regenerated with `Externals/` emptied for the run, the Tauri-merged `Info.plist` kept): the *Build Rust Code* step puts `/opt/homebrew/bin` first on its PATH — Xcode opened from the Dock has macOS's default one, and `npm` is not on it; `Externals/` is `buildPhase: none` — linked, never copied into the app (Tauri's template made the Rust library a resource whenever XcodeGen ran after a build: yesterday's manifest was added by working around it by hand); the scheme is declared for its archive name, *battuta* in the Organizer, keeping the target's name the Tauri CLI builds by. Release builds need rustup's `llvm-tools` — swift-rs makes the plugin's Swift entry point visible again with it, or an Archive fails on *Undefined symbols: _init_plugin_battuta_mobile* — already installed on this Mac by the midi-stroke fix, now in the README's requirements. **Android** (`gen/android`): the Android Gradle Plugin 8.11.0 → 8.13.2 (and in `buildSrc`), Gradle 8.14.3 → 8.14.5 by the wrapper's own task, the Gradle daemon pinned to JDK 21 (`updateDaemonJvm`, Adoptium, fetched through the foojay resolver in `settings.gradle`) — Android Studio's own Java 25 is too new for Gradle 8.14; the *universal* flavour the default, so Android Studio opens on all four ABIs, not 32-bit *arm*. The wrapper files and the daemon's JVM file came out byte-identical to midi-stroke's. One more, found in that commit: Android Studio's signed bundle lands in `app/universal/release/`, which git did not ignore there (a 43 MB `.aab` went into midi-stroke's commit); here `app/.gitignore` covers the flavour folders, `*.aab` and `*.apk`. **The store drafts** took that commit's corrections too: *What's New* is not asked for a first version, and Play's release notes go between language tags — both in `listing.md`'s new *Release notes*. Verified: the Gradle project configures from Android Studio's Java 25; Android debug and release APKs; an iOS release build links and runs on the iPad (no `libapp.a` inside, 13 MB), and the debug build put back after renders there. The Galaxy Tab was not connected, so the Android device suite did not run; Xcode started from the Dock is the user's to try. - **Phase 10, M4 — one octave on a phone (2026-10-21).** The user, after the screenshots: "the virtual keyboard will only show 1 octave in phones as the keys are to thin". The piano's octaves are blocks of their own now, and the keyboard's CSS hides the upper one on a touch screen whose shorter side is under 600 px (the host's phone width) — upright and sideways alike, never on a tablet: a white key goes from 16 to 33 px on an iPhone upright and from 20 to 41 px sideways; tablets and the desktop keep 14 keys. A plugin reads no window, so the switch is a media query, as the portrait layout is; its first cut lost to the block's inline `display` (the layout moved into the stylesheet). The rail's top went from 6 to 7, so a phone still reaches C7–B7. Tests: the keyboard's 48 and its e2e 34, the plugin rules 18; the store screenshots made again. - **Phase 10, M4 — the store screenshots; the PDF reference's floor (2026-10-21).** The user: "yes please write the script", publishing from Xcode and Android Studio themselves once main is pushed and tagged; for the PDF reference before the system it needs, a message rather than a fix; the notes' touch hit-testing later, as a plugin; the phones' edit view to be decided from the screenshots; Android's missing 🌣 glyph stays. **`npm run store:screenshots`** (`apps/editor/scripts/ store-screenshots.mjs`, after the docs' shots): the editor's dev server driven by Playwright, each set seen as its device sees the app — the shell's marker, a touch screen (the on-screen keyboard up by itself), its width — at the stores' sizes: iPhone 6.9″ upright 1320 × 2868, iPad 13″ sideways 2752 × 2064, an Android phone upright 1080 × 1920, an Android tablet sideways 2560 × 1440; five scenes each (writing at the caret in input mode, page view playing, a block selected, the Chopin PDF's scans over the empty measures to transcribe, the folder view on battuta's folder — its list staged through the shell's own commands, as in the docs), then Google Play's feature graphic (1024 × 500, the logo, the line the site leads with and a page-view system) and icon (512 × 512); no image has an alpha channel. Into `apps/editor/store/screenshots/`, git-ignored. **The PDF reference's floor was not 17.4:** read through, pdf.js 6.4 calls with no fallback `Promise.try` (every worker message), `URL.parse`, `Uint8Array.fromBase64` and `Math.sumPrecise` as well as `Promise.withResolvers` — Safari has them all from 26.2 (MDN, caniuse). So `pdfMissing()` checks the five before pdf.js loads; where one is missing the panel says, once, "Reading a PDF needs iOS / iPadOS 26.2 or later on an iPhone or iPad (a current browser elsewhere); the PDF's pages as images work on this one", and a PDF loaded anyway stops with that sentence instead of failing half-way. Checked: the e2e's Chromium (151) and the Galaxy Tab's WebView (155) have all five; a page with `Promise.try` deleted shows the message and refuses the PDF. Tests: editor 156, plugins 320 (the check's own, and the refusal in the lifecycle suite), the PDF reference e2e 41. - **Phase 10, M4 begins — the iPhone, the store listings and the stores' questions (2026-10-20).** "yes let's also build Iphone and don't forget the store listing (metadata description) and the store questions" — which settles M4's open question: **universal**. **The iPhone:** the Xcode project already held it (XcodeGen's default device family, `1,2` in the built app); Tauri builds for the simulator only with the runtime of Xcode's own SDK, so iOS 27.1's was installed, and the app ran on an iPhone 18 Pro — in portrait, and in landscape through a landscape-only copy of the app (Xcode 27 has no Simulator window to rotate). What a phone needed: **the side insets** — held sideways, a phone has its camera housing on one side; the page, header, context bar, bottom and side areas and the zoom column keep clear of `safe-area-inset-left` / `-right` (`SAFE_LEFT`, `SAFE_RIGHT`, 0 everywhere else); **the side panel over the score** under 600 px (`useNarrowScreen`, host/slots) — pushed, a portrait phone kept about 100 px of music beside the folder view and the row overflowed the screen; tablets, and a phone held sideways, keep the push; **the page view's narrow page**, M2's third item to the user's spec — under 768 px Verovio lays out a page the view's width at the desktop's staff size (`pageWidth` from the measured width, side margins 50, `adjustPageHeight`): two measures a system on an iPhone instead of an A4 page shrunk to a third; the SVG export keeps A4. **The stores**, after midi-stroke's pair: `apps/editor/store/listing.md` (names, the description with Verovio's credit, the URLs, the privacy answers, the screenshot sizes) and `questions.md` (every form of App Store Connect and the Play Console answered from what the app does — no account, no data, no network; Bluetooth only for a MIDI instrument — with the keywords and tags). The privacy page covers the phone and tablet apps, and says what the files guide now says too: deleting the app deletes battuta's own folder. `ITSAppUsesNonExemptEncryption = false` in `Info.ios.plist`; Apple's privacy manifest (`PrivacyInfo.xcprivacy`): no tracking, nothing collected, and reasons for the two required-reason APIs the binary imports (`nm -u`: the user defaults, CA92.1; the stat family, C617.1 and 3B52.1) — added to the Xcode project by XcodeGen run with `Externals/` emptied, or it lists the Rust library as a resource. **The licence notice:** battuta menu → *about battuta — credits and licences*: Verovio's credit with the LGPL v3 and the GPL v3 it builds on (the npm package ships no licence file; both texts from gnu.org, `apps/editor/licences/`), the piano samples (the Salamander Grand Piano V3, Alexander Holm, CC BY 3.0 — credited nowhere until now), Noto Music, and all 368 components the app ships — 12 npm packages read from a real build's module graph, workers included, and 354 crates the shell links on its six targets (normal dependencies only) — each with its own licence texts. `npm run licences -w @battuta/editor` writes `src/licences.json`, loaded only when the box opens (771 kB, 106 kB gzipped); a test fails when a shipped dependency is missing from it. **Android release signing** from `gen/android/keystore.properties` (git-ignored), as in midi-stroke; a release build — R8-minified — signed with the debug key ran on the Galaxy Tab: it started with its data kept, saw both MIDI devices, and its share sheet reached the native plugin; the debug build went back after. Verified: editor 156, core 246, api 20, plugins 318; the 13 browser suites (580 checks); the desktop smoke 15/15; Android 15/15; the iPad build carries the key and the manifest and renders. Initial chunk 386.9 kB of 390.6. Seen and left: on a phone every tile row keeps the tiles' top margin (100 units, which aligns staves under fermatas and ottavas), so a one-staff score shows about two rows a screen; and Android has no glyph for the menu's 🌣. - **Phase 10, M3 verified (2026-10-20).** The user tested Bluetooth MIDI pairing on both tablets ("both working") — the ROLI Piano 49 shows in Android's MIDI service as a Bluetooth device battuta holds open — and stopped midi-stroke, which settled Android's output: with it gone, battuta is the MIDI service's only client, and a C5 battuta played from the tablet reached the Mac (note-on, note-off and the closing CC 123 all-notes-off, heard on `SAMSUNG_Android`). The cause was as suspected: Android lets one app at a time hold a device's sending port, and Web MIDI's refusal is silent. The troubleshooting page says so (and how to pair a Bluetooth instrument from battuta). - **Phase 10, M3 — battuta's MIDI source on the iPad; Bluetooth MIDI on both tablets (2026-10-20).** The user: yes to the iPad's virtual source, and for Bluetooth pairing "we already add a working version of that to the midi-stroke project". **Virtual source:** iPadOS creates a virtual MIDI endpoint only for an app with the audio background mode, so `Info.ios.plist` declares `UIBackgroundModes: audio` (it also keeps playback going when the iPad locks); a temporary probe then showed the shell's outputs as `["battuta (virtual source)"]`, as on the desktop. **Bluetooth MIDI**, after midi-stroke's working version (read, not touched): battuta needs only its PAIRING half — midi-stroke carries a whole native MIDI layer because it does not use Web MIDI on mobile, while here a paired instrument is just another MIDI device of the system, heard by the CoreMIDI bridge on the iPad and by Web MIDI on Android. In the battuta-mobile plugin: on iPadOS Apple's `CABTMIDICentralViewController` as a form sheet with a Done button (`CoreAudioKit` linked from `Package.swift`, `NSBluetoothAlwaysUsageDescription` in `Info.ios.plist`); on Android a BLE scan filtered on the MIDI service (`03B80E5A-…`), the answers listed live in a native dialog, the tapped one opened with `MidiManager.openBluetoothDevice` and held for the app's life — "nearby devices" asked first on Android 12+, the location below (the plugin's manifest declares both, `neverForLocation`). The shell's `midi_bluetooth` command on both tablets; **Bluetooth MIDI…** in the status bar's MIDI list, on tablets. Verified: on the Galaxy Tab the command raises Android's "nearby devices" prompt, and dismissing it rejects cleanly ("Bluetooth permission denied") with the permission left ungranted for the user; the iPad builds with the view and the usage text and starts clean. Pairing a real instrument is the user's to try. Desktop untouched (the additions are tablet-only); initial chunk 385.3 kB of 390.6. - **Phase 10, M3 begins — MIDI on the tablets (2026-10-20).** "you can start m3". **iPad:** its WebKit has no Web MIDI, so the shell's MIDI bridge — the desktop's `midir` input thread (hot-plug poll, note events) and its output commands — now builds for iOS too: `midir` is a dependency everywhere but Android, the MIDI code is `#[cfg(not(target_os = "android"))]`, the run-loop pump that keeps CoreMIDI's hot-plug alive runs on iOS as on macOS (`core-foundation` for both), the iOS shell registers `midi_open_outputs`/`midi_close_outputs`/`midi_send` (the handler list is split per tablet), and the page takes the shell's MIDI wherever the WebView has none (`shellPlatform().platform !== "android"`). On the iPad, a temporary probe showed the bridge answering (`midi_open_outputs` → `[]`, no error: CoreMIDI up, no device plugged in) — and no "battuta" virtual source: iPadOS creates one only for apps with the audio background mode, a store decision left open. **Android:** Web MIDI, as M0 found; **input proven end to end** with the Mac as the instrument — the tablet in USB MIDI mode shows the Mac as `SAMSUNG_Android`; a throwaway `midir` tool there played G4 into battuta on the tablet, which entered a G4 (undone after). **Output not yet**: the tablet opens its USB port ("Port du périphérique USB") and sends without error, but nothing reaches the Mac (whose listener was checked on a virtual loop) — `dumpsys midi` shows another app, `com.vibetuned.midi_stroke`, frozen in the background with connections to the same devices, and Android lets one client hold a device's input port; left to the user. Desktop: shell smoke 15 (the native MIDI bridge still reaches the status bar), phase 4 75 (the MIDI e2e). - **Phase 10, M2 — the context bar folds when it would not fit (2026-10-20).** User-reported: in portrait the status bar "gets too fat and hides part of the keyboard". Its controls did not fit one line at a tablet's upright width, so the flex items shrank and their text wrapped — the bar grew, while the bottom panel was still placed as if it were 24 px. Now: the bar never wraps (`white-space: nowrap`), and when its contents overflow one line it **folds its context controls** — the plugin items, the lanes, staves, voices, clef, key, meter — **behind ⋯**, a popover above the bar; the input box, the caret readout, zoom and MIDI stay. **Measured, not a breakpoint**: the bar folds when its `scrollWidth` exceeds its width and unfolds when the width it needed returns, so plugin items count. The controls are one element (`contextControls`), placed inline or in the popover. And the bar **publishes its height** (`--battuta-bar-h`, as the header and the bottom panel already did) — the bottom and side panels, the notices and the page's foot stand on the bar as it is, not on an assumed 24 px. F6 opens a folded bar's ⋯ and focuses its first control. Tests: `verify-onscreen-keyboard.mjs` 34 (+5: at 820 px the bar folds and stays one line, 28 px; the keyboard's bottom edge meets the bar's top (1152/1152); ⋯ opens the six controls above the bar and on screen; F6 on a folded bar; at 1500 px it unfolds, its selects inline); app 18, phase 3 21, phase 5 221, lyrics 25, PDF reference 41, folder view 40 unchanged; initial chunk 385.0 kB of 390.6. - **Phase 10, M2 begins — the on-screen keyboard on a tablet; the budget raised (2026-10-20).** The user: "ok for adding the bytes, and you can start the m2", with two things for the keyboard. **⌫:** the panel had no backspace though a hardware keyboard's erased backward all along (the App's `edit.backspace`: the previous note becomes a rest, the caret steps onto it); it is now a key of its own (`BACKSPACE` in `keys.ts`, an EXTRA_ID like `del` and `esc`), **pinned under the ×** in a column outside the scrolling groups, where the user asked for it. **Two lines in portrait:** octaves, piano, latches, × and ⌫ on the first, the scrolling groups on the second, the piano taking the line's width (660 px at an upright iPad Air's 820, 460 beside the groups in landscape). By CSS alone — a media query in the panel's own `