Skip to content

Release Aiden Agent 0.40.0 - #109

Merged
sambitcreate merged 49 commits into
mainfrom
feature/release-0.40.0
Sep 11, 2026
Merged

sambitcreate merged 49 commits into
mainfrom
feature/release-0.40.0

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Release 0.40.0

Assembles the reviewed feature branches on top of current main (which already includes #107/#108 and the models.dev catalog refresh).

Included merges

Conflict resolution

  • Kept every feature's test registration in package.json; removed the xterm dependencies that Ghostty replaces and retained test:ghostty-terminal plus asset verification in build/pretest/pretest:coverage.
  • Retained desktop host labels (Mac/Linux/iPad/iPhone) over stale phone-only copy.
  • Combined scheduled provider/model fields with the approved Access and notifications section.
  • Plans inventory and papercut log reconciled additively.

Validation

  • npm ci, type-check, lint, diagnostics, branding, model catalog, full npm test, native Foundation Models, npm run build, deterministic Electron E2E, and production-profile diagnostics all pass locally.
  • The two chat-message-queue sidebar-title E2E cases only fail on hosts where Apple Foundation Models report ready (local Apple Intelligence machine); they pass in CI-like conditions with the helper unavailable, matching hosted runner behavior.
  • release:check-consumers aligned.

cursoragent and others added 30 commits September 8, 2026 19:33
Keep the shared Switch pill from being restyled as a flex button, so the
thumb matches Plugins. Trailing switch rows stay compact and unclipped
in Field, Appearance, Memory, shortcuts, and scheduled-task lists.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Reserve axis/legend height instead of measuring live canvas-minus-square
geometry, cap the square to the visible scrollport, and give composer
model details a fixed card so picking models no longer resizes the pad.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Encode saved provider artwork at 1x so the display validator keeps it, recover oversize PNGs on save, theme custom marks like bundled logos, and put the icon on the Model Pad puck.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Lock the save path to persistable artwork recovery, recover a real 65px PNG, and tighten picker/pad source scans so they cannot match the wrong branch.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Narrow slug before passing it to ThemedProviderMark so type-check accepts mark as a string.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
…ation, remote 4xx evidence

- Seed settings.lastProviderId/lastModel from attended chat starts so the
  scheduler fallback resolves the selection the app actually uses
- Prefill a usable provider on new scheduled task drafts and add an explicit
  Provider/Model picker with an App-default option and no-provider guardrail
- schedule_task rejects providerless LLM creation when no app default exists
  and labels approval summaries honestly instead of 'Scheduler default'
- Add PiCompactionSessionStore.openChatIfEligible probe; generation runs
  journalless over an in-memory session for rollout-ineligible chats
  (VCC recall omitted, effects never marked durable, store quarantine
  skipped) while openChat keeps its fail-closed throws
- Todo snapshot and compaction resolve benignly for rollout-ineligible chats
- Remote request journal events carry content-free method/route template
…ontract test, honest pinned model display

- docs/security §7 admits bounded HTTP method + Aiden-owned route templates
  (content-free server constants) while keeping URLs forbidden
- Contract-test every declared route template against the live router
  classification (forward) and scan the matcher source for undeclared route
  shapes (reverse)
- Scheduled-task editor: a pinned model always stays selected and is kept
  selectable when hidden/removed; new-task prefill rejects hidden models;
  switching providers no longer leaks a stale model across providers
- Status header: generation is never blocked at any stage; advancing is a
  durability decision, not an availability one
- New 'Journalless generation (safety net)' section: engagement conditions
  (pre-activation, deferred v3, rollback env), in-memory semantics, device
  verification steps, and what restores durable journals
- Rollback section: kill switch now yields journalless generation for
  journal-less chats instead of blocked generation
- Implementation notes Phase 7 addendum cross-references the runbook
The one-second abort deadline flaked twice on this PR's CI (always green
locally and on rerun); five seconds keeps the test honest while tolerating
runner scheduling latency.
Keep node-pty sessions, snapshots, and TERM=xterm-256color, and parse VT
output with Ghostty's WASM engine plus an Aiden canvas surface.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Replace the incomplete custom VT canvas with T3's MIT runtime, write-pty
trampoline, core snapshots, and surface (IME, scrollback, selection). Load
WASM through fetch so packaged Electron file: builds work, and fail the
production build if the wasm/font assets are missing.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
T3's adapter uses replaceAll, Array.at, and toSorted, which fail tsc here.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Vite only copies new URL(..., import.meta.url) when the path is a
compile-time literal. The runtime string argument never emitted
ghostty-vt.wasm, so production verify and Electron E2E failed. Keep the
112-byte write-pty trampoline as a real file with ?no-inline.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Vite still needs compile-time new URL() to emit hashed wasm, but tsx
rewrites those literals and ?no-inline made npm test fail after the
production emit fix. Load vendor files from disk in Node, and keep the
Vite URLs in wasm-assets.ts.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
cursoragent and others added 18 commits September 10, 2026 23:05
tsx rewrites static new URL(..., import.meta.url) to a cache directory
that does not contain vendor/, so GhosttyRuntime.load() failed after the
wasm-assets split. Keep Vite literals in wasm-assets.ts only.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
…ectors

