Skip to content
Open
1 change: 1 addition & 0 deletions .memory/inline-generative-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Round 17 (2026-11-19): security (rev43) and correctness (rev44) reviews of 91ab5
## Smarter artifacts Phase E2 (2026-11-19)

- Item 32, visuals on `aiden serve` (b9cb9bec0, `packages/cli/src/server-visuals.ts`): `render_artifact` draws the visual once as a still PNG (2x, 720 or 1024 px wide) with an installed Chrome or Chromium found only at fixed paths (no `PATH` lookup, no override, no snap), headless, sandbox on, throwaway profile, offline with every request refused, bounded time and size; looked for only when a visual is drawn. The PNG goes out as the desktop's ordinary visual snapshot, so there is no Remote protocol change. `render_ui` sends its fallback text with each chart's data under its summary line (`compileAum(..., { fallback: { chartTables: true, plainTables: true } })` in `packages/cli/src/extensions/artifacts.ts`): since Phase E fix round 2, each table row is one plain line of labelled values (`Customer: Acme · Revenue: $1.2M`, cells clipped to 40 characters and stripped of control and bidi characters), not Markdown pipes or space-padded columns, because the phone's visual row shows the text as-is in a proportional font; sparklines list their values (all up to 32, else the first, `…`, the latest 30 and the count, so `…` always hides two or more; 2026-11-19), chart/sparkline/heatmap labels go through `cleanCell` (one line, max 120), plain rows are cut at 400 characters, heatmaps their cells as `row · column: value` lines, and scatter charts every numeric field when no `x` is named. Each tool result starts with what the person sees ("Shown as an image" / "Shown as text" / "Not shown" with the reason). Running as root or without a browser: not shown, said so. The server does not offer `chat-visual-viewer-v1`. A paired Mac never drew a server's native visual (Remote projects no markup); since Phase E fix round 2 `mapRemoteMessage` (`renderer/lib/hosts/remote-chat-mapper.ts`) turns each projected `ui` visual that has `fallbackText` and no `snapshotAttachmentId` into a text-only `ChatUiVisualV1` (`Visual` root, one `Text` per line, at most 400 lines, no data or state) placed by its `toolCallId`, so a paired Mac shows the same text as a phone; the tool result says "phones and Macs paired to this server show … as the text below".
- Test (2026-11-24): the real-Chrome test in `packages/cli/tests/server-visuals.test.mjs` draws one untimed warm-up first. A CI trace showed the first Chrome launch on a fresh hosted Linux runner takes 8-14 s to answer `Target.createTarget` (cold disk; nothing on stderr for ~7.5 s), against the 15 s render limit, while warm launches answer in ~170 ms and draw in ~1 s. Its D-Bus errors are noise: disabling D-Bus and running the file outside the parallel pool were both tried and changed nothing. This had been failing `renderer-other` on many branches (#906 runs 45337184177, 45352616175, 45356021801).
- Idea 4, the visual's Actions menu: with extra actions, a visual caption's Copy (native) or Export (HTML) button becomes one `MoreHorizontal` "Actions for {title}" menu (`renderer/components/visual-actions-menu.tsx`, `VisualCaptionActions`) that lists the visual's own action first, so no new always-visible control. With no extras it is still the plain button. The expanded HTML view keeps a plain Export: a portalled Radix menu sits behind the top-layer popover and light-dismisses it.
- Native visuals get **Keep in Artifacts** (settled messages only; `KeepVisualChatContext` from `chat-pane.tsx`, set only for a local non-Bot, non-routine chat in a non-Assistant workspace; the remote chat view never provides it). IPC `workspaces:artifacts:keepVisual(chatId, messageId, visualId)`; main re-checks every case and reads the visual from the stored chat, never from the renderer.
- HTML visuals get **Send to canvas** only when `useDesignModeControls(chatId)` is non-null. IPC `designCanvas:placeArtifact(chatId, mediaId)` places it as an artifact frame (sized to the open canvas's viewSize) through the existing placement path (unsafe-HTML scan, size limits, frame cap); placed or already turns design mode on, an error result (`missing`, `unsafe`, `full`) toasts and leaves design mode alone. Messages live in `renderer/lib/visual-menu-actions.ts`.
Expand Down
32 changes: 32 additions & 0 deletions ios/AidenOnTheGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
objects = {

/* Begin PBXBuildFile section */
F6A100000000000000000001 /* AidenHostConnectionLifecycle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000101 /* AidenHostConnectionLifecycle.swift */; };
F6A100000000000000000002 /* AidenForeignRunObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000102 /* AidenForeignRunObserver.swift */; };
F6A100000000000000000003 /* AidenPendingSendCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000103 /* AidenPendingSendCoordinator.swift */; };
F6A100000000000000000004 /* AidenChatMutationSubMachines.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000104 /* AidenChatMutationSubMachines.swift */; };
F6A100000000000000000005 /* AidenForeignRunObserverTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000105 /* AidenForeignRunObserverTests.swift */; };
F6A100000000000000000006 /* AidenPendingSendCoordinatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000106 /* AidenPendingSendCoordinatorTests.swift */; };
F6A100000000000000000007 /* AidenChatMutationSubMachinesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000107 /* AidenChatMutationSubMachinesTests.swift */; };
F6A100000000000000000008 /* ComposerVoiceInputControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A100000000000000000108 /* ComposerVoiceInputControllerTests.swift */; };
F5A100000000000000000001 /* AidenRemoteFailureClassification.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5A100000000000000000101 /* AidenRemoteFailureClassification.swift */; };
F5A100000000000000000002 /* AidenDurablePendingMutation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5A100000000000000000102 /* AidenDurablePendingMutation.swift */; };
F5A100000000000000000003 /* AidenRemoteFailureClassificationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5A100000000000000000103 /* AidenRemoteFailureClassificationTests.swift */; };
Expand Down Expand Up @@ -313,6 +321,14 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
F6A100000000000000000101 /* AidenHostConnectionLifecycle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenHostConnectionLifecycle.swift; sourceTree = "<group>"; };
F6A100000000000000000102 /* AidenForeignRunObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenForeignRunObserver.swift; sourceTree = "<group>"; };
F6A100000000000000000103 /* AidenPendingSendCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenPendingSendCoordinator.swift; sourceTree = "<group>"; };
F6A100000000000000000104 /* AidenChatMutationSubMachines.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenChatMutationSubMachines.swift; sourceTree = "<group>"; };
F6A100000000000000000105 /* AidenForeignRunObserverTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenForeignRunObserverTests.swift; sourceTree = "<group>"; };
F6A100000000000000000106 /* AidenPendingSendCoordinatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenPendingSendCoordinatorTests.swift; sourceTree = "<group>"; };
F6A100000000000000000107 /* AidenChatMutationSubMachinesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenChatMutationSubMachinesTests.swift; sourceTree = "<group>"; };
F6A100000000000000000108 /* ComposerVoiceInputControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerVoiceInputControllerTests.swift; sourceTree = "<group>"; };
F5A100000000000000000101 /* AidenRemoteFailureClassification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenRemoteFailureClassification.swift; sourceTree = "<group>"; };
F5A100000000000000000102 /* AidenDurablePendingMutation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenDurablePendingMutation.swift; sourceTree = "<group>"; };
F5A100000000000000000103 /* AidenRemoteFailureClassificationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AidenRemoteFailureClassificationTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -714,6 +730,10 @@
F5A100000000000000000105 /* AidenBotResumeModelTests.swift */,
F5A100000000000000000104 /* AidenDurablePendingMutationTests.swift */,
F5A100000000000000000103 /* AidenRemoteFailureClassificationTests.swift */,
F6A100000000000000000105 /* AidenForeignRunObserverTests.swift */,
F6A100000000000000000106 /* AidenPendingSendCoordinatorTests.swift */,
F6A100000000000000000107 /* AidenChatMutationSubMachinesTests.swift */,
F6A100000000000000000108 /* ComposerVoiceInputControllerTests.swift */,
D0A100000000000000000017 /* AidenBotOpenWorkTests.swift */,
B0E700000000000000000011 /* AidenRemoteContractFixture.swift */,
B07C00000000000000000012 /* AidenBotGeneratedAvatarTests.swift */,
Expand Down Expand Up @@ -893,6 +913,7 @@
children = (
A0E200000000000000000017 /* AidenHostConnectScheduler.swift */,
A0E200000000000000000011 /* AidenHostConnection.swift */,
F6A100000000000000000101 /* AidenHostConnectionLifecycle.swift */,
A0E200000000000000000014 /* AidenHostRegistry.swift */,
);
path = Hosts;
Expand Down Expand Up @@ -1010,6 +1031,9 @@
A7C100000000000000000009 /* AidenChatViewModel+Recordings.swift */,
A7C10000000000000000000A /* AidenChatViewModel+ComposerPower.swift */,
A7C10000000000000000000B /* AidenChatViewModel+ForeignRuns.swift */,
F6A100000000000000000102 /* AidenForeignRunObserver.swift */,
F6A100000000000000000103 /* AidenPendingSendCoordinator.swift */,
F6A100000000000000000104 /* AidenChatMutationSubMachines.swift */,
A7C10000000000000000000D /* AidenChatCards.swift */,
B6B100000000000000000002 /* AidenTypedApprovalCard.swift */,
A7C10000000000000000000E /* AidenChronologicalTranscript.swift */,
Expand Down Expand Up @@ -1402,6 +1426,9 @@
A7C200000000000000000009 /* AidenChatViewModel+Recordings.swift in Sources */,
A7C20000000000000000000A /* AidenChatViewModel+ComposerPower.swift in Sources */,
A7C20000000000000000000B /* AidenChatViewModel+ForeignRuns.swift in Sources */,
F6A100000000000000000002 /* AidenForeignRunObserver.swift in Sources */,
F6A100000000000000000003 /* AidenPendingSendCoordinator.swift in Sources */,
F6A100000000000000000004 /* AidenChatMutationSubMachines.swift in Sources */,
A7C20000000000000000000D /* AidenChatCards.swift in Sources */,
B6B000000000000000000002 /* AidenTypedApprovalCard.swift in Sources */,
A7C20000000000000000000E /* AidenChronologicalTranscript.swift in Sources */,
Expand Down Expand Up @@ -1493,6 +1520,7 @@
A2E000000000000000000005 /* AidenWorkspacesTabView.swift in Sources */,
A4B240000000000000000002 /* AidenSearchTabView.swift in Sources */,
A0E200000000000000000001 /* AidenHostConnection.swift in Sources */,
F6A100000000000000000001 /* AidenHostConnectionLifecycle.swift in Sources */,
A0E200000000000000000004 /* AidenHostRegistry.swift in Sources */,
1A2B3C4D5E6F700000000001 /* AidenOnTheGoApp.swift in Sources */,
1A2B3C4D5E6F700000000002 /* ContentView.swift in Sources */,
Expand Down Expand Up @@ -1550,6 +1578,10 @@
F5A100000000000000000005 /* AidenBotResumeModelTests.swift in Sources */,
F5A100000000000000000004 /* AidenDurablePendingMutationTests.swift in Sources */,
F5A100000000000000000003 /* AidenRemoteFailureClassificationTests.swift in Sources */,
F6A100000000000000000005 /* AidenForeignRunObserverTests.swift in Sources */,
F6A100000000000000000006 /* AidenPendingSendCoordinatorTests.swift in Sources */,
F6A100000000000000000007 /* AidenChatMutationSubMachinesTests.swift in Sources */,
F6A100000000000000000008 /* ComposerVoiceInputControllerTests.swift in Sources */,
D0A100000000000000000007 /* AidenBotOpenWorkTests.swift in Sources */,
B0E700000000000000000001 /* AidenRemoteContractFixture.swift in Sources */,
A0DB00000000000000000002 /* AidenNativeIntegrationTests.swift in Sources */,
Expand Down
Loading
Loading