Skip to content

[upstream #10371] feat(editor): syntax highlighting for MATLAB (.m) and LaTeX (.tex) - #50

Open
innocarpe wants to merge 10000 commits into
mainfrom
feat/matlab-latex-syntax-highlighting
Open

innocarpe wants to merge 10000 commits into
mainfrom
feat/matlab-latex-syntax-highlighting

Conversation

@innocarpe

Copy link
Copy Markdown
Owner

Portfolio mirror of my contribution to upstream stablyai/orca.
Exhibition only — the real review/merge target is upstream.

Upstream

Summary

Summary - Fixes stablyai#10363: .m and .tex (plus common LaTeX family extensions) no longer open as flat plaintext. - MATLAB: TextMate-backed language using the MathWorks grammar (BSD-style license vendored beside the grammar), same registration path as Nim. - LaTeX: prese

Note

  • Do not merge this into innocarpe/orca main until the upstream PR is merged.
  • After upstream merges: sync fork from upstream, then close this mirror PR.
  • This open PR exists so visitors see in-flight work on this fork's Pull requests tab.

nwparker added a commit that referenced this pull request Oct 19, 2026
…iew off the deprecated owner resolver (stablyai#30562)

* refactor(renderer): fold browser creation, file actions and doc-preview callers off the deprecated owner resolver

The creation-action policy and browser creation (#3, #48) fold together, so the provider the
policy offers is the one creation uses. Browser panes, page lifecycle and conversion, tab
duplication, the explorer tree pane, doc-preview actions and editor path moves (#21, #43, #45-#47,
#49, #50) read runtimeEnvironmentIdWithLegacyFallbackUnlessTwin. File-explorer writes on a folder
(#51) take the owner from the rows alone, never from the focused server. Deprecated importers
16 -> 6.

* refactor(renderer): fold file preview off the deprecated owner resolver; Open in Orca Browser refuses a twin

A project two hosts publish reads as no server for the doc-preview plan, but the file:// path now
refuses it with its own message instead of opening this machine's copy (#7). Deprecated importers
6 -> 5.

* fix(renderer): a twin's file preview and open-externally refuse instead of opening this machine's copy

Codex P2 on the F7 folds: a folder twin read as no server, so the preview plan built a local
file:// tab and open-externally handed the path to this machine's OS. Both now check the owner
for ambiguity first. Also fix two test fixtures that broke the renderer typecheck.

* refactor(renderer): move the file:// open target out of file-preview.ts

file-preview.ts crossed its line limit after main grew it; the file:// target, its type and its two
refusal messages move to workspace-file-browser-open-target.ts, which they never depended on
file-preview for.

* test: mock the replacement resolver in the quick-action availability suite (Codex P2)
nwparker and others added 29 commits October 28, 2026 14:43
…mpt reach the shell (stablyai#35312)

* test(e2e): keys typed into a new remote terminal before its first prompt reach the shell

Add a headless paired-host spec that types into each new remote terminal after
it binds while the host shell's rc file is still running, then requires the
whole command to run. Drop the managed-SSH helper's wait for a prompt before
typing, so those specs assert the same guarantee.

* test(e2e): prove the rc gate held, and that the early-typed command ran exactly once

The tty echo of the typed command must precede the rc file's own prompt, the
command's output must appear exactly once, and the rc wait outlasts the bind
wait. Throw if the host has no isolated HOME.

* test(e2e): drop the early-typed echo-position check; keep the gate and exactly-once proofs

The check that the typed line's tty echo precedes the rc file's prompt failed on
Linux CI 2 of 2 (run 40763469331): the pane began with the prompt and the typed
line followed it, while the command still ran exactly once. macOS echoes it during
the rc. Where the echo lands depends on when the host's line discipline sees the
bytes, which this test cannot pin; it is not evidence of loss. What the test keeps
proving: the keys were typed while the rc file still waited (release file absent),
the rc ran (its own PROMPT appears), and the command ran whole, exactly once.

* test(e2e): name the early-typing test for what it proves

Rename it to say every key typed before the first prompt is delivered exactly
once, and drop the header's claim about how the tty keeps type-ahead.
…lyai#35358)

* fix(i18n): re-render memoized translated UI on language and catalog changes

Memoized components and useMemo/module caches that call translate() kept the
previous language after a switch or a plugin language-pack reload, because
react-i18next only re-renders components that subscribe themselves.

Add useUiLanguageRevision() (language + catalog revision via
useSyncExternalStore), call it in the 34 memoized translating components, key
translated useMemo results and module caches on it, and add a ratchet so new
memoized translating components must subscribe.

Fixes the composer pickers reported in stablyai#34783.

Co-authored-by: Vyacheslav Scherbinin <14369958+gentslava@users.noreply.github.com>

* fix(i18n): drive the language revision from the resource version

Tests that mock @/i18n/i18n have no i18n instance, so subscribe through
translation-resource-version (now also bumped on languageChanged) and give
useSyncExternalStore a server snapshot for renderToString tests.

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Vyacheslav Scherbinin <14369958+gentslava@users.noreply.github.com>
…lyai#34680)

* fix(i18n): localize provider failures and remaining shared UI copy

Translate Linear/Jira failures at the renderer boundary while preserving
English errors and adding optional stable codes for existing clients.
Localize host status, source-control metadata, discard confirmations,
native dialogs, and catalog gaps across all six shipped locales.

Inventory and reproduction paths contributed in stablyai#32207.

Co-authored-by: Seiji Kohara <9543980+seijikohara@users.noreply.github.com>
Co-authored-by: Evgenii <413011+smwbev@users.noreply.github.com>

* test(i18n): assert stable task provider failure codes

* test(i18n): exercise goal notice fallback with an older language pack

* fix(i18n): address provider error and live title review findings

Handle missing remote error text, type provider codes and keep codes intact
through connection tests and optimistic edits. Fix the remaining Linear
load fallback and redundant translation calls, apply Japanese wording
corrections, and refresh native titles on language changes.

Co-authored-by: Seiji Kohara <9543980+seijikohara@users.noreply.github.com>

* fix(i18n): finish provider and shared-copy localization for all locales

- Translate the branch's new keys into de, ru, tr and zh-Hant (added to main
  after this branch was cut), with Russian few/many forms.
- Use whole sentences for file deletion failures and the mixed batch notice
  instead of inserting a 'Recycle Bin'/'Trash' word, and count keys for the
  batch titles.
- Translate the workspace/activity options filter count (was a shared
  'N filter(s)' literal) at the renderer call sites.
- Use _one/_other families for MCP server counts, untracked-file discard copy,
  resume-chat counts, discard file counts and visible host counts.
- Localize PR/MR card status labels, the unsupported-agent hint, Linear title/
  description update failures, the Linear 'showing first N' notice and the
  Linear Connect button.

Co-authored-by: Evgenii <413011+smwbev@users.noreply.github.com>

---------

Co-authored-by: Seiji Kohara <9543980+seijikohara@users.noreply.github.com>
Co-authored-by: Evgenii <413011+smwbev@users.noreply.github.com>
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…hole sentences (stablyai#35365)

- Editor conflicts: localize conflict-kind labels and hints, and build the
  banner, rename note and snapshot time as complete messages instead of
  joining English state labels with a translated fragment.
- PR file viewed checkbox: separate Mark/Unmark sentences instead of
  injecting raw English verbs into '{{value0}} {{value1}} as viewed'.
- Quick Open ripgrep hint: one sentence with an embedded <code> element and
  an interpolated reason instead of three fragments.
- Usage breakdown: session/turn/event counts use CLDR plural keys, so Russian
  reads «1 сессия • 21 ответ» instead of «1 ответов».

Refs stablyai#34783

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Vyacheslav Scherbinin <14369958+gentslava@users.noreply.github.com>
…tablyai#31693)

* fix(mobile): scope workspace setup permissions to the responding host

Changing hosts can expose the previous desktop runtime settings and setup approvals. Own published data and setters by host and client.

* fix(mobile): keep an earlier selection's settings callbacks retired when the host is picked again

Ownership compared client and host id, so A -> B -> A made the first A's Save callbacks match again. Each selection now gets its own owner object.

* fix(mobile): own the workspace runtime context by host, not client object

Any server's relay change rebuilds every scoped client, which wiped the same host's settings and approvals.

---------

Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
…ely (stablyai#30719)

* plugins: app and terminal theme contributions

Manifests can contribute themes (public CSS tokens over a light or dark
base) and terminal themes (an ANSI palette), each at most 16 KiB. App
themes must set --background and --foreground; omitted tokens are derived
from them (surfaces copy the background, muted text, borders and accents
mix the foreground into it), and values must be colors (no keywords,
lengths, calc, var or url). Both load through the shared artifact-pack
registry with the plugin's display name and a content revision, reach the
renderer over IPC and are re-validated there. Catalog releases can declare
app-theme and terminal-theme, and marketplaces stop hiding theme listings.
docs/reference/plugin-themes.md documents the format.

* plugins: resolve a selected plugin terminal palette on every host

Selecting a plugin terminal theme saves a copy of its palette in settings
(terminalPluginPalettes). The shared lookup reads it, so main, headless
serve and relays answer terminal color queries and native chat matches the
terminal without the plugin loaded; a malformed snapshot falls back to the
default theme.

* plugins: one Theme list with plugin themes, painted safely

Appearance keeps the System/Dark/Light control until a plugin offers a
theme; then Theme becomes one list with plugin themes after a divider,
labelled with the publisher when names collide. Choosing one stores its
base in theme and remembers the earlier built-in choice, which comes back
while the plugin is off or after it is uninstalled; a plugin update that
changes the base re-syncs theme. It also offers the plugin's terminal
colors in one click.

The renderer paints only values CSS parses as colors, checks every
text/surface pair, ring and border against the effective set (plugin
values over this mode's built-ins) and repeats until nothing changes, so
dropping one pair cannot expose another. The applied theme is cached with
its id and revision, painted before first render, and dropped as soon as
settings show it no longer applies. Main bounds the new settings on every
write and load, and uninstalling a plugin clears its theme choices and
palette copies. Terminal themes appear under Plugins in the picker with the
plugin's name and are passed to lookups instead of read from a store.

* plugins: type the theme settings normalizer input; let the store own its normalization

* fix(plugins): check text contrast on the editor surface and clear terminal overrides when adopting a theme's terminal colors

* fix(plugins): reject theme colors the canvas probe silently ignores
…D1c-2) (stablyai#33090)

* feat(wsl): run Git for Windows for a WSL project on a Windows drive

A project on C:\ whose runtime is WSL ran every Orca Git command through wsl.exe on
/mnt/c: ~300x slower than Windows Git, and blind to Windows-side edits. The project's
WSL runtime preference gains an optional `git: 'windows-host'`. With it, Orca's Git
(and where new worktrees go) is Windows; terminals, agents, accounts and hooks still
resolve to WSL, so nothing else changes. Older builds drop the field and go back to WSL
Git.

The conversion checks first, then the caller saves the returned preference through the
normal project update:
- Git for Windows must exist.
- New worktrees must not be set to go inside the distro.
- No linked worktree may have a Linux-path link. WSL Git made those; Windows Git sees
  them as prunable, and Orca's prune after a worktree removal would delete their
  metadata.
- Optionally writes core.autocrlf=true into the repo when Windows Git uses it, so WSL
  Git in the project's terminals stops seeing CRLF changes. Never core.checkStat.

IPC is refused off Windows and with the internal WSL hosts gate closed.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(wsl): mock the drive-project IPC in the core handler registration test

Co-Authored-By: Claude <noreply@anthropic.com>

* test(wsl): pin WSL Git for a drive project that never chose Windows Git, and record which Git ran

* fix(wsl): base-ref lookups and the remote-identity sweep run Git where the project's runtime does

* fix(wsl): route base-ref and remote-identity reads by runtime only with WSL hosts on

These reads ran host Git on main. Routing them into a WSL-runtime project's
distro is part of D1c, so with the WSL hosts gate closed they run host Git
exactly as before.

(cherry picked from commit 2ed82987dc5b82c3a86ea7e03ce05e9efc3e77fb)

* refactor(ipc): register the filesystem handlers in one call, keeping core registration under its line cap

The optional commit-message resolvers pass straight through, so the call is the same with or
without them. stablyai#34059 left this file at the 300-line cap and the WSL drive-project wiring adds to it.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wsl): skip folder repos in the Windows Git check, and read worktree links with the prune guard's reader

Folder repos run no Git, so rev-parse on them always failed the preview. The link reader and
the WSL-authored test now come from worktree-prune-guard.ts; the copy's startsWith('/') wrongly
refused //wsl.localhost links, which Windows Git writes itself.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wsl): the remote-identity sweep checks the distro a drive project's Git runs in, so it never boots a stopped one

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…ve the app (stablyai#31712)

* fix(mobile): restore lifecycle-safe terminal accessory repeat

The selection hook replaced the established repeat controller with unbounded timers, allowing held keys to cross terminal/client changes. Reintegrate the existing pinned sender, lifecycle cancellation and backpressure.

* test(mobile): stop held terminal input after refusal or disconnect

* test(mobile): give accessory-repeat harnesses the PTY modes and focus hook main now reads

* fix(mobile): stop a held key when its strip unmounts and repeat through the current live-input mode

* fix(mobile): type the accessory repeat sender's input

* refactor(mobile): read app state live in the accessory repeat gate

* test(mobile): pin the key bar's held press to the repeat controller's first send

---------

Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
…nit (stablyai#35403)

- Plugin pack i18next resource IDs become BCP-47 private-use tags on the
  pack's base locale (ru-RU-x-orcapk-...), so Intl and i18next pick the
  pack's plural rules natively in main and renderer. Drops the renderer
  pluralResolver.getRule patch; pack registration is shared. Persisted
  uiLanguage and pack ids keep the plugin: form.
- returnEmptyString: false in both instances; main no longer returns the
  raw uninterpolated fallback for an empty translation.
- Main i18n initializes at module load (synchronous with in-memory
  resources), removing the initialized flag and interpolateFallback.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…at was already said (stablyai#35338)

* fix(mobile): keep dictation recording through a reconnect

The host tied a phone's dictation to its socket, so any reconnect cancelled
it, and the phone ended the recording as soon as the connection dropped.
The host now owns the session by device and waits a grace period for the
phone to come back. The phone keeps recording through the reconnect and
keeps the text transcribed so far if the connection does not return.

Fixes stablyai#35211

* fix(mobile): bound dictation reconnect waits and release retired relay waiters

* fix(mobile): resend an unsent dictation finish after a connection move and send the text so far only when it changes

* fix(mobile): hold dictation requests through a suspended relay and bound the start wait

* fix(mobile): recognise a suspended relay client across the page bridge

* refactor(dictation): refresh one abandon timer, report text by version and share the reconnect wait

* fix(mobile): resend dictation text each second and never wait offline for a cancel
…ablyai#35324)

* perf(wsl): fold the first libc probe into the WSL host facts exec

The WSL connect's facts exec now also runs the libc probe's first command after its own marker.
resolveOrcadRemoteContext takes it (with the login home) as a known fact, answering that one
probe; the fallbacks still run over the transport if it proves nothing. One fewer serial guest
round trip per connect; SSH passes no known facts, so its probes are unchanged.

* fix(wsl): run the libc fallbacks through the default exec

With a folded first answer, the remaining libc probes used the fenced orcad runner; they now
use the same plain execCommand the default probe does, so they match main exactly.
stablyai#31696)

* fix(mobile): preserve file drafts across refresh and reject stale reads

Overlapping preview reads overwrite current content, and refreshed metadata or equivalent route objects revoke dirty editor state. Keep document-owned drafts editable and accept only the current load.

* fix(mobile): prevent duplicate artifact saves before rerender

* refactor(mobile): drop the dead dirty-draft guard and share preview test setup

---------

Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…and screen-reader status (stablyai#35441)

The chat mic only got isRecording/isProcessing, so it looked idle while starting; it now shows the live look the terminal mic does. The terminal status row says 'Release mic to stop' in hold mode, both mics expose role and busy state, and one live region announces Starting mic / Listening / Processing.

Fixes stablyai#35422
…tablyai#34601)

* Nest chat-UI orchestration workers under the agent that started them

Main's lineage projection only walked terminal panes, so workers running
in the chat UI never got a parent link and listed flat in the sidebar.
It now also projects chat workers, keyed by their visible chat row, and
resolves a chat creator or coordinator to that chat's visible row
instead of its handle or private mailbox pane key.

* Fix public worker lineage across assignment and row identities

* Complete terminal lineage provenance and bound active session selection

* Repair lineage test runtime boundaries and SQLite counters

* Batch public lineage verification after exact recency selection

* Use checked runtime values in lineage integration tests

* Document the trusted Dispatch SQL row boundary

* Keep lineage integration imports within their test programs

* Load native lineage fixtures before test execution

* test: complete lineage inputs in runtime and sidebar fixtures

* test: seed benchmark facts from active dispatches

* test: replace partial orchestration DB casts with typed fixtures

* test: complete stale-leaf mailbox fixture session input

* fix(test): render worker lineage fixture with production list
…ai#31691)

* fix(mobile): drop voice settings replies older than the latest change

An older save that replies last could put the previous setting back on screen. Ignore mutation replies and errors that a newer change has superseded.

* fix(mobile): keep the Voice screen on the connected desktop

Key the screen by host so a late reply from a desktop the phone switched away from cannot land on the newly connected desktop's settings.

* fix(mobile): re-read Voice settings when an older save succeeds late

The host finishes a model delete only after removing its files, so a newer change can reply first with the model still selected. Dropping the older reply left the deleted model shown as in use; re-read instead.

* fix(mobile): keep Voice model errors and the screen through reconnects

A newer setting change does not replace a failed model select, download or delete, so show those errors again. Key the screen on the last connected desktop so a reconnect of the same desktop no longer remounts it.

* test(mobile): pin Voice model-delete errors after a newer change

* fix(mobile): re-read Voice settings after any failed save

* fix(mobile): re-read Voice settings only after every pending change settles

A read sent while a model delete is still running can return the deleted model after the delete's own reply. Skip reads while a change is pending, and re-read once when all settle if any reply was skipped.

* fix(mobile): keep a failed Voice model action's error on screen

A lone failed select or delete changed nothing on the phone, so it no longer starts a re-read that clears its error. A failed switch still re-reads to undo its optimistic flip.

* fix(mobile): let Voice reads clear only their own load errors

A re-read after a failed or superseded change cleared the change's error before the user could read it. Keep load and change errors apart; re-read after any failure again, which also undoes a failed switch flip.

---------

Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
…trace (stablyai#35378)

* chore(wsl): keep the Sleep folder and bridge-exit lines in the local trace

A packaged build keeps no console, so stablyai#35150's Sleep folder line and the WSL bridge exit verdict
were invisible on a device. Each now also goes to main.trace.ndjson as a span with the line and
its facts as filterable fields.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wsl): keep session paths and distro names out of the persisted WSL trace

---------

Co-authored-by: Claude <noreply@anthropic.com>
OrcaWin and others added 29 commits October 28, 2026 21:32
* Send ordinary PR reviewer updates directly to the API

* test(github): trim redundant cases

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* Share repository assignees across row-specific selections

* test(github): trim redundant cases

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…tablyai#35573)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…fferent repositories (stablyai#35640)

* fix(plugins): compare self-hosted repository paths case-sensitively

A self-hosted Git server can serve team/Plugin and team/plugin as two
repositories, so treating them as one let a catalog switch repositories
without the moved-repository review. Case is still ignored on GitHub,
GitLab.com and Bitbucket, which route paths case-insensitively.

* refactor(plugins): keep the marketplace module under the line limit
…tablyai#35642)

* fix(plugins): stop an in-flight auto-update pass once the user opts out

A pass already waiting on the catalog or kill list could still install after
the user turned automatic updates off. Recheck the setting just before the
install starts.

* fix(plugins): recheck the auto-update setting inside the install step

The approval step awaits the old version's recipe files before installing, so
the check now runs at the install call itself.
…tall location (stablyai#35668)

The uninstaller's other-install check treated an Orca registration whose
InstallLocation reads empty as "none", so it would remove the agent hooks.
That registration could still be another install, so it now reports "unknown",
which keeps the hooks; every doubtful case leaves them in place.
…m its own record read (stablyai#35663)

A snapshot command that rejects now falls back to the per-file reads
instead of failing the connect. A snapshot whose record section was
unreadable gives no hints even when the fallback read answered. Pins the
held-fence and pending-journal cases at the connect level, and notes that
snapshot raws drop trailing newlines.
…start (stablyai#35662)

The restart baseline only had a non-PTY wsl.exe exec as the old bridge's lower bound. The lane
now also runs the bridge as the app does: wsl.exe in a ConPTY with the bridge's WSL terminal
setup command and the probe typed ahead, recording first paint and first command output, median
of 3, alongside the host and exec runs. Test-only.
)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
stablyai#35661)

* test(terminal): run the renderer's OSC 7 agreement cases through xterm

The renderer's OSC 7 parser only ever sees what xterm's OSC parser hands
its handler, and xterm drops raw C0 bytes first: a raw tab, LF or CR
becomes /tmp/ab, and a raw NUL is dropped rather than refused. The
agreement table now records those rows as a known renderer gap (viaXterm)
and the renderer side runs every case through @xterm/headless.

* test(terminal): pin raw ESC, CAN and SUB, and run the daemon side through its PTY scanner

- A raw ESC ends xterm's OSC at /tmp/a, and the daemon's scanner rejects
  the report (ESC not followed by \), so the pane keeps its folder.
- CAN and SUB cancel the sequence in xterm, so the renderer's handler
  never runs (no-report); the daemon reads the byte as part of the path.
- The daemon side now also runs every case through
  TerminalOscCwdTitleScanner after a prior good report, as PTY traffic
  reaches it, alongside the direct-parse check.
* fix(i18n): code automation run skip and failure reasons

* test: expect legacyTwinHosts code on twin-host refusal

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…i#35570)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…tablyai#35594)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…ery prompt (stablyai#35597)

* feat(wsl): bridge sh/dash/ash panes report their folder (OSC 7) at every prompt

bash, zsh, fish and nushell panes already tell the terminal daemon their
folder; a bridge pane whose login shell is sh, dash or busybox ash did
not, so restores fell back to the starting folder.

dash has no rcfile flag or prompt hook, but an interactive sh reads $ENV
after ~/.profile, and dash 0.5.8+ (plus ash and bash-as-sh) expand $(...)
in PS1. The bridge now points ENV at a new sh/env file in the published
wrapper tree, saving the user's own ENV. That file hands ENV back to the
user's value (so children see theirs), sources it, and inside WSL only
prefixes PS1 with the report. A root containing $, ` or \ is skipped,
since the shell expands ENV's value.

A non-interactive sh -c never reads ENV, and a missing file (Orca
updated away or uninstalled) is silently ignored by dash, ash and bash.

* fix(wsl): sh ENV hook survives quotes in the user's ENV and keeps prompt width

- The user's ENV is expanded through a here-document, so a value with a
  quote, $ or space no longer breaks startup with a syntax error.
- bash-as-sh and busybox ash (fancy prompt) get the report inside \[ \]
  so its invisible bytes don't count toward the prompt width; dash has no
  line editor to miscount and would print \[ literally, so it stays bare.
- Tests: a user ENV of `$HOME/u "q" sp/env`, a user PS1 with $, a quote
  and a backslash, and reports read through the daemon's WSL parser.
- CI: edits to the sh hook and the bridge launch trigger the shell
  contracts job (its prefix list moves to its own module, keeping the
  scope script under its line limit), and the sh and fish WSL pty tests
  leave the unit shards.

* ci: check out the shell-contract prefix module in the change detector

The detector job sparse-checks-out a fixed file list; the new
pr-shell-contract-prefixes.mjs that pr-code-change-scope.mjs imports was
missing from it, so the job failed with ERR_MODULE_NOT_FOUND. A contract
test now walks the scope script's local imports and requires each in
that list.

* ci: list the shell-contract prefix module wherever the scope script's modules are listed

Two config-script suites copy pr-code-change-scope.mjs and its sibling
modules into a fixture repo; without the new pr-shell-contract-prefixes.mjs
the copied script failed to load, and the detector fell back to running
everything. Also lists it with the scope script's other modules in the
mobile workflow trigger and the mobile non-test file set.
…stom editors (stablyai#35680)

Panels and custom editors each had their own copy of the read-entry,
newest-read-wins, reload-on-change loop. The panel copy also cleared its
failure dot on the next plugin-list change while it still showed the
suspended message. One hook now loads both; a suspended frame stays suspended
(and reported failed) until its HTML actually changes, and panel health is
derived from the entry state.
…skills (stablyai#35659)

stablyai#34632 let Share read every stopped WSL distro's skill folders. The Share
dialog now sends the chosen skills' folders, and discovery reads only the
stopped roots (and workspace plugin folder) that hold them; every other
stopped root stays unread and unavailable. The skills.share RPC names skills,
not folders, so it scans gated first and reads stopped roots only when a
selector is missing and a folder went unread.
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…anes (E9) (stablyai#35677)

* fix(codex): never read a WSL distro's history over 9P in the per-account and shared-mirror lanes

When codexSessionSourceHome points inside a distro (\\wsl.localhost\…), the
per-account lane used it as a history source and the shared-mirror lane scanned
it, both through 9P from the Windows side, which boots a stopped distro (E9) and
yields links codex resume ignores. Both now leave such a source out; the WSL
lane, which runs only at launch, owns those homes. Ordinary custom sources are
unchanged.

* fix(codex): no system-default history migration scan from a WSL source home

The host system-default session migration (backfill and index heal) also read
resolveHostCodexSessionSourceHome as its sessions root; a \\wsl.localhost
source would be scanned over 9P and boot a stopped distro (E9). Such a source
now makes the migration ineligible, sharing one check with the mirror lane.

* fix(codex): one WSL-source predicate for every history lane, and no backfill prep from it

Every lane that reads the host history source now uses one protected predicate,
isHostHistorySourceInWsl(): the per-account, shared-mirror and ~/.codex lanes,
migration eligibility, backfill invalidation after a managed system-default
launch, and preparing a migration pass, which now returns false without marking
the backfill pending.
…title generation (stablyai#35669)

* fix(i18n): code AI text-generation failures for commit, PR, and Jira title generation

* fix(i18n): merge duplicate type import

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…i#35611)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…traction (stablyai#35637)

* perf(i18n): load built-in catalogs once, without copies or a runtime plural fill

Each catalog load parsed the JSON, rebuilt it to fill CLDR plural forms
from _other, then deep-copied and deep-merged it into the store (about
26 ms after parsing per 1.3 MB catalog), and concurrent loads of one
locale fetched it twice.

- sync:localization-catalog now commits the plural forms a locale's
  CLDR rules need beside each _other (fr/es/pt many, tr one, a few
  de/ru), and verify:localization-catalog fails when one is missing.
  Plural forms may include {{count}} where English omits it.
- Renderer and main load built-in catalogs as-is; plugin packs keep the
  runtime fill.
- Renderer catalog requests are shared per locale; a timed-out request
  is dropped so a retry fetches again. Bundles are added with skipCopy.

* fix(i18n): require {{count}} in plural forms when English shows it

* refactor(i18n): share one i18next setup between main and renderer

- createOrcaI18n (src/shared/orca-i18n-instance.ts) owns the backend,
  init options, plugin-pack registration, resource-language resolution
  and the translate wrapper; main and renderer inject only how a
  built-in catalog loads (dynamic import vs. fetch) and extra modules.
- Remove setRendererUiLanguage (tests only); tests load then switch.
- resolveUiLocale maps built-ins by lookup instead of an if-chain, and
  catalog URLs/loaders are direct map lookups.
- Drop <I18nextProvider>: initReactI18next already binds the instance.

* refactor(i18n): native i18next plurals at call sites, plural-aware extraction

Call sites branched on count === 1 and passed literal _one/_other keys,
which resolvePluralFamilyKey stripped again so CLDR could pick the form.
They now call translate('x', otherDefault, { count, defaultValue_one })
and i18next selects the form natively; catalog keys stay x_one/x_other.

- Converted 284 families with an AST codemod plus a few by hand; added
  defaultValue_one to 21 base-key families that relied on en.json.
- Extraction runs with plurals enabled, so both English defaults are
  checked for drift. A key that only fills {{count}} (no defaultValue_one)
  stays singular in en.json.
- verify/sync:localization-catalog expand a native plural call into its
  x_one/x_other English entries.
- Removed 22 base keys that a sibling plural family shadowed in every
  catalog.

* fix(i18n): pick English plural defaults by English rules; require count for plural refs

* refactor(i18n): convert plural sites merged from main; treat key-as-default plural extraction as dynamic

* fix(i18n): keep an undefined pass-through count absent; only dotted key-as-default is dynamic

* test(i18n): update plural call expectations in two renderer tests

* refactor(i18n): convert a plural site merged from main

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
… provider snapshot waits (stablyai#35679)

* fix(orcad): keep orcad's terminal models at the daemon's live depth

orcad's per-PTY headless terminal model kept 5,000 rows of scrollback, but
orcad has no renderer to reveal from: requested snapshots read the daemon
first and subscribe snapshots read at most 1,000 rows. The model now
mirrors the daemon's live window, from the same resolver the daemon uses.

The execution-context reseed also awaited its provider snapshot with no
bound, so a provider that never answered held every live chunk queued
behind it. It now uses the authoritative snapshot timeout.

Refs stablyai#34410
Refs stablyai#33870

* fix(orcad): keep provider preference when the reseed snapshot times out

Refs stablyai#34410
Refs stablyai#33870

* fix(runtime): bound every provider snapshot wait in one place

serializeProviderTerminalBuffer now applies the authoritative snapshot
timeout when a caller passes none, so no reader can wait on a provider that
never answers. The execution-context reseed relies on that bound; when its
capture times out it keeps the PTY provider-preferred and reseeds again once
the capture lands, instead of staying on the provider path.

Refs stablyai#34410
Refs stablyai#33870

* fix(runtime): reseed once after a late provider snapshot, trust the model on none

awaitProviderTerminalBuffer reports the capture still running when the
bounded wait gives up, instead of callers inferring it from the acquisition
map. The execution-context reseed retries once when that capture lands with
a snapshot, and stops preferring the provider when it lands with none, so a
slow provider can neither loop reseeds nor pin the PTY to the provider path.

Refs stablyai#34410
Refs stablyai#33870

* fix(runtime): never trust a late-reseed model that found no snapshot

The once-only retry disposes a model that had parsed the live bytes since
the timeout. If its own capture then fails, the replacement holds less than
its predecessor, so the PTY keeps preferring the provider instead of
treating that model as complete.

Refs stablyai#34410
Refs stablyai#33870
)

In a hidden Linux test window Playwright's mouse click on a button inside the
sandboxed editor frame never reaches it: the frame takes focus, but no
pointerdown or click fires, so the edit was never sent and the tab never went
dirty. Activate the button from the keyboard instead, which still counts as a
real user gesture.
…es (stablyai#35697)

* fix(i18n): code AI text-generation failures for commit, PR, and Jira title generation

* fix(i18n): merge duplicate type import

* fix(i18n): code Source Control AI settings and generation plan failures

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
…ablyai#35689)

* fix(i18n): code GitHub/GitLab operation failures for the renderer

* fix(i18n): show coded failures in comment composers; exhaustive classification switches

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Wire .m files to a TextMate-backed matlab language (MathWorks grammar) and
.tex/.ltx/.sty/.cls to a Monarch latex tokenizer for comments, commands,
environments, and math. Update detectLanguage so the Monaco viewer picks
these up instead of plaintext.
@innocarpe
innocarpe force-pushed the feat/matlab-latex-syntax-highlighting branch from a3beca8 to 8d81891 Compare October 29, 2026 05:19
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.

[Feature]: Syntax highlighting for MATLAB (.m) and LaTeX (.tex)

8 participants