Release 1.2.2#41
Merged
Merged
Conversation
Add a per-surface Claude model choice, passed to `claude --model`: - Chat (CanvasAgent) defaults to Opus; picker in the Agent panel header. - Describe board (HeadlessPromptService.describeBoard) defaults to Sonnet. Both bind one UserDefaults key each (ModelPreferences), so the Agent-dock picker and the Settings > Runtime > Models pickers mirror live. The rawValue is the CLI alias (opus/sonnet/haiku) so the CLI resolves the latest in-tier. Refine and Compile stay on the CLI default.
…and Cursor The bonsai-board skill previously only existed as a local Claude Code skill file living outside the repo. Bundle the canvas API doc for three agents and offer to install it on first launch (only for agents detected on the Mac), with a reinstall/install-more control in Settings > Connectors > Agent Skills. Claude Code and Cursor get a dedicated file; Codex's AGENTS.md is shared with the user's own notes, so it's merged into a marked section instead of overwritten.
DumpStore debounces saves 0.4s after each edit, but AppDelegate never flushed the pending save before exit. A board mutation (including one from an external agent over the canvas API) made within that window was silently lost on quit. Wires up the already-existing-but-unused BoardViewModel.flushSave() via CanvasBridge on applicationWillTerminate, and also translates a bare SIGTERM (e.g. pkill, used by the dev-loop relaunch script) into the normal NSApp.terminate path, since a raw SIGTERM otherwise bypasses AppKit's termination delegate entirely and would never flush.
An image card renders its own rounded border. The accent selection ring was drawn `selectionGap` px outside at a larger corner radius, so selecting an image showed two concentric rounded borders with a visible gap. For image cards the ring now hugs the image's own edge (tight gap, matching radius, slightly heavier stroke) as a single clean accent outline. Text, shapes, and lines are unchanged.
Resolve conflict in AppDelegate.swift: keep both the agent-skills first-launch prompt (this PR) and the SIGTERM handler (release-1.2.2) — independent additions.
feat(agent-skills): install canvas-API skill for Claude Code, Codex, and Cursor
Brings in the 1.2.1 changelog + Shift+Enter select-all follow-up fix from main, and rolls the release-1.2.2 Unreleased notes into a [1.2.2] section (agent skills, model pickers, autosave-flush-on-quit, image selection ring).
…ring hugs the image Dropped images were created at a fixed 220x140 landscape frame while the image drew with scaledToFill and no frame clamp, so non-landscape images overflowed the card — the selection ring hugged the frame while the image spilled past it. Size the card to the image's pixel aspect ratio on drop, clamp the image to the frame so it fills-and-crops instead of overflowing, and align the image ring corner radius (10->8) to the image's own border.
…bundle; don't clobber an unreadable AGENTS.md
.process("Resources") flattens the bundle tree, so the subdirectory: "AgentSkills" lookup always returned nil and every install failed. Try the no-subdirectory form first (as EngineLogo does), with the subdirectory as fallback. Also: mergeMarkedSection mapped any read failure to "" via try?, so an existing-but-unreadable AGENTS.md would be overwritten with only BonsAI's section — now only a genuinely-absent file is treated as empty; a real read error propagates.
…the image On Copy/Compile an image card now serializes to its absolute file path instead of contributing nothing (or only OCR text) — so the reference is pasteable and a board that's just an image no longer copies as empty. Describe passes the image path through the board-state JSON and grants `claude -p` the read-only Read tool (--allowedTools Read) so the model opens and views the actual image.
…against reversed markers The Settings > Runtime > Models 'Describe board' picker sets a claude --model alias, so it silently no-op'd when preferredEngine() resolved to Codex (Claude disabled/unavailable). It now disables with an explanatory note whenever Claude isn't the engine that will run Describe. Also harden AgentSkillsInstaller.mergeMarkedSection: if a file's end marker precedes its begin marker, append a fresh section instead of trapping on a reversed replaceSubrange range.
ojowwalker77
commented
Jul 1, 2026
ojowwalker77
left a comment
Owner
Author
There was a problem hiding this comment.
CHANGES REQUESTED: 2 must-fix issues. I reviewed PR #41 against main: the agent skill installer, model/describe runtime path, autosave-on-termination, canvas/image polish, and release changelog. SCIP is unavailable for this Swift repo, so blast radius is heuristic plus direct call-site reads and cold sub-agent slices; the Splus audit is clean (42/42 changed exports interrogated, no floor findings unaccounted).
flowchart LR
Board["Board state + user/agent text"] --> Describe["HeadlessPromptService.describeBoard"]
Describe --> ClaudeRead["Claude --allowedTools Read"]
Installer["AgentSkillsInstaller"] --> CodexAgents["~/.codex/AGENTS.md"]
ChangeLog["CHANGELOG.md"] --> Release["1.2.2 release notes"]
The blockers are broad local file read permission in Describe and unsafe marker replacement in the shared Codex instructions file. I also left two smaller correctness concerns around installed-status detection and the malformed 1.2.1 changelog entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 1.2.2. Rolls up everything on
release-1.2.2on top of the currentmain(1.2.1), and moves the Unreleased notes into a dated[1.2.2]changelog section.Added
127.0.0.1:7337) now ships a portable skill doc, not just a Claude Code skill. On first launch, if Claude Code, Codex CLI, and/or Cursor are detected, BonsAI offers to install the matching doc into each one's own config location. Reinstall or add more anytime in Settings ▸ Connectors ▸ Agent Skills.claude --model.Fixed
delete/add_textop from an external agent over the canvas API). BonsAI now flushes the pending save on termination, and reroutes a bareSIGTERM(e.g.pkillfrom the dev-loop relaunch script) through the normal quit path so the flush still runs.Notes
mainwas merged intorelease-1.2.2first, so this PR also carries the 1.2.1 Shift+Enter select-all follow-up fix that release-1.2.2 was missing, and the CHANGELOG conflict is already resolved — the diff here is only the 1.2.2 delta.swift buildclean,swift testgreen (37 tests).