Skip to content

chore: sync Acode main changes (c8d102ba..7a667de9) - #35

Open
bajrangCoder wants to merge 28 commits into
Acode-Foundation:mainfrom
bajrangCoder:chore/sync-acode-main-7a667de9
Open

bajrangCoder wants to merge 28 commits into
Acode-Foundation:mainfrom
bajrangCoder:chore/sync-acode-main-7a667de9

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

Syncs Acode main c8d102ba..7a667de9 (26 commits), cherry-picked with -x, and merges the latest Acode-migration main.

Cherry-picked

  • Update zh-cn.json and zh-hant.json (#3022) (dba9741f)
  • chore(lang): translate remaining Azerbaijani UI strings (#3012) (568286d5)
  • fix(styles): guard color-mix() with @supports for old WebViews (#3025) (84995d75)
  • chore(deps): bump @acode.app/canvas-view to 0.0.5 (59fadfc7)
  • fix(search): expand regex capture groups in native replace (#3033) (4e21bbe2)
  • perf(tabs): speed up closing and saving many tabs (#3035) (27454184)
  • Translation: Update hu-hu.json (#3046) (40209f43)
  • fix: allow replace all with an empty replacement (#3048) (f3b31dcb)
  • feat: add hints to search in files search options (#3042) (2827118e)
  • chore(deps): bump ghcr.io/devcontainers/features/node (#3052) (5dc755e2)
  • chore(deps): bump sigstore/cosign-installer from 4.1.2 to 4.1.3 (#3053) (34c1269f)
  • chore(deps): bump @acode.app/canvas-view to 0.0.7 (509a26ae)
  • feat(editor): see-through canvas behind a plugin's background picture (2ce83c48)
  • feat(editor): canvasMagnifier setting for the canvas selection magnifier (19c81b0b)
  • fix(editor): clear native selection handles when the editor loses focus (#3066) (92f7281d)
  • fix(editor): hide canvas fold markers when code folding is off (#3067) (baf66794)
  • fix(scrollbar): don't reopen the keyboard when dragging the scrollbar (#3069) (698297f5)
  • feat(editor): let themes set the canvas gutter border (#3070) (50179ace)
  • fix(editor): canvas theme colors for plugin themes styled in CSS (#3072) (9da2b96b)
  • chore(deps): bump @acode.app/canvas-view to 0.0.9 (69ede666)
  • test(canvas): run canvasOptions tests under happy-dom (18b6d023)
  • refactor(editor): take canvas theme colors from the theme's CSS (#3088) (86f52c13)
  • docs(contributing): add rules for performance changes (51183f27)
  • chore(deps): bump @acode.app/canvas-view to 0.0.11 (c18c6c0e)
  • update: translate strings in es-sv (#3015) (747a48ee)
  • chore(deps): bump @lezer/common to 1.5.6 (7a667de9)

Migration-specific changes

  • fix(ios): expand regex capture groups in native replace — iOS port of #3033. WorkspaceMatches.replace inserted the replacement literally; the new WorkspaceReplacement applies JS String.replace rules ($$, $&, $\``, $', $1..$99, $) in regex mode. Covered by WorkspaceReplacementTests`.
  • bun.lock changes from the dep bumps were dropped (migration tracks only package-lock.json).
  • Translation conflicts keep upstream strings plus the migration-only FAQ keys.
  • commands.js (#3035) keeps runLazily / platform imports alongside deferSaveState.
  • .gitignore (#3015) keeps migration entries; only the pnpm-workspace lines were added.

Testing

  • bun run check, bun run typecheck, bun run test (1139 passed)
  • runnerTests/WorkspaceReplacementTests on iPhone 17 Pro simulator

🤖 Generated with Claude Code

LaunchLee and others added 28 commits November 22, 2026 10:27
(cherry picked from commit dba9741f04a8e014093fbb50607fe0ff7cb8d90b)
(cherry picked from commit 568286d5186ebf37334a86d24a93eb36c1f6daac)
(cherry picked from commit 84995d75692aedda68750cdf82998d845c1fe1e3)
(cherry picked from commit 59fadfc72c6023e7707f7e32660b02b804ac24cc)
* fix(search): expand regex capture groups in native replace

Replacements on file:// and SAF files escaped the replacement string,
so $1, $& and $<name> were inserted literally. In regex mode, apply
JS String.replace substitution rules so both search paths behave the same.

Fixes #3026

* fix(search): ignore character classes when detecting named groups

(cherry picked from commit 4e21bbe2e754e8f5991a15730776dfc37d69a5d1)
* perf(tabs): speed up closing and saving many tabs

- Close background tabs before active ones so no tab is activated only to
  be closed, and sync the tab list and session state once per batch.
- Save all: save files with a location four at a time with a progress
  dialog, then retry the rest one by one with the usual prompts; files that
  fail stay open instead of aborting the whole operation.
- Check the file mtime before reading it back for conflict detection.
- Keep a save timer per file so concurrent saves all finish, and coalesce
  the session update.
- Only run format-on-save when the saved file is the active one.

Fixes #3030, fixes #3031, fixes #3032

* test(save): cover batched save-all and keep reporting save errors

* fix(save): keep remote saves sequential and restore content conflict check

- Only save local (file:) and SAF (content:) files in parallel; remote
  providers such as SFTP share a connection and now save one by one.
- Restore the content comparison before overwriting so an external edit
  that keeps the mtime still triggers the conflict prompt.
- Show how many files were saved, or could not be saved, once save all
  finishes.

(cherry picked from commit 27454184a150d716bbe3e3057b344ca2d7cfd776)
Translte new strings
fix translation

(cherry picked from commit 40209f438c236b6d46f8810069335f44948dcb9e)
* fix: allow replace all with an empty replacement

Search in files returned early from replaceAll() when the replace field was
empty, so there was no way to delete every match. Both the worker and the
native replace already handle an empty string, so only the search query is
required now.

Fixes #3044

* fix: keep empty replacement text for files that are not open

openFile ignored supplied text when it was an empty string, so a closed
file whose whole content was replaced with "" was reloaded from disk.

(cherry picked from commit f3b31dcbb0d9b39c5bb6b276380f29c7a5738941)
* feat: add hints to search in files search options

* test: use a real checkbox input in search option tooltip test

---------

Co-authored-by: mittal <mittal.singh@digitem.tech>
Co-authored-by: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com>
(cherry picked from commit 2827118eadadb1968096674001f2b7d97f89953a)
Bumps ghcr.io/devcontainers/features/node from 2.1.1 to 2.1.2.

---
updated-dependencies:
- dependency-name: ghcr.io/devcontainers/features/node
  dependency-version: 2.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 5dc755e272b6a0dcd66cb30cd94adc4d125cb8af)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](sigstore/cosign-installer@v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 34c1269f4f2186fa15565fa1f83c86dd6fce052e)
(cherry picked from commit 509a26ae4960517ab68b712cc75c23a8bec026b7)
When a plugin puts a picture behind the editor (Backdrop draws one on
.cm-editor::before; the DOM editor's text has no background of its own),
canvas views get a transparent background, so the picture shows through
the text, gutter and sticky lines, with a translucent active line (the
theme's, or the text color at 8%, like Backdrop's) and no active gutter
background.

Style sheets added, removed or rewritten are watched (at most once per
frame), so turning the picture on or off applies live; new views are
checked when created. Needs @acode.app/canvas-view 0.0.7.

(cherry picked from commit 2ce83c48252c8fde49e56354fa237d654f0b19ef)
(cherry picked from commit 19c81b0b1217165305719aea2aad929463cb2b71)
…us (#3066)

With the DOM renderer, Android kept drawing its native selection handles
when focus moved from the editor to the ⋮ menu or a page such as
Settings, because the DOM selection stayed inside the editor. The
handles floated above the menu and page and could still be dragged.

Clear a DOM selection inside the editor when focus leaves it for another
element of the app. drawSelection() keeps showing CodeMirror's
selection, and CodeMirror writes the DOM selection again when the editor
is focused.

Fixes #3059

(cherry picked from commit 92f7281db0bd78b3adee43535b259fac5930d536)
(cherry picked from commit baf667945ed8ab2bf27b2566c74143d13d3bcebf)
… (#3069)

The scrollbar cancelled its touchend. Android WebView shows the keyboard
after a cancelled touchend while an editable element has focus, so
dragging the scrollbar with the editor focused and the keyboard hidden
opened the keyboard again, and the editor then scrolled back to the
cursor.

Only the mouse path cancels now. The cancelled touchstart already stops
the click and page scrolling.

Fixes #3058

(cherry picked from commit 698297f5072aee681442a8720672a6b3984edd56)
(cherry picked from commit 50179ace7e0c1de6c4677efebd85764ae4118bf5)
* fix(editor): canvas theme colors for plugin themes styled in CSS

Plugin themes registered with only background, foreground and syntax
colors in their config style the active line, gutter, cursor and
selection in their EditorView.theme. The canvas renderer, which doesn't
draw from CSS, showed defaults there. getCanvasTheme now reads those
colors from the theme's own style rules (once per theme, no DOM),
including an outlined active line (inset box-shadow); the config still
wins where it sets a color.

A plugin theme registered after the editor was created kept the canvas
on One Dark's colors: re-applying the same theme id was skipped. The
sync key now includes the registered theme entry.

* chore(deps): bump @acode.app/canvas-view to 0.0.8

(cherry picked from commit 9da2b96bf006677cae80c5a29d95baf28a6e4da1)
(cherry picked from commit 69ede66683eabb81afae304aa9d3c4b21f8cafa5)
canvas-view 0.0.9 reads Element.prototype at import, which crashes in the Node test environment.

(cherry picked from commit 18b6d023f27789f8a1cc88af2a359228f5dba74c)
* refactor(editor): take canvas theme colors from the theme's CSS

canvas-view now resolves a theme's colors from the state's style
modules itself. getCanvasTheme returns a function over that resolved
theme and only adds what the CSS doesn't say: Acode's own scrollbars,
a see-through canvas over a picture, the gutter border, and syntax
colors for themes without a highlight style. The theme's CSS is the
only source for the rest, so the canvas draws a theme like the DOM
editor does.

* chore(deps): bump @acode.app/canvas-view to 0.0.10

* test(canvas): check which syntax colors the canvas draws

A theme whose highlight style and config disagree: tokens take the
highlight style's colors, and the config's are only used without one.

(cherry picked from commit 86f52c13be452da7b876e5b677feedff44db0d2d)
(cherry picked from commit 51183f27981cf6c34f7f1ab070d918cd88d23ce2)
(cherry picked from commit c18c6c0e522a60a2b165aed722275e165a2867e0)
* update: es-sv

Translate new strings and fix some consistency issues introduced in prior updates

* chore: exclude pnpm-workspace

* fix: columba → columna (typo)

---------

Co-authored-by: ajr-uribe <anthonyuribe3456@gmail.com>
(cherry picked from commit 747a48ee2336765aa8a1acefc8819ef1ed180eff)
1.5.6 finds parseMixed's nested regions over several advance() calls
instead of one, so parse time budgets hold for mixed languages (HTML,
Vue, Markdown, the JSDoc-wrapped JS mode): in a 2000-line HTML file
with ~3300 style attributes, the longest single parse step went from
10.9ms to 2.4ms. It also fixes TreeFragment.applyChanges marking open
fragments closed, which made some incremental reparses produce a
different tree than a fresh parse of the same text.

(cherry picked from commit 7a667de944279402a5809c02437fff575f0a4fde)
Port of Acode #3033 to the iOS workspace index: replacements in regex
mode now follow JS String.replace substitution rules ($$, $&, $`, $',
$1..$99, $<name>) instead of inserting the replacement literally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants