A sleep that ends before the renewal is due still cost the timer clock the whole sleep, so the
renewal fired that much late. On resume a task not yet due is re-armed for the wall-clock time left.
Node timers stop while the machine sleeps, so a renewal due during a sleep fired that much later
after wake, after the token's wall-clock expiry. With the host-sent keepalive the control survives
the sleep, so the relay closed the live control 4401 a few minutes after wake (cutting any phone
session started since). The renewal and its retries now use a wall-clock timer that runs a due
task on system resume.
Prints the notes the user left on a browser tab and has not sent, the same text the tab's Copy button gives (--json returns them). Reads the saved session, so it works for closed-and-restored tabs; SSH hosts reach it through the desktop browser bridge. A page drawn by a paired desktop reports that its notes stay there.
#40249 narrowed Settings to 784px, which left the default-surface section
below its two-column breakpoint (tiles always stacked) and squeezed shortcut
names to a few characters beside their badges.
* fix(mobile): serve the phone page from a Linux install updated in place
Package managers (pacman, apt, dnf) replace Orca's files while the old
process keeps running. The host cached the manifest for the life of the
process and read assets through Electron's launch-time asar header, so
every read of the replaced files failed with asset_changed until Orca
restarted. Read from app.asar.unpacked and re-read the manifest when
manifest.json changes on disk.
Fixes STA-14385
* fix(mobile): check the page manifest off the main thread, and retry a mismatch
Read and stat the manifest with fs/promises and keep the probed root, so
bundle RPCs add no sync file calls. Keep only passing hash verdicts: a
package install writes files one at a time, so a mismatch may clear.
* fix(mobile): key the page manifest cache on its bytes
Inode, size and mtime can all repeat when ext4 rewrites a same-length
manifest within one clock tick.
* fix(mobile): read a newer in-place install's page manifest
A release written in place may add schema-v1 manifest fields the running
host predates. Read it with a stripping schema so the host serves the
fields it supports instead of reporting no bundle until restart.
* refactor(mobile): derive the installed-manifest reader from the writer's shapes
* wip(folder-sc): card header cleanup and Remove from Parent in card menu
Work in progress handed to a Codex session; see ~/orca-qa/folder-sc-card/handoff-codex.md.
* test(source-control): cover collapsed folder card identity
* Keep folder card controls usable while status is unavailable
* Retain branch before card body mounts and allow conflict rows to grow
* Preserve source control label size and folder card parent actions
* fix(browser): keep unsent page notes across restarts and ask before closing a tab that has them
Unsent browser notes lived only in the renderer store and hydration reset them, so a reload, restart or tab close lost them. Each saved browser page now carries its unsent notes, hydration restores them, and every close path (tab strip, keyboard, CLI, phone) asks before discarding them. A page script's window.close() can't discard them.
* fix(browser): keep tabs with unsent notes open on bulk close, like pinned tabs
* feat(orchestration): a paired Orca as a Run's coordinator on the server it placed work on (inert)
The server half of remote-owned workers. A paired Orca's call names one of its
Runs; the server admits it as a peer caller kind, writes that Run at frame
receipt, and holds it to the one access check. Its workers' mail and state
queue home under a sequence no reset reuses. Nothing sends the envelope until
the coordinator side ships, so this changes nothing today.
* fix(orchestration): reserve the peer address, keep conversation kinds apart, queue a correction once with its result
* fix(orchestration): hold back a corrected Task's change whatever its latest attempt; rotate pulls in a stable order per database
* chore(orchestration): typed field read, cast rationales, a wake test on fake timers
* fix(orchestration): a peer's receipts per conversation, its sends only into its Run, a page that fits every conversation, pending adopted Tasks keep their gate
* fix(orchestration): a peer's follow-up places where its worker ran
* fix(orchestration): a peer's current/new-child start gets the --on placement refusal
* fix(browser): hold a page drawable until its capture settles
A stalled capture stays pending until the page draws and keeps macOS display
sleep off ("Capturing"); dropping the paint hold at our timeout left it there.
Fixes#24946
* fix(browser): keep the debugger attached while a CDP capture is pending
* refactor(browser): share one settle-scoped hold helper for paint and debugger leases
* fix(editor): keep Mermaid labels readable on pastel dark theme palettes
In dark mode the Mermaid config fills nodes, actors and boxes with the
theme's --chart-3/4/5 tokens while every label uses --foreground. Themes
with pastel chart tokens (e.g. Catppuccin Mocha) put light text on light
fills, so sequence actors, class boxes and similar shapes became
unreadable (contrast ~1.06:1). The flowchart contrast pass only covers
flowcharts.
Tint each palette fill toward the background just until the foreground
reaches WCAG 4.5:1. Palettes that already read (Orca's default dark
blues) are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(editor): tint only Mermaid fills under foreground labels
Darkening the palette seeds also darkened the git graph branch boxes and
venn colours, which Mermaid pairs with its own label colours, and the
active Gantt border. Keep the seeds and tint mainBkg, clusterBkg,
requirementBackground and the Gantt task fills instead.
* fix(editor): pin Mermaid fills only when the theme colour needs tinting
An always-set mainBkg overrode a diagram's own primaryColor in every dark
theme. Pin the tinted fills only when the chart colour fails, and cover
git tag pills too.
* refactor(editor): reuse readableOn for Mermaid fill contrast
Drop the hand-rolled hex mix loop and the extra luminance exports; move
hexToRgb next to rgbaToHex so terminal appearance and Mermaid share it.
* fix(editor): draw clickable Mermaid Gantt labels in the foreground colour
Mermaid's default dark-blue clickable label reads only on light bars; on
tinted or dark bars, and beside a bar on a dark page, it disappears.
* fix(editor): tint Mermaid railroad terminal and comment fills too
---------
Co-authored-by: Pro100v <2681328+Pro100v@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
`orca agent launch --focus` and `worktree create --agent --activate` left a
chat launch unselected: main marked the chat active only in its tab listing,
which the window follows solely on its own focus intent (#5435). Send the
existing focusEditorTab for that chat; when its tab is not listed yet, record
the focus intent so the listing selects it unless the user moved on.
Co-authored-by: Manuel Meurer <manuel@meurer.io>
The image wrapper was inline-block, so it sized itself from the image's
natural width. An SVG with a viewBox but no absolute width has none, so
the wrapper and the image collapsed to 0x0. Keep the wrapper inline so
the image sizes against the paragraph, as it does in the preview.
* fix(agent-status): accept OpenCode 2 hooks after OSC reports opencode
OpenCode 2's OSC app id is opencode, so the status plugin's opencode2 prompt was treated as a nested CLI and dropped. Branch rename never saw the first prompt. A different OpenCode process still does not own the pane.
* fix(agent-status): keep OpenCode 2 on rows its OSC 7501 calls opencode
OSC 7501 names every OpenCode `opencode`, so after an OpenCode 2 turn ended
its OSC idle relabeled the row and dropped the session it resumes from.
Read the OSC claim as the OpenCode 2 row's generation, and replace the
identity unit tests with one server test of the real report order.
---------
Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
* Cache orchestration source facts by dispatch and address
* Declare keyed projection services and use lifecycle transaction in regression
* Keep empty orchestration reads lightweight without hiding inserts
* Preserve pane selection and bound unattended projection invalidations
* Use persisted lifecycle inputs in projection regression scenarios
* Own exact completion eligibility at the SQLite source
* Keep public status source fixture deterministic
* Coalesce pane candidates and preserve source refresh ownership
* Align projection fixtures and annotations with static checks
* Remove obsolete identity implementation-count comparison
* Expand each addressed terminal family once per snapshot
* Maintain addressed dispatch winners in source order indexes
* Keep terminal identity rows separate from public orchestration status
* Match optional public status reader to constructor dependency
* Complete orchestration status and fixture database contracts
* Retire terminal notices and pending discard state with their lifetime
* Preserve the DOM window in terminal notice lifecycle fixtures
* test: exercise fresh terminal eligibility and stale edit output
* Release notice contributions at accepted terminal retirement
* Keep terminal notice delivery independent of store initialization
* Assert the public workspace removal failure result
* Keep buffered terminal retirement within delivery modules
* Initialize canonical terminal maps in workspace slice fixtures
* Expose terminal lifecycle fixture actions after commit
* fix(linear): reject connections that omit pagination evidence
A list or activity page without a boolean hasNextPage was reported as a finished read. Callers that stop when hasMore is false then treated a dropped page as the full set. Fail that page with linear_partial instead.
* fix(linear): require pagination evidence in every Linear list walker
The desktop issue list, orca linear list, project and custom view issue
lists, project, custom view and project team lists still read a missing
pageInfo as the last page. Route them through the same check, and drop
tests that pass without the fix.
---------
Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
* feat(workspaces): run setup and archive scripts for folder projects
Folder projects get the setup and archive scripts git projects have:
creating a workspace runs setup in a Setup tab, and removing one runs
archive first. The script sees the workspace's name and id, so
`orca worktree create` inside it attaches each new worktree to that
workspace, however the workspace was created.
- Folder creates (desktop IPC and runtime) prepare setup through the
shared setup prep; runtime creates start it with the worktree terminal
startup, so Setup-before-agent ordering matches.
- Runner files live in <folder>/.orca, one fresh file per launch, removed
with the workspace.
- Only the host whose catalog holds the folder reads its orca.yaml or runs
its scripts; a setup problem becomes a warning, never a failed create.
- Shared orca.yaml setup with no approval from an older client is skipped;
ask/inherit never refuses a folder create.
- No orca.yaml default tabs for folders, since every workspace shares the
directory.
- New capability worktree.folder-setup.v1 gates the Settings section on
runtime hosts; the composer, Settings and trust prompt reuse the
existing setup surfaces.
* i18n: add folder workspace hooks strings
* chore: drop the runner's sync-fs baseline and an array cast
* fix(workspaces): close review gaps in folder project setup
- Whole-project trust sends an explicit run for folder creates the
policy would run, since it carries no content hash.
- Folder setup skips file access for a skipped setup and never starts a
stopped WSL distro for a create nobody started; removal does the same.
- Runtime folder creates return the trust mismatch, so the window re-asks.
- The composer hides folder setup controls on hosts without
worktree.folder-setup.v1 and keeps their old explicit skip.
- Hook checks read a folder only on the host that owns it.
- Git archive hooks get the removed workspace's id; WSL hooks blank
inherited pane identity too.
- Runner files are written through the drive path WSL needs for its
drive mounts, and kept out of git status with .orca/.gitignore.
- The CLI's older-host warning covers --agent creates and --json output.
* fix(workspaces): wait for the folder setup capability and read orca.yaml once
Create now waits for a runtime host's folder-setup answer instead of
sending Skip while the probe is pending, and runtime setup reuses the
parsed orca.yaml when merging effective hooks.
* fix(workspaces): keep a failed folder setup probe unknown and retry it on create
* fix(workspaces): share folder setup capability answers with the composer
* fix(workspaces): re-ask the host for folder setup support on every create
* fix(settings): read orca.yaml for folder projects and use workspace copy in hook rows
QA found Settings reporting no orca.yaml for folder projects while the
composer ran that script, and the inner hook rows still said worktree.
* fix(folder-workspaces): open one Setup tab for an instant folder create
* fix(workspaces): run setup when a created workspace has only editor tabs
* perf(folder-workspaces): per-workspace runner dir, bounded setup answers, one archive config read
* fix(folder-workspaces): retain setup capability for active consumers
* fix(folder-workspaces): match hook search to workspace descriptions
* fix(i18n): drop obsolete hook search descriptions
* test(folder-workspaces): follow relocated setup trust modules
* refactor: finish terminal and Mobile defining-owner imports
* fix: retain completion coordinator type binding
* refactor: consolidate direct terminal tree imports
* refactor(renderer): import typography from defining owners
* refactor(renderer): group file and document feature owners
* refactor(renderer): remove orphaned editor recovery registration suite
* refactor(renderer): colocate file explorer tree result contract
* feat(plugins): add editor.readTypography and editor.typography.changed
Plugins that render code next to Orca's editor had to open the private
profile database and reimplement Orca's font rules to match it. Host API 1.6
adds editor.readTypography (no capability; worker, panel and editor frames):
the font family and CSS stack, size with editor zoom, weight, line height in
px, ligatures, word wrap and minimap that the file editor resolves now.
editor.typography.changed carries the same values after a settings write or
an editor zoom changes them; it is the first event that needs no capability.
The pure resolution (editor typography, editor zoom, monospace font stack)
moves to src/shared so main and the renderer use one implementation.
* fix(plugins): keep editor typography resolution from throwing in main
A hand-edited profile with a non-string font family made the shared resolver
throw, which the main-process watcher would surface at startup and on every
settings write. Font values are now type-checked, the watcher catches and
logs, and it reads live settings so a write without listeners cannot leave the
event payload stale. Over-long font families are cut to the schema bound
instead of failing every read. Regenerates the testing runtime.
* fix(terminal): keep remote-viewer clipboard env on command-less creates (#39852)
A paired viewer's plain terminal reaches the host renderer's tab-create
bridge with spawn env (ORCA_REMOTE_VIEWER_CLIPBOARD, PI_CLIPBOARD_OSC52)
but no startup command. The bridge queued pendingStartup only when a
command existed, dropping the env, so the spawned shell never saw the
remote-viewer clipboard marker and copied text stayed on the host
clipboard (#39852).
- Queue the startup whenever the request carries launch material
(env/envToDelete/launchConfig/resume), not only a command.
- PtyPaneStartup.command becomes optional for env-only startups; spawn
options already tolerate a missing command.
- Keep the plain-shell pre-bind input hold for startups that plan no
post-bind work, so an env-only startup types as a plain shell does.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* test(e2e): layout oracle marks only panes the user can see
A hidden tab with a queued startup is laid out at opacity 0 so it spawns at
real geometry. The marker check counted it as visible because it has a size,
then waited for output that the hidden-delivery gate correctly withholds.
Paired-client creates now queue spawn env, so their background tabs hit this.
---------
Co-authored-by: Chen <zwq19980411@gmail.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
* test(ssh): isolate connection manager session holds
* test(ssh): reset both session-hold stores in the shared SSH connection fixture
The fixture reset now clears credential declines as well as user disconnects,
so every suite built on it starts without a stale hold from an earlier file in
the same worker. The per-suite resets it supersedes are removed.
Fixes#40291
---------
Co-authored-by: Vyacheslav Scherbinin <gentslava@mail.ru>
* fix(notifications): ring the synthetic waiting BEL once per prompt, not per hook restatement
Codex restates waiting on every tool call while a request_user_input_async
question stays open; each restatement wrote a permission title plus BEL, so
Orca posted a terminal-bell OS notification every few seconds for the whole
turn. Keep reasserting the title but ring only once per distinct prompt per
needs-input stretch.
* fix(notifications): keep ringing for repeat approvals during an open async question
Codex's PermissionRequest hook carries no request id, so a per-stretch prompt
set would silence a second identical approval while an async question stays
open. Ring whenever the prompt changes; only async questions, which Codex keeps
open across the turn, stay rung for the whole stretch.
An agent row can turn bold while its workspace never becomes unread, and every
path that drops the finish on the way to the unread flag was silent, so the
next occurrence could not be traced. Each drop site now leaves one
`agent_finish_dropped` breadcrumb (mirrored to main.trace.ndjson) with its
cause, workspace and pane:
- paired-host mirror: a restored, unconfirmed done, or a done skipped as a
host replay;
- hook lane: a pane it does not consider live, completion notifications off
for the pane, a new turn end swallowed because an earlier hook end used up
the turn with no working state in between, a pane pruned during the quiet
window, or a held turn-end revision that expired;
- dispatcher: a fresh active hook status, a superseded snapshot, an
attention-policy rejection, or a viewed pane.
No behaviour changes.
Refs #40340
* feat(dictation): offer the speech model update in the dictation pill
Moves the speech model update out of the launch notification stack and into
the dictation pill. Pressing the dictation shortcut now checks the selected
model before any mic capture; when the speech engine needs a download, the
pill offers it (notice, downloading, done, failed) instead of recording.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dictation): address review on the setup pill check
- Drop a stale press before opening the setup pill, not only before recording.
- Swallow cancelDownload rejections.
- Don't cache a failed catalog load, and don't mark a model up to date from an empty catalog.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dictation): cancel a pill download closed before its first progress
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dictation): make the pre-record model check a cancellable pending start
- A toggle, Escape, stop or controller teardown during the model check now
drops the pending start, and the check rechecks current voice settings
before opening the mic.
- A press mid-download keeps the setup pill with its progress; only a model
seen ready is cached as ready.
- A cancelled or failed update no longer deletes the old model files, and the
renderer keeps offering the setup target it showed until the model is ready.
- The check is prefetched off the startup path and in-flight checks are shared,
so the first press rarely waits on main.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Investigating #39166, the reporter could not line up host logs with daemon or
kernel logs, nor tell which client was attached or whether a pause came from
the current start.
- `orca serve` and orcad stamp every stderr diagnostic with an ISO time.
- The runtime logs each authenticated client connect and disconnect (device
id, scope, transport, connection id; never the client's credential).
- The automatic-work pause log now says whether this start followed a clean
exit, an unclean one or none, and when the pause began, so a carried-over
pause is not mistaken for a fresh crash.
Refs #40328
The floating workspace's terminals and Markdown notes live on the user's own
computer, and a browser tab connected to `orca serve` has none, so in the web
client its terminal and Markdown actions did nothing.
The web client's stored settings now always read the floating workspace as
off, even if an older build saved it as on, so its button and panel do not
appear. The settings toggle is disabled with an explanation. Anything that
would reveal the panel (for example "open beside", an activity row or "Edit
file in Orca" for keybindings) shows that explanation instead of doing
nothing.
Fixes#40268
#38730 added the reportFocusLost request inside v55, so v55 daemons from
1.4.251 reject it and an app that adopts such a daemon never replaces it.
Bump to v56 so updated apps start a daemon that is known to accept the
request, never ask pre-v55 daemons, and ask v55 daemons once per daemon
incarnation instead of once per adapter, so a replacement daemon at the
same endpoint is not treated as unsupported.
Co-authored-by: Claude <noreply@anthropic.com>
A remote chat view could sit on a stream that looked healthy but carried no
frames, so replies never rendered and sends stayed on "Sending…" until the tab
was reopened. Two paths left a stream open after delivery had stopped:
- The host dropped a chat subscriber whose frame failed to send, but never
ended its stream or logged why. It now logs the failure and ends the stream
once, so the client resubscribes from its cursor.
- The desktop discards frames from a retired transport generation, but a
rebuilt control connection advanced the generation without closing the
streams opened under the old one. Retiring a generation now closes those
streams, tells their windows (which resubscribe) and logs how many.
The client's reconnect wait now resets only after a stream has stayed up for
10 s, so a host that ends a stream right after its first frames cannot drive a
resubscribe every 750 ms.
Refs #39926
A mirrored pane whose leaf lost its PTY binding (for example after its agent
exited) is resolved by pane key. Once the host had closed the tab, recovery
never treated the host's answer as proof the pane was gone, so it re-injected a
pending row into every frame and the closed tab stayed in the tab strip and the
saved session forever.
- Host: an exited PTY record outlives its tab, so terminal.resolvePane kept
answering "disconnected" for a closed tab's pane. It now answers
terminal_not_found when no leaf holds the pane, its PTY is not connected
and the tab is gone from the host's workspace session.
- Client: unbound panes now follow the same rules as bound ones. A close
record for the pane retires it at once; otherwise two authoritative absences
(the frame omits the pane and the host cannot resolve it, or resolves it only
as a disconnected leftover) retire it. Any sign the host still owns the pane
restarts the count.
Refs #9194
Every orchestration method is now defined with defineOrchestrationMethod and
declares its access: kind (reads, writes or localOnly), the caller field, the
target fields with their subject kinds, whether it reads a collection, and an
optional named rule. The registry refuses an orchestration method whose
handler was not built by those factories, so no method runs without the check.
The existing per-method authorization moves out of handler preambles into
named rules, in the same order: reply (helper answerer or the Run's current
consumer), taskCreate, taskList, taskUpdate, dispatch, gateCreate, gateResolve
and gateList. The check runs where the handler ran, inside the mutation
executor's invoke, keeping each handler's sync or async error contract. An
observed replay of an accepted reply or send runs its declared replay hook
before any rule, so an accepted call is never authorized again. The
session-caller binding reads the declared caller field instead of its own
table, and send --on is carried by a wrapper inside the check.
No behaviour change: a table over every method, recorded on main, pins each
call's outcome for four callers.
The strict target check added in #38514 rejected a preview answer whose type
differed from the request, so every /issues/N link to a pull request (all bare
#N references in chat) showed "Preview unavailable.". Previews now match on
repository and number and accept either type; other callers stay strict.
Also log the failure class of a swallowed owner/repo lookup error.
* perf(native-chat): project structured chat tabs per workspace bucket
The shared chat-tab list was keyed on the whole unifiedTabsByWorktree
identity, so every tab write anywhere (terminal title batches included)
rescanned all tabs and handed every consumer a new list. Rebuild only the
buckets whose identity changed and return the previous list while no chat
tab changed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(native-chat): reconcile chat status membership per changed tab
The status bridge rebuilt every member and host group and captured every
chat on any tab-map or owner-input change, and recaptured every chat on any
launch notification. Membership now updates only the tabs whose identity
changed; owner-input changes re-resolve only unstamped tabs, the only ones
whose host depends on them; launch notifications name their session so only
its tabs are recaptured (unaddressed ones still recapture all). The sleep
and launch-directory companions of one projection land in one store write.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(ratchets): guard whole tab-map triggers and hot-map listeners
Add a count ratchet for identity comparisons of the whole
unifiedTabsByWorktree/tabsByWorktree map in renderer code (counts may only
fall), wired into pnpm lint, run-ratchets discovery and changed-check
selection. Extend the advisory no-whole-hot-map-selector rule to inline
store listeners that compare a whole hot map and to effect bodies that use
one whole from getState().
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* revert(lint): drop the hot-map listener/effect extension
The guard stays scoped to the repaired seams; no repository-wide rule change.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(native-chat): capture chat status on semantic tab changes; address tombstone retirement
Focus, preview and order-only tab writes no longer recapture a chat's
status: membership and the projection fences compare the fields the
projection reads. Absent-tombstone retirement now names the sessions it
retired, so no launch producer sends an unaddressed notification.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(store): keyed-record transition seam for tab maps and companion records
Writers build next tab buckets and keyed companion records through
replaceTabBuckets / replaceRecordEntries (or name the keys of a record they
already built), which record exactly which keys and tab IDs changed against
the produced record. Readers ask readTabMapChanges / readRecordChanges for
an addressed delta; any unannotated link reads as a full resync. Adds
subscribeTabTransitions and a store-observer installer registry. The
chat-tab list and the status bridge now consume addressed deltas and keep
the whole-list walk only as the cold path.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(store): annotate every shared tab-map writer through the seam
Shared tabsByWorktree/unifiedTabsByWorktree writers (tab, editor, browser,
worktree, ssh, terminal create/close/navigation/title-batch/reconnect/
hydration, web-session mirroring and layout frames) now build or annotate
their next tab buckets and companion records with the exact workspace and
tab IDs they changed; full hydration, full frame builds and reconnect
inventories are named full resyncs. Writers that copied every bucket for
one tab (preview promotion, dirty-file preview clear, worktree removal
filters, sleeping-record identity rename) now keep unchanged buckets.
Replace the renderer-wide tab-map comparison ratchet with a narrow seam
guard: the repaired consumers may walk a whole tab map only in named cold
paths, and the pinned writer modules may not build raw seam records.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(store): name seam fields once; type seam records; record moved respawn writes
Writers stop repeating tracked field names (centralized in
seam-record-fields.ts), the seam takes a named KeyedSnapshot record type
instead of casts, and the layout-writer baseline records the respawn
helpers moved unchanged out of worktree-layout-lifecycle.ts.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(store): drop seam field cast; record the seam field list in the layout-writer baseline
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(native-chat): keep chat-tab list in source workspace order (C3/F1)
Every source workspace keeps a projection slot, even without chats, and the
seam reports when a write added or deleted a workspace key or moved a
surviving bucket, so the incremental list never reorders first-match
consumers; those transitions take the cold rebuild.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(native-chat): keep projection and retirement debt awake (C2, F3)
A member is owed from attach or semantic change, members without a host
feed keep their own debt, and every reconciliation drains existing owed or
retired work even when no new member changed, including a closed last chat
whose feed is gone.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(store): stop inferring host-mirror companion IDs from visible tabs (C1)
A host retraction can delete PTY or layout records for tabs neither
inventory lists, so the mirror funnel marks its tab-keyed records full
resync instead of advertising an incomplete addressed set.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(ratchets): close indirect paths in the tab-map seam guard (C4)
The guard now rejects ordinary callers of the bridge cold path, value
imports the repaired consumers have not reviewed, and raw seam records built
into a local binding without a seam helper annotating it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(native-chat): drive real tab actions through the status bridge (F2)
Close, session rebind with a late old-session tick, and a legacy owner
change, through createUnifiedTab/setTabLabel/closeUnifiedTab, so the
addressed reconciliation path is exercised.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore: exempt seam field-name constants from the layout-writer ratchet; drop dead setters (F4)
The seam's SEAM_*_FIELDS lists name fields without writing them, so the
ratchet skips them and the raised baseline row is gone (renderer total 569,
main 571). setStructuredChatSleptAt and the two launch-directory setters
lost their last callers to the batched companion write.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(store): Map provenance and source-ordered change keys in the seam (PR A addenda)
replaceMapEntries gives Map-typed fields (runtimeStatusByEnvironmentId) the
same weak provenance and readRecordChanges protocol. Change keys compose
forward through a chain, oldest write first, so added keys come out in
source order (index keys first for records, as Object.keys orders them). A
surviving key deleted and re-added, in one write or across a chain, and a
record builder that moves a surviving key, read as a 'reordered' full
resync.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(store): writers declare key order; seam reports ordered additions (N1c, N1a)
The seam no longer scans both records to rediscover order on every
annotation. replace* helpers know insertion order by construction; annotate*
takes a declared order ('appended' by default, 'reordered' for a builder
that moves keys, read as a full resync), verified only under test.
Addressed changes now report keys, source-ordered added keys and deleted
keys, so a reader holding its own key ranks places changes in O(changed).
Worktree removal declares its editor-transfer records reordered.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(native-chat): scope the chat-tab projection to chat-bearing workspaces (N2c)
The projection keeps chat subsets only for workspaces that have chats, plus
per-workspace source ranks that change only when a workspace is added or
deleted. A focus, label or title write costs O(that workspace); the
ordered list is materialized lazily, only for full-list readers, and keeps
its identity while no chat changed. Workspace adds and deletes are
addressed through the ranks instead of a cold rebuild.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(ratchets): resolve aliases and require annotation before publication (C4)
Any reference to a cold helper or Object enumerator outside its named
callers counts, including aliases and callbacks; writer values are followed
through local aliases and must be annotated before the write that
publishes them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(native-chat): scoped hydration keeps the warm chat list equal to a cold read (D1)
Drives the real scoped hydrateTabsSession on early/later chats of one
session: source order, list order and first-match precedence match a cold
rebuild, including when the selection order differs from hydrated order.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(native-chat): cache the chat-workspace order across chat edits (D1 item 5)
The lineage keeps chat-bearing workspaces in rank order and only inserts or
removes one when it gains its first or loses its last chat; a chat object
change re-flattens the list without re-sorting. Full resyncs rebuild it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(ratchets): the seam guard recognizes only construction helpers and cold marks (D1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(store): addressed provenance only from constructing helpers (D1)
Remove annotateRecordReplacement/annotateTabBucketReplacement and their
caller-declared order: only replace*/recordDraft/tabBucketDraft, which
perform the construction, derive changed keys, additions and deletions from
their operations (delete-then-reinsert reads as reordered); opaque
reconstructions use markFullResync. Every former annotate caller is
migrated: ordinary local writes build their records once through helpers
or drafts with today's operations and order; scoped tab and terminal
hydration, the reconnect inventory, host-mirror application and layout
flush are full resyncs. Change readers move to keyed-record-change-reads.ts.
Renderer layout-writer total 567 (main 571).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(native-chat): type the hydration fixture without a cast
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(store): seam record writes define own entries, even __proto__ (N5c)
replaceRecordEntries and drafts assigned through the inherited __proto__
setter, so a tab id '__proto__' lost its own PTY, layout and startup
entries. Both now define an own data property, as the computed-key literals
they replaced did; contract test included.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(terminal): build each createTab record once (N4c)
createTab took ensureGroup's and insertSplitGroup's whole records and the
orphan cleanup's seam records, then rebuilt them through the seam. It now
takes the per-worktree group and split results and gives the orphan
cleanup only the bucket it reads, so every seam record is constructed once
with its ordered operations.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(ratchets): record createTab's orphan-cleanup input view (renderer total 570, main 571)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* refactor(terminal): split orphan cleanup so createTab cleans only companion caches (N6c)
buildOrphanTerminalCompanionCleanupPatch holds the per-tab cache, tab-bar
order and selection cleanup; buildOrphanTerminalCleanupPatch adds the seam
record deletes on top, unchanged for reconciliation. createTab calls only
the companion part with real state and deletes the seam entries through its
single construction, so the stub input view and its layout-writer baseline
rise are gone (terminal-tab-creation.ts back to 10).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* perf(terminal): filter the orphan cleanup's kept bucket once (N7c)
The full cleanup filters the workspace's tabs once and hands the kept
bucket to the companion part, which takes its replacement active tab from
it; createTab's companion-only call still makes its single find pass.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Scope terminal parking inputs and registries to workspace ownership
* Guard parking ownership and cover background split output
* Connect parking ownership to accepted tab transitions
* Use accepted Map provenance and preserve parking owner order
* Read paired parking capability deltas from the shared seam
* Consume ordered additions from accepted record transitions
* Expose first-tab and outside-owner views of terminal membership
* Construct terminal binding and startup transitions at their writers
* Construct shutdown and orphan cleanup transitions from ordered operations
* Construct presentation and sleeping record transitions at their writers
* Express semantic parking inputs and close annotation guard escapes
* Keep replacement values typed from their source records
* Construct sleeping session moves without changing nullable status records
* Follow the constructing seam integer-key module
* Adopt the separated transition reader module
* Ratchet the cold parking compiler bailout improvement
* Exercise parking fixtures through addressed inputs and live ownership
* fix(tabs): keep removed worktrees' group entries deleted on removal
The second emptied-group collapse in removeWorktreeLayout also visited
removed worktrees and wrote their deleted groupsByWorktree entry back as
an empty list, a delete-then-set the seam read as a reordered full resync.
It now visits only surviving workspaces, so removal stays addressed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(tabs): closeEmptyGroup collapses through the shared builder again
collapseGroupLayout takes the record builder, and the renderer passes the
seam's replaceRecordEntries, so the per-worktree collapse publishes with
provenance without new counted layout writes (tabs-group-actions back to 12).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(tabs): reconciliation names its draft fields once (2 + 4 <= 9)
The written-field sets come from SEAM_ field-name constants instead of
string literals, so the reconciliation split no longer raises the combined
layout-writer count (tabs-reconciliation 2, tabs-reconciliation-batch 4,
against the original 9).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(terminal): bound parking updates to changed ownership facts
* fix(terminal): type parking ratchet entry descriptors
* chore(tabs): publish reconciliation drafts with explicit field writes (N9c)
Revert the SEAM_ field-name constants: the drafts are held under their own
names and finishReconciliationDrafts publishes each written draft as an
explicit unifiedTabsByWorktree/groupsByWorktree/activeGroupIdByWorktree/
layoutByWorktree property, so the counter sees every real write and the
split totals 2 + 4 against the original 9, with no exemption.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(parking): follow merged module paths
* Move parking assignment invalidation into the store observer
* Limit parking assignment checks to changed tab rows
* Separate tab row recording from provenance reads
* Preserve uncertainty across skipped tab reinsertion
* Keep root terminal watchers within workspace surfaces
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
openHttpLink, openOwnedHttpLink and openAppHttpLink now return whether
the link opened in Orca's browser, the system browser, or nowhere.
Callers that ignore the value are unchanged. The modifier routing
helper moves to its own module to keep the router under the line cap.