Repository navigation
Notes:
Margin can now generate and place images inline, the selection bubble grew into a full editor surface, and workspaces became something you switch between instead of something you link once.
AI images
- Images are markdown-native: shift-drag the corner to resize (aspect ratio locked), align left/center/right, caption them, and they flow with the text. Existing image assets pick this up with no migration.
- Generation runs through a provider abstraction — Gemini via the Interactions API, and ComfyUI workflows (SDXL Turbo, text and image-to-image) with the workflow JSON editable in Settings.
- Generate from the slash menu, the native file picker, the bubble menu, or the dialog. Pick a style, submit inline, and the image lands where your selection was.
- Built-in styles are customizable: override any of them and the override wins. Per-provider base URL, so a proxy or a local endpoint works like a hosted one.
- History lists every generation with per-entry deletion, and switches provider and style correctly when the underlying models change.
- Gemini errors now describe the actual envelope shape instead of "no image returned", so a misconfigured key is diagnosable from the message.
Editor-first bubble: Cue, Rewrite, Imagine
- The selection bubble is the primary surface: node selector, formatting, link, then Cue / Rewrite / Imagine.
- Cue hands the selection to the assistant. Rewrite opens a prompt that skips the planner. Imagine turns the selection into an image prompt and generates inline — no dialog.
- The prompt morphs out of the button you clicked, expands to a taller view for multi-line instructions, and shows a scoped loading ring while streaming. Collapsed and expanded share padding so the caret never jumps.
- "Imagine again" reuses the same anchor and style without retyping the prompt.
- A prompt belongs to the selection it was opened for. Click away or select something else and it closes instead of showing stale input.
- Links open on a plain click, in a new tab. Editor selection is never lost to a stray click.
Workspaces: profiles, switching, and one validator
- Multiple workspace profiles in the sidebar, with a switcher. Linking a new workspace and recording its profile is a single settings write, so rapid creates can't clobber each other.
- Creation validation is centralized in one resolver used by every caller: absolute parent, single-segment name, no dotted path segments, sensitive-prefix blocklist (a subpath check, so ~/.ssh/somewhere is caught too), never the filesystem root or $HOME, and the target must be empty or new. The API endpoint translates the error to a 400 rather than reimplementing the rules.
- Folder create, rename, and delete from the sidebar, plus git undo in the edit dialog.
Settings, rebuilt
- Searchable settings shell with shared primitives and per-tab icons; General, Appearance, Context, Endpoints, Harness, and Imagine each redesigned.
- Endpoints is manage-only, with an in-panel flyout for picking the active endpoint. The .env auto-import is gone — Settings is the single source of truth.
- Endpoints carry a vision flag and a thinking badge, shown wherever endpoints are listed, so you can tell an image-capable model from one that isn't before a request fails.
- Harness model lists refreshed to current models.
Workspace activity
- The stats card reports what you actually check: files, chats, images, and when you were last active, with a 14-day chats+images chart behind it.
- Scaffold manifests like chapters/CHAPTERS.md no longer inflate the file count.
Interface
- File tree with folder icons, straight guide spines, and disclosure chevrons; folder and file labels stay aligned whether or not a folder has children.
- Layout dropdown checkmarks, transparent sidebar and assist headers, monochrome harness and bubble icons, brand glyphs for the link and image marks.
- Toasts have an explicit dismiss button, and the bubble keeps its padding when the prompt expands.
Docs
- Workspaces, images, and the bubble/slash menus are covered in the writing guide; endpoints documentation covers the new vision and thinking flags.