# Conflicts:
#	.papercuts/troubleshooting.md
…pi-rollout

# Conflicts:
#	.papercuts/troubleshooting.md
…control

# Conflicts:
#	.papercuts/troubleshooting.md
#	docs/plans/README.md
# Conflicts:
#	.papercuts/troubleshooting.md
#	docs/plans/README.md
#	main/services/pi-compaction-session-store.ts
…s-53cb

# Conflicts:
#	.papercuts/troubleshooting.md
#	package.json
# Conflicts:
#	.papercuts/troubleshooting.md
#	docs/plans/README.md
#	renderer/components/scheduled-task-editor.tsx
#	renderer/components/settings/remote-access-settings.tsx
# Conflicts:
#	.papercuts/troubleshooting.md

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

This release introduces one user-visible regression in the new Ghostty terminal: the canvas backing store is sized from the host's padding box while the canvas lays out in the content box, so the bitmap is browser-downscaled and pointer hit-testing (selection, links, mouse reporting, IME) is offset. Details inline. The release assembly, conflict resolutions, peer client, and empty-chat migration all traced clean.

Reviewed changes — the full 0.40.0 release-integration diff (186 files, 48 commits) against main at cac54b3b, including every merge-conflict resolution and the highest-risk subsystems.

  • Release assembly — eight reviewed feature branches (#81, #96, #101#106) merged onto current main, version bumped to 0.40.0, and the package.json, Pi session store, and settings-editor conflicts resolved additively (both sides' test registrations and fields survive).
  • Ghostty terminal — replaces xterm.js with libghostty-vt (WASM runtime/renderer/surface, key codes, link handling), adds the CSP wasm-unsafe-eval allowance and Vite wasm asset handling, and drops the xterm dependencies.
  • Desktop peer connections — outbound peer-* client with pinned-SPKI transport, sealed pairing envelope, closed operation table, OpenAPI-validated responses, and an encrypted host store, plus remote:peers* IPC and mac/linux device types.
  • Draft agent chats — renderer draft records, a single chats:createWithFirstMessage commit with a first-message receipt and turn-admission retention, and a one-time legacy empty-chat migration.
  • Scheduled provider resolution / Pi rolloutApp default provider/model selection for scheduled tasks, journalless generation for rollout-ineligible chats, and query-free routePath remote diagnostics.
  • Guided phone setup — acknowledged one-action setupPairing with rollback, reworked Remote Access settings, and paired iOS/Android copy.
  • UI fixes — Settings switch geometry, custom provider artwork persistence, opaque composer menus, and Model Pad chrome.

ℹ️ Ghostty pointer interactions have no automated coverage

The terminal's new E2E spec asserts only against the sr-only accessible log, and surface.test.ts covers two pure helpers, so pointer geometry (selection, link hover/activation, mouse reporting, IME placement) is untested. The canvas-sizing issue above would not be caught by CI; a small fit() assertion or a pointer-selection Playwright case would pin the contract.

Technical details
# Ghostty pointer interactions lack automated coverage

## Affected sites
- `renderer/lib/ghostty-terminal/surface.test.ts:5-15` — covers only `isTerminalHostReservedShortcut` and `isTerminalLinkActivatable`.
- `tests/e2e/terminal.spec.ts:24-54` — asserts `.ghostty-screen` visibility, focus, and the `role="log"` output; no pointer or selection path.
- `renderer/lib/ghostty-terminal/surface.ts:870-907` — the `fit()` sizing contract a unit assertion could pin.

## Required outcome
- A test that fails when the drawn cell geometry and the pointer→cell mapping diverge, for example `canvas.width === canvas.clientWidth * dpr` after `fit()`, or a Playwright drag that selects a known cell.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Flash𝕏

Comment thread renderer/lib/ghostty-terminal/surface.ts Outdated
Size the canvas backing store and terminal grid from the canvas's own CSS
box instead of the host's padding box, and anchor the IME textarea to the
canvas origin. This removes browser bitmap downscaling into the content box
and keeps selection, link activation, mouse reporting, and IME placement on
the cell under the pointer. Adds a source-contract regression.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — the incremental delta since the prior pullfrog review (5c5b3e25dc9c81bc): the Ghostty terminal geometry fix that resolves the previous review's inline finding.

  • Canvas-based geometryfit() and the initial grid in create() now derive the backing store and grid from canvas.clientWidth/clientHeight instead of the host's p-2 padding box, so the bitmap maps 1:1 onto the canvas CSS box and cellAt/linkAt/sendMouse share the drawing coordinate space.
  • IME anchoring — the hidden composition textarea now offsets by canvas.offsetLeft/offsetTop so the candidate window lands on the cursor under the corrected geometry.
  • Regression testrenderer/components/terminal-drawer.test.tsx pins canvas-based sizing and canvas-origin IME anchoring, and fails against the old mount-based patterns; npm run test:ghostty-terminal passes 15/15.

Pullfrog  | View workflow run | Using DeepSeek Flash𝕏

@sambitcreate
sambitcreate merged commit 50db18f into main Sep 11, 2026
6 checks passed
@sambitcreate
sambitcreate deleted the feature/release-0.40.0 branch September 11, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